The greatest solution is: Don't make text games...
Quote:
The assignment is simple, to make a game.
... Unless you can make a narrated game, like:
"- Do you want to go down the spooky hollow?
1. Yes.
2. No."
*yes*
"- You arrive at an old warehouse next to a great field.
1. Try to open the front door.
2. Enter into the warehouse's cellar.
3. Search the field."
That would be extremely easy!
If your assignment doesn't require a graphical game at all, I highly recommend you just complete your assignment using the approach above -- especially if you're eager for getting your assignment finished on time. That way, your learning curve can be much more managable. You would be much more likely to thoroughly experience new concepts as your teacher really expected you to, rather than finding yourself wasting time in a frantic and rushed (and potentially harmful) experience. You might not think *narrated* games are much fun, but just do it anyway...
Quote:
Considering that i've yet to have a course on OOP, what option would you suggest? Are there any API's out there that are relatively easy to use for someone with little to no experience with OOP?
OOP doesn't matter much, but you at least need to understand the concept of, well... I forgot the name for it, but guess what I'm doing here:
Code:
struct Banana
{
float ripeness;
int monkeyValue;
bool edibleByCodeheads;
};
(this isn't considered OOP at all, in fact, C++ isn't exactly considered an OOP language anyway)Now, have a look down here to observe the basic concepts behind utilizing this "Banana"
structure that I defined above:
Code:
int main()
{
Banana sexyBanana; // This is called an 'instance' of the "Banana" class.
sexyBanana.ripeness = 83.5f; // This is called 'member access' to the "sexyBanana" instance.
printf("Ripeness of the sexy banana: %f\n", sexyBanana.ripeness);
// Pause at end.
getchar();
return 0;
}
Can you guess how the basics you've (hopefully) learned from that introduction may be helpful for game progammers? Just for example, imagine an array that describes the scenery & objects that compose a scene in a graphical game. What would you put into that array? Well usually, you want to describe the location of these objects. It is also a good idea to track the assets which are used by such objects to compose the scene, such as which picture each object is associated with (also known as an image, and especially in terms of computer graphics and game development: a 'sprite'). Here is a very basic example of how you might do that:
Code:
struct Object
{
// These coordinates store the position of a scene object.
float x;
float y;
// The "spriteIndex" remembers which picture you have loaded into your game that is drawn by an object.
unsigned int spriteIndex;
};
If you're wondering what the "spriteIndex" member is for, imagine the activity of loading all the sprites (pictures) into your game and tracking what they are. In a very simple implementation, a way to handle & track your sprite assets is:
Code:
unsigned int bananaSprite = LoadSprite("assets/sprites/banana.png");
// Notice how LoadSprite() returns an unsigned integer. This is in fact an array index (i.e. arrayValue[index] = value;)
Tip: If you are wondering where "LoadSprite" is from, please get used to the notion of
things in example code that imply generic features which you may or may not need to create yourself. So, it is helpful to remember when you're learning how to program to understand how you should read code you find on the internet or in books, and recognize between example code (code that is just meant for illustrative purposes) and real, practical, useful and compilable code.
Quote:
Alternatively, you can switch to a simple graphical library to draw your output, like SDL.
SDL sucks horse carrots. I've never used Allegro, but I have looked at the code behind some of it examples. I think it looks much more preferrable to SDL, especially for beginners. Allegro gets my nomination, though I've never really used any of these "beginner level game programming libraries."
Just going to hell with it and starting raw with OpenGL or Direct3D for-the-win!Here is a link to Allegro:
http://alleg.sourceforge.net/DrDima, if there's any chance that you aren't satisfied with our suggestions and you would rather do a little research yourself, maybe this wiki-page is a good start to find resources:
http://content.gpwiki.org/index.php/Game_EnginesIf you still aren't certain about where to go from here, please don't be afraid to keep hitting us with your good questions!
Quote:
i've yet to have a course on OOP
Hey!!! School sucks. Teach yourself. Life is much more fun that way. I never knew I could be so interested in *boring* things like anesthesiology, or ancient european history (think stonehenge and barbarians)... or... well a lot of areas of history (in most major geographical regions and almost any time period) -- and I used to think history was so boring. It all takes a self-driven engine to learn! Please be aware that coming to forums like this one (the Game Programming Wiki's forum) is considered a great way to become "self-taught." I mean, it's not formal education, but at least you're not by yourself! So stay here!
