Simplest of games for beginners!

Started by
2 comments, last by Crazyfool 17 years, 7 months ago
Hi all, can you guys help for simple games in C++. Without graphics/sound please. Just simple implementation and making a decnt program[smile]. PS: also some games involving graphics/sound and knowledge for making them as well[wink]. I am planning to do a simple 2D game as my project and try to complete it till march next year
Advertisement
"Guess the number" would probably be the easiest to begin with if you're a complete newbie and need to get a grasp of the language.

A simple text rpg to learn about finite state machines probably wouldn't be too hard either. (hint on how to start, if you need it).

Having those basic skills, you probably can dive into graphics. (SDL is easy to work with) and get a feel for your first, turnbased, game loop (read input, update game, draw).

After that, you could go into realtime and write pong and/or tetris. Maybe extend those with sound.

Then writing a platformer would for example teach you basic AI and collision detection. Add the possibility of loading levels from file if you want to make it more advanced.

When you get to this point, you're probably capable of writing a top-down rpg with inventories, monsters, stats and whatnot.

After this, you maybe could begin dipping your feet in 3D if you'd want to...

Cheers, and good luck.
-LuctusIn the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move - Douglas Adams
Thnaks for reply. yes I am onw looking for simple games without graphics/sound atm. rpg game using different looping statements and conditions?

how will the game end and winner looser be decided, or like a puzzle game. I would like to know starting and ending of game. how should I make it?
Ok, well first steps in making a game is having at least a plan in where ya headed. For complex games, it is VERY important to have a document that keeps things organized. This is not only useful for when working with a team, it helps you keep track of what you need to do.

Anyway; making a text based rpg can be very rewarding, as the above poster suggested.

How you'd start is including the libraries (string, iostream, fstream, etc).

Then, you can start in one of many different paths, but what I like to do is make the classes early on. If you dont know how to work with classes, go learn about it, ottherwise, you can make a few simple classes representing the player, items, rooms, monsters. You can make your rpg a lot more detailed later on, but for now only focus on a few simple things. I recomend creating a seperate header (and source file if you prefer it) for each class, for organization. Dont forget to include those files in your main source, below the standard headers and above the int main(). Some things to consider for your classes are name, level, exp, weapons, health, etc.

After you fdo that, you can start on the loop part with the functions that help organize your code. the functions will be things such as a combat sequence, a travel handler and more.

I actually think I'll write a detailed article about all this, but for now I hope thats good enough to get you started.

One thing to consider for the room class is to include a method for finding out if a plpayer can travel north, south, east or west from the room. Some rooms might allow a player to travel from any, and some might only allow for one.

To be honest, I've never done a lot of text based rpg programming, and I did only a real attempt in my early days, but I hope this can still help you out. Good luck!



EDIT: ah, and how the game will end is entirely up to you. For text based rpgs, it is very fun to add puzzles and such to spice things up a bit.. get creative! For instance, you can have a map layout where a player must find their way through a maze of rooms, battling monsters to defeat the evil king who stole the land, or to save the woman, or find the artifact.. anhything!

Another note: do not worry about trying to make the game very deep or even fun at first, because you'll get caught up trying to add things or make things have more depth or seem realistic. First, make a game that works, then improve it.

This topic is closed to new replies.

Advertisement