Okaaay, Can anyone tell me...
Can anyone tell me what I should do now I mean I know C++ and I know the SDL i need to know to load BMPs and put them on the screen but what about the acctaull GAME.
It bugs me hard.
I understand the game loop but what do you do in there !!! None of my books explains that !!! I want to make an actaull game.
Argh!
At the top of the screen are a couple of links: Start Here (For Beginners), Articles and References, and so forth.
Start there.
[ GDNet Start Here | GDNet FAQ | MS RTFM | STL | Google ]
Thanks to Kylotan for the idea!
Start there.
[ GDNet Start Here | GDNet FAQ | MS RTFM | STL | Google ]
Thanks to Kylotan for the idea!
He''s right though, none of these so called games programming books actually show you how to make an actual game.
Quite often they just show how to write an engine and how to do a few bits of AI and physics here and there but they never show how to put it all together which personally I think should be a big part any general games programming book.
- Kaijin
Quite often they just show how to write an engine and how to do a few bits of AI and physics here and there but they never show how to put it all together which personally I think should be a big part any general games programming book.
- Kaijin
Take a course in C++ data structures if you havent already and another in advanced OOP, or learn it yourself, its not that hard. Then buy The Zen of Direct3D Programming.
-----------------------------
The sad thing about artificial intelligence is that it lacks artifice and therefore intelligence.
-----------------------------
The sad thing about artificial intelligence is that it lacks artifice and therefore intelligence.
That still won''t help him to write game code. I think he''s looking more for information about how to write game logic and putting it all together.
- Kaijin
- Kaijin
Programming isn''t about taking bits a pieces from this and that code putting it together and working computer magic. Eventually you are going to have to program some lines of code for yourself. Starting on something is actually one of the hardest parts of programming. Knowing where to start can be daunting when the whole project is ahead of you, but you can never get past that if you don''t make the leap and start it for yourself. Personally I usually start with a simple rotating cube or triangle display tutorial and start adding things. After you''ve added quite a few pieces you''ll already have a foundation you can work on. Thats when I go back and create my data structures and rewrite core management code such as texture loading and handling. But you have to start in order to get anywhere.
Then go buy a book on how to make games. There are books that do this, they contain nearly no code or programming stuff but just rant on about how to design and plug bits together.
If the worst comes to the worst you could just figure it out yourself. It's not like you going to try and create Quake 4 (are you?) Aim small at breakout or somthing similar and put your design down on paper. Later think what you need to do every turn, check for collisions, move all the objects, animate stuff etc. Once you've got it all down on paper in front of you thing fit together much easier.
A good tip would be to keep you main loop simple, just call 10 functions or something similar and place all the complex code in there, if you do that it's far easier to track down problems.
I don't mean to sound harsh but if you don't think you can't manage to figure it out yourself then you might want to try learning a bit more programming first.
zipless
Edited by - zipless on January 3, 2002 11:07:19 AM
If the worst comes to the worst you could just figure it out yourself. It's not like you going to try and create Quake 4 (are you?) Aim small at breakout or somthing similar and put your design down on paper. Later think what you need to do every turn, check for collisions, move all the objects, animate stuff etc. Once you've got it all down on paper in front of you thing fit together much easier.
A good tip would be to keep you main loop simple, just call 10 functions or something similar and place all the complex code in there, if you do that it's far easier to track down problems.
I don't mean to sound harsh but if you don't think you can't manage to figure it out yourself then you might want to try learning a bit more programming first.
zipless
Edited by - zipless on January 3, 2002 11:07:19 AM
one...two...three...FOUR words, Game Architecture and Design.
(its a book)
...go on and live with no regrets, you only have one life...
(its a book)
...go on and live with no regrets, you only have one life...
quote:Original post by Xanthen
. Eventually you are going to have to program some lines of code for yourself. Starting on something is actually one of the hardest parts of programming. Knowing where to start can be daunting when the whole project is ahead of you, but you can never get past that if you don''t make the leap and start it for yourself.
That''s very true but there''s nothing wrong with giving people a helping hand. While it''s good to learn things by yourself and from your own mistakes it''s also good (and often faster) to learn from others examples (and mistakes ). That doesn''t just apply to programming.
Games programming is quite different from other kinds of programming so some people find it difficult to adjust to the way of thinking.
quote:Original post by untalkative_monkey
one...two...three...FOUR words, Game Architecture and Design.
(its a book)
...go on and live with no regrets, you only have one life...
Glad you learnt how to count Yeah, I have that book. It''s a very good book but my point is if a book has "Game Programming" in the title it should teach you how to put an actual game together not just an engine. Just my opinion.
And just for clarification, I''m not compaining that I don''t know how where to start. I''m just saying that these books that teach you how to make a game should live up to their claims.
- Kaijin
Hello Moogle,
A game loop usually consists of code to update and flip the screen from back to front in a double-buffer system, check the event status of the keyboard. Look up events in the SDL documentation to create an event loop using SDL_Event. Also for a crude way to slow down your game loop, look up SDL_Delay, which can be put at the end of your game loop. Here's a pseudo example
SDL_Event event;
while(!quit)
{
clear out sprite's last known coordinates;
show your sprites at new locations (SDL_BlitSurface);
switch(event)
{
case QUIT_DETECTED:
quit = true;
break;
switch(check the keyboard for keypresses)
case upkey:
decrease the sprites y-coordinate;
break;
case downkey:
increase the sprite's y-coordinate;
break;
}
SDL_Flip(screen);
SDL_Delay(some length of time);
}
Again, look up SDL_Delay, SDL_Flip, SDL_Event and keyboard input. A game loop is just a way of updating all of data in your game world and also checking for user input so that you know how to update aforementioned data.
All of this is available in the SDL documentation. That will get you started, but you need collision detection, physics engine, AI, etc.
To move a guy around the screen, simply check for keypresses up and down and key releases thereof. Turn keyboard repeat on (look through the list of functions) and program your loop so when you press a key it will update some variable corresponding to the sprite's location. Then erase the bitmap you drew on the screen and draw a new one at that location... It's a good way to start but probably not the best way to do everything.
Good luck!
Edited by - Anesthesia on January 3, 2002 4:53:32 PM
A game loop usually consists of code to update and flip the screen from back to front in a double-buffer system, check the event status of the keyboard. Look up events in the SDL documentation to create an event loop using SDL_Event. Also for a crude way to slow down your game loop, look up SDL_Delay, which can be put at the end of your game loop. Here's a pseudo example
SDL_Event event;
while(!quit)
{
clear out sprite's last known coordinates;
show your sprites at new locations (SDL_BlitSurface);
switch(event)
{
case QUIT_DETECTED:
quit = true;
break;
switch(check the keyboard for keypresses)
case upkey:
decrease the sprites y-coordinate;
break;
case downkey:
increase the sprite's y-coordinate;
break;
}
SDL_Flip(screen);
SDL_Delay(some length of time);
}
Again, look up SDL_Delay, SDL_Flip, SDL_Event and keyboard input. A game loop is just a way of updating all of data in your game world and also checking for user input so that you know how to update aforementioned data.
All of this is available in the SDL documentation. That will get you started, but you need collision detection, physics engine, AI, etc.
To move a guy around the screen, simply check for keypresses up and down and key releases thereof. Turn keyboard repeat on (look through the list of functions) and program your loop so when you press a key it will update some variable corresponding to the sprite's location. Then erase the bitmap you drew on the screen and draw a new one at that location... It's a good way to start but probably not the best way to do everything.
Good luck!
Edited by - Anesthesia on January 3, 2002 4:53:32 PM
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement