2D game graphics question
I like to play 2D games(Diablo,...)very much and I want to know the basic implementation about the graphics technique. that means(just like Diablo or other similar games) how can I organize the screen, how can I put some objects on the pre-render background.(characters,trees,stones,buildings etc...) and make them relate, a character can run on the background, and when them encounter a stone,or a table.., thay''ll stop, and when they enter a building, just put them into it...........
I know this question is tooooo big,confusion, but if you have experiences whit the job, please give me some hints. I want to know it very much(you can also give me some site addresses about the techniques on internet). THANKS.
**you can assume that I know the basic graphics programming knowledge**
Id probably do this for drawing the scenes
1) draw the background
2) draw the ground that the player moves on
3) draw the objects (player,enemys,items,etc)
3) draw the buildings
if you have the depth testing turned off, each new thing you draw is drawn over what was already there, so that the ground is drawn over the background, the objects are drawn over the ground and background, and buildings are drawn over players and items etc. of course if the player was infront of the building they would need to be drawn over it, in which case you should sort the drawing for objects and buildings and draw from back to front.
The player hitting stones etc is to do with collision detection, not the graphics rendering. Simple cubic collisions should be enough for this kind of thing
1) draw the background
2) draw the ground that the player moves on
3) draw the objects (player,enemys,items,etc)
3) draw the buildings
if you have the depth testing turned off, each new thing you draw is drawn over what was already there, so that the ground is drawn over the background, the objects are drawn over the ground and background, and buildings are drawn over players and items etc. of course if the player was infront of the building they would need to be drawn over it, in which case you should sort the drawing for objects and buildings and draw from back to front.
The player hitting stones etc is to do with collision detection, not the graphics rendering. Simple cubic collisions should be enough for this kind of thing
-----------------------"When I have a problem on an Nvidia, I assume that it is my fault. With anyone else's drivers, I assume it is their fault" - John Carmack
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement