《赢在中国》第二赛季的初步观感,董冰、陈小霞再上镜头,中国的教育诞生了这么些人。
老史的一句话蛮经典,失败的次数再多,如果总结的不够深刻,那也白失败了。
老史对参赛选手的点评十分精彩,真正从选手立场出发。
摘要: While going through the examples, I placed characters on the map in
a direct, hard-coded manner. However, remember that hard-coding game data is a
no-no. You need to have as much flexibility as possible when designing your maps,
and this includes placement of characters in a level.
阅读全文
摘要: Mapping demo main source:
阅读全文
摘要: Recall that you need to enable each map section in order for it to be visible when
rendered. The m_visible array tracks the visibility of each map section; if an array
element is set to 0, the respective map section is not displayed. If the element is set
to 1, the map section is drawn.
阅读全文
摘要: The constructor and destructor of the cAutomap class ensure that all data is placed
within a known state and that all used resources are released. The constructor does
nothing more than clear some variables and orient a camera to point downward.
You later use that camera to render the map. The destructor calls on the Free
function to release all used resources.
阅读全文
摘要: The auto map class I've developed for the book will load a cMesh object and compress
it into a flat version of the map. The flattened map is stored in a series of vertex
buffers. These vertex buffers use only the X-, Y-, and Z-coordinates of each
vertex plus a single diffuse color. This means that auto maps are compact and easy
to render. This also means that you can use alpha blending to overlay the map on
the screen without covering the crucial gaming action going on.
阅读全文
摘要: Your game world is a huge place, and when players start exploring their surroundings,
you may want to make things easier on them by providing a miniature version
of your map for their reference. Not just any map mind you—a map that is smart
enough to know where the player has been and the places he still needs to explore.
阅读全文
摘要: Even though the barrier class marks areas on the map using geometric shapes in
exactly the same way as the trigger class does, the barrier class also positions meshes.
Looking again at the cBarrier class declaration, notice that each of the add barrier
functions — add_sphere, add_box, add_cylinder, and add_triangle—have a set of coordinates
that position and rotate the barrier’s mesh before being rendered.
阅读全文
摘要: Continue now with the cBarrier class declaration:
When you need to assign a mesh to a barrier, use the set_mesh function, passing the
barrier’s identification number to set, as well as cMesh objects to use.
For setting an animation for a barrier, you pass the barrier’s
identification number, cAnimation object, the name of the animation to use, and the
time the animation is set (using a timer function such as timeGetTime).
阅读全文
摘要: You know—detecting when your character is walking around the map bumping into walls or standing
on solid ground. What about objects such as doors blocking your character’s way?
Because a door is not part of the terrain, I didn’t include a door when I constructed
the collision detection code. Now is the time to remedy that situation.
阅读全文