标题: 实例化游戏对象(上) [打印本页] 作者: 会飞的鱼 时间: 2011-12-7 15:19 标题: 实例化游戏对象(上) In this tutorial we will be looking at an important concept of games development; instantiation. The process of instantiation or instancing as it is also known, is where you load or create objects at runtime through scripts.
Introduction
Normally, when you want an object to appear in a scene or level you place it from the library into the scene and position it in 3d space. This is useful for static objects or objects that always appear in a specific spot. However in your average game, there are many things that do not appear in a specific spot, all the time.
If we think about what objects appear in a game that are instanced (i.e. created dynamically through code or "spawned") here are just a few examples:
■Monsters / Creatures / Enemies
■NPC characters are often instanced
■Player characters are also often instanced
■Quest items in RPG's
■Rewards - such as rings in Sonic games or chests in RPG's
■Components of puzzle games
So in summary, instantiation is simply the process of dynamically spawning an object as opposed to it being manually placed in a scene. As you can probably imagine, this topic can get very long and incredibly complicated when you consider different types of game and how the implementations of instantiation could be formed.
Therefore we will start with some very basic technical examples and then move onto more practical implementations.作者: 奇 时间: 2012-2-17 23:24
呵呵,真得不错哦!! 作者: tc 时间: 2012-2-24 23:23
顶!学习了!阅! 作者: 菜刀吻电线 时间: 2012-3-11 23:22
爱咋咋地! 作者: C.R.CAN 时间: 2012-5-29 23:18
呵呵,真得不错哦!! 作者: 奇 时间: 2012-6-15 23:20
非常感谢,管理员设置了需要对新回复进行审核,您的帖子通过审核后将被显示出来,现在将转入主题 作者: 菜刀吻电线 时间: 2012-7-7 23:18
响应天帅号召,顶 作者: 晃晃 时间: 2012-8-11 00:09
很经典,很实用,学习了! 作者: tc 时间: 2012-8-13 23:51
佩服,好多阿 ,哈哈 作者: tc 时间: 2012-8-15 01:11
先顶上去,偶要高亮加精鸟! 作者: 菜刀吻电线 时间: 2012-8-17 00:03
楼主收集的可真全哦 作者: 奇 时间: 2012-11-3 23:26
既来之,则看之! 作者: 奇 时间: 2013-3-2 23:58
无聊时可以刷屏幕 灌水 也可以试试 帖子的标题究竟可以写多长 作者: 晃晃 时间: 2013-3-13 23:19
提醒猪猪,千万不能让你看见 作者: C.R.CAN 时间: 2013-3-16 23:21
很经典,很实用,学习了!