Page 1 of 1
Game Engine Question
Posted: Mon Sep 14, 2009 10:11 am
by Viliasas
Hi,
i just recently got my PSP and seeing that there is alot of interesting homebrew on it, i started learning how to program on PSP. I already tried some simple programs, but what i really would like to make is some sort of game engine. Nothing too fancy... For started i would be really happy if i could make 2D sprites move over a picture (map) and maybe changing the map when sprite walks out of the screen.
Everything would be nice, but i really don't know how game engine should work... I've red about this a bit and come to a conclusion that i should write my code inside a while(1) { } loop. Is this true and what should happen in it, that i could achieve my goal?
Re: Game Engine Question
Posted: Mon Sep 14, 2009 10:42 am
by hurstshifter
Viliasas wrote:Hi,
i just recently got my PSP and seeing that there is alot of interesting homebrew on it, i started learning how to program on PSP. I already tried some simple programs, but what i really would like to make is some sort of game engine. Nothing too fancy... For started i would be really happy if i could make 2D sprites move over a picture (map) and maybe changing the map when sprite walks out of the screen.
Everything would be nice, but i really don't know how game engine should work... I've red about this a bit and come to a conclusion that i should write my code inside a while(1) { } loop. Is this true and what should happen in it, that i could achieve my goal?
Hey Viliasas. Sounds to me like you might be a bit confused on the 'game engine' term. A while(){} loop is generally what your main game loop will utilize, but doesn't necessarily have anything to do with your engine design. It would be useful for us if you could give us some background on what sort of programming experience you have so we know how to answer your question best. From the way you explained your question, I feel that it might not be a good idea for you to jump right into designing a PSP homebrew engine. Start simple with (like you said) displaying sprites and moving them around the screen. Perhaps try some basic animation, projectiles, sound, etc... For a beginner I feel that it is much easier to start with the game itself, then as you are coding you will decide what features need to be in your engine (draw functions, collision functions, physics, particle effects, etc...). Let us know how you are coming along with this.
Re: Game Engine Question
Posted: Mon Sep 14, 2009 10:54 am
by MarauderIIC
hurstshifter wrote:it might not be a good idea for you to jump right into designing a PSP homebrew engine
I gather that this would be because it's not very friendly, but I might be wrong.
Re: Game Engine Question
Posted: Mon Sep 14, 2009 10:56 am
by Viliasas
Hi,
thanks for your reply... Well, when talking about my programing experiece - it's not too good. Basicaly i'm studying IT Engineering at the local university (in Lithuania). There we aren't learning any complex programing, so i just have some basic knowledge in C++, Java, Assembler.
I know that you are right, that game engine is too difficult for me, but i really don't want to make some ping pong, packman or tetris remake. In my opinion i would like something that i could improve over time and i could learn by doing it.
P.S. About "game engine" term - you are right. I just want to make RPG type game. Where something moves on a map, you can talk with it and etc.
Re: Game Engine Question
Posted: Mon Sep 14, 2009 10:57 am
by Falco Girgis
MarauderIIC wrote:hurstshifter wrote:it might not be a good idea for you to jump right into designing a PSP homebrew engine
I gather that this would be because it's not very friendly, but I might be wrong.
It's really not.
You should totally start with something like SDL. Get your picture to "move" and "change maps" on your PC, before you think about writing code for and debugging on foreign hardware.
Re: Game Engine Question
Posted: Tue Sep 15, 2009 12:38 am
by Viliasas
Well, even if i would do it in SDL, i still don't know what should happen in the game... In this topic i didn't asked what programing language to chose and for what to write with it :D So, could anyone tell me what happens in the "game engine". From one example i see that i need to initiate screen, graphics, check if something is pressed and do accordingly to it, then i need output information to screen. Correct me if i'm wrong...
Re: Game Engine Question
Posted: Tue Sep 15, 2009 4:17 am
by M_D_K
I still can't get psp-gdb to connect to my psp ;/
So I opt for the best debugging practice in the world, Careful thought and code peppered with printf()
Re: Game Engine Question
Posted: Tue Sep 15, 2009 4:24 am
by Bludklok
Viliasas wrote:I know that you are right, that game engine is too difficult for me, but i really don't want to make some ping pong, packman or tetris remake. In my opinion i would like something that i could improve over time and i could learn by doing it.
The games that will benefit you most are the little ones like ping pong, packman, or tetris. Fact is, if you try to create some big RPG engine when you really don't have the concept of engines, sufficient C++ language, and aren't too familiar with the SDK your using you're going to get knocked back on your ass. Save yourself the time and frustration and just start out small.
Viliasas wrote:Well, even if i would do it in SDL, i still don't know what should happen in the game... In this topic i didn't asked what programing language to chose and for what to write with it :D So, could anyone tell me what happens in the "game engine". From one example i see that i need to initiate screen, graphics, check if something is pressed and do accordingly to it, then i need output information to screen. Correct me if i'm wrong...
The while() loop of a game engine would go primarily like this:
1) Get input.
2) Do stuff.
3) Draw stuff like images.
4) Repeat
I'm not too sure of how many loops are run in a second (which mainly depends on the system hardware if you don't specify a set game speed) but it's run multiple times each second.
Re: Game Engine Question
Posted: Tue Sep 15, 2009 9:31 am
by Viliasas
Thanks
Going to try to make something out of this...