GAME STARTER????
I got an idea. Now what? Do I do the graphics stuff first and then the A.I? Or do each as I need it. Such as LOAD BITMAP -> DO THE A.I. -> UNLOAD BITMAP -> MORE GRAPHICS...get what I mean. Help me out if your willing. I am going in the route of DIRECTX in 2D. Thanx!
-Taylor
EMAIL: music_dreamer@hotmail.com
Taylor G.
You''re probably going to want to learn DirectX, I''m assuming that your talking about DirectDraw. Figure out how to do that buisness, then you will have something to apply AI to. What can or have you dont as far as programming is concerned in the past? How skilled are you?
I am experienced in many languages, except my top three are SQL, Visual Basic and 2 years with C++. Can ya help me out? I got books up the ying yang by LaMothe.
-Taylor
-Taylor
Taylor G.
I''m not sure what your question is, but "LOAD BITMAP -> DO THE A.I. -> UNLOAD BITMAP -> MORE GRAPHICS" is surely not the right way to draw a frame.
You definitely don''t want to load and unload bitmaps every time you use them.
You definitely don''t want to load and unload bitmaps every time you use them.
January 31, 2003 02:24 PM
Taylor''s right, you should load as much of your graphics as you can at the beginning of the game or level. Once they''re in memory you can do whatever you want with them whenever you want. Each clock cycle in your game will then have an AI routine and a draw routine, probably in that order. If you draw first then apply AI, your enemies/npcs/whatever will actually be one frame behind in movement. Of course, with a decent framerate that''s probably not too much of a concern.
Keep in mind this is the opinion of another beginner, but it sounds logical, doesn''t it?
Keep in mind this is the opinion of another beginner, but it sounds logical, doesn''t it?
The problem with keeping all the graphics loaded in memory is the amount of space they occupy. Certainly it''ll make your program run faster if you''re not loading them dynamically, but the difference isn''t noticeable if there isn''t enough memory to run the program! Just something to think about.
"Ignorance is the sin of the many, whereas knowledge is the salvation of the few."
Aanidaani
"Ignorance is the sin of the many, whereas knowledge is the salvation of the few."
Aanidaani
"Ignorance is the sin of the many, whereas knowledge is the salvation of the few."Aanidaani
quote: Original post by Aanidaani
The problem with keeping all the graphics loaded in memory is the amount of space they occupy. Certainly it''ll make your program run faster if you''re not loading them dynamically, but the difference isn''t noticeable if there isn''t enough memory to run the program! Just something to think about.
True, but your average 2D game doesn''t have enough graphics to come anywhere near that problem.
Keep your sprite sizes small, and only load large bitmaps (for example, a backdrop) when you''re using them (for each level, say).
If you wanted to be really neat, you could set up a caching system. But that''s pretty heavy duty for a 2D game.
Superpig
- saving pigs from untimely fates, and when he''s not doing that, runs The Binary Refinery.
Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement