How would you make a game?
-
Guest
How would you make a game?
The tutorials list some practical game uses for code - e.g. using 2D graphics to create a HUD. Simple enough. I'm sorry if this question sound moronic though, but how would you actually create a game? What I mean is, keeping track of health, magic, items aqquired, dialogue completed with NPCs, dungeons completed, etc.? Would you just use variables like on/off switches and then act appropriately?
-
Robomaniac
- Posts: 602
- Joined: Sat Aug 23, 2003 2:03 am
- Location: Pottstown, PA
- Contact:
Sorry for being a bit blunt, but if this is your first game, I would suggest tetris, or pacman or something, not an rpg. If this isn't your first game, i would still suggest starting with something smaller than this, maybe a simple FPS or something, then slowly increase the complexity.
-- The Robomaniac
-- The Robomaniac
Here are a series of tutorials I wrote to help the beginning game programmer: (using win32/OGL, not IrrLicht)
http://www.skyesurfer.net/keless/vgp/
once you've got that down, you might check out the source of my tetris game:
http://www.skyesurfer.net/keless/IrrLicht/tetris/
http://www.skyesurfer.net/keless/vgp/
once you've got that down, you might check out the source of my tetris game:
http://www.skyesurfer.net/keless/IrrLicht/tetris/
a screen cap is worth 0x100000 DWORDS
-
Guest
-
deoboropk
Gaming
Hey.
I have been making games since i was 5years old. now i am 14 i am quite an expert.
If any one needs help like game makeing and stuff please come to my website
www.sams-adventure.cjb.net
I have been making games since i was 5years old. now i am 14 i am quite an expert.
If any one needs help like game makeing and stuff please come to my website
I think therefore I am
-
IrrLicht Newbie
There is no rigth way to make a game
Well, answering the original question, I say I have some game programming experience myself, and now IrrLicht gives me the chance to create a decent game (for the first time), though Im still some time from completing one. Havign said this, creating a game is not like an exact science. Instead, you need to know what do you have and what you can do with functions, etc. First you need to see what IrrLicth functions can do, and once things are fairly clear to you, you may begin thinking up some algoriths of your own to create the game.
I Often do these kind of stuff, though they might not be elite for the eyes of some oether people:
if(gameLevel == 1) {
// Here I use functions to draw level one, add guys, text, comparisosn, etc
}
if(gameLevel == 2) {
// Here I use functions to draw level two, add guys, text, comparisosn, etc
// I would normally reach here after a function on level one made
// gameLevel equal 2
Here I coudl add a function, and if, or wathever,
// to make it gameLevel = 3; etc
}
if(gameLevel == 3) {
// Etc
}
This is a rather simple way of doign things, but its good to try. Right now I am working on an external editor (based in Notepad, lol) to make game making simpler (yeah, with IrrLicht). Im goign to tell you what one a game creator expert told me: games are not really different from other software. You only need to know the functions to draw things, know their actual position (so you can compare the positions of two guys, for example, and act accordingly), etc. Thankfully, IrrLicht makes it really easy for us
All we would have to do on our own is to implement and join together all these functions in an actual game. You can use the on/off switches if you like, too. Whichever fits your needs, man
I Often do these kind of stuff, though they might not be elite for the eyes of some oether people:
if(gameLevel == 1) {
// Here I use functions to draw level one, add guys, text, comparisosn, etc
}
if(gameLevel == 2) {
// Here I use functions to draw level two, add guys, text, comparisosn, etc
// I would normally reach here after a function on level one made
// gameLevel equal 2
// to make it gameLevel = 3; etc
}
if(gameLevel == 3) {
// Etc
}
This is a rather simple way of doign things, but its good to try. Right now I am working on an external editor (based in Notepad, lol) to make game making simpler (yeah, with IrrLicht). Im goign to tell you what one a game creator expert told me: games are not really different from other software. You only need to know the functions to draw things, know their actual position (so you can compare the positions of two guys, for example, and act accordingly), etc. Thankfully, IrrLicht makes it really easy for us
All we would have to do on our own is to implement and join together all these functions in an actual game. You can use the on/off switches if you like, too. Whichever fits your needs, man
-
mimir
Yeah I like Newbie's aproach.
Just do what you like... there's no right or wrong. It's just a matter of how difficult things will get if the code gets bigger.
Personally I'd create a class like
and another like
and then derive some real Level classes from 'Level'
This way You'll have for each level its own file. You can easyly produce new levels by adding a new class.
the only class that must know about all levels is the LevelFactory.
You can extend the interface (the class Level) to your needs and play around with switches etc.
And if You begin to like code design You could even read the book "Design Patterns" by Gamma,... or
http://www.gamedesignpatterns.org/
I think learning by doing is very good.
After all coding is FUN!
mimir
Just do what you like... there's no right or wrong. It's just a matter of how difficult things will get if the code gets bigger.
Personally I'd create a class like
Code: Select all
class Level {
public :
virtual bool switchLevel() =0;
virtual void processStatistics()=0;
}
Code: Select all
class LevelFactory(){
public:
Level* getNextLevel(Level* currentLevel);
}
Code: Select all
class Level1:public Level{
public :
bool switchLevel(){
return points>=MIN_POINTS_FOR_NEXT_LEVEL;
}
yada,yada
}
class Level2:public Level{
......
}
in Your game You'll have:
//init
LevelFActory factory();
Level* currentLevel;
....
currentLevel=factory.getNextLevel(NULL);
//loop
while(device->run()){
....
if(currentLevel.switchLevel()){
currentLevel=factory.getNextLevel(currentLevel);
}
currentLevel.processStatistics();
....
}
the only class that must know about all levels is the LevelFactory.
You can extend the interface (the class Level) to your needs and play around with switches etc.
And if You begin to like code design You could even read the book "Design Patterns" by Gamma,... or
http://www.gamedesignpatterns.org/
I think learning by doing is very good.
After all coding is FUN!
mimir