Sign in to follow this  

How do I start ?

This topic is 4398 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi! I'm thinking about writing a remake of an old DOS game. However I haven't played around that much with graphics and sound before. I have basic knowledge of how 3D graphics works (linear algebra, goraud shading etc.). I'm also fairly aquainted with, C++ and Java. The largest projects (in terms of code) I've done before this is a Yahtzee game in Java and some router logic (P-queue, tables + other abstract data types). I was thinking abóut doing the graphics in OpenGL and having SDL for an interface. The game will be in 2D, so maybe OpenGL is overkill ? I want the game to look nice. Problem is that I'm not sure how to begin. Do I start with the graphics/engine or do I do the "meat" first? I'll probably split it up with a few milestones along the way, but I'm not sure in what order it would be best to do the parts in?

Share this post


Link to post
Share on other sites
Welcome!

Sounds like you're no stranger to programming, so you don't need to worry about that end. :)

Everyone's got their own take, but I personally believe in getting the graphics up ASAP. If you can visually see things happening, then I believe that you won't give up finishing the game.

In my experience, the quickest path to an uncompleted project is spending oodles of time on the "backend" stuff that you don't see.

I'd recommend just making really small project "targets" that you can hit with almost every compile of the project. Making them small and minute enough, that it feels like you're progressing!

ie.
target 1: get opengl device up
target 2: get text up
target 3: put some simple state mechanics in
target 4: use the text to display which state the game is in (create a "cheat key" to flip through them)..

etc..

Just my 2 cents..hth,

Share this post


Link to post
Share on other sites
Ok, so first stop is learning to draw pictures in OpenGL and SDL ?

Share this post


Link to post
Share on other sites
I agree with what TheOther said, Seeing is Believing. If you can see your project coming together then you believe that it will come together.

Also, if your game is something like an RPG that has maps and characters to load, I would reccomend making tools to make your maps and come up with a way to load that into your game. That way you can quickly create better maps and start "seeing" your game come together and it really gets you motivated to finish.

The tools don't really have to be very complex. You might even be able to load in a tiled map from a bitmap and have the pixel information be tile information.

Share this post


Link to post
Share on other sites
Take a look at Photon for a well-designed engine. You can get some ideas for your engine and you might even end up using it for your game.

Share this post


Link to post
Share on other sites
i will tell you this from a prespective of someone that just trashed his last project , i became very bored every time i needed to add something to the game i would need to put it in the header then in the implemention then in the main game file , it was so frustrating , so try to avoid complex code in your game , what your saying is do you add the "meat" or the Graphics , first things first Graphics is a very vauge word , basic graphics handling is neccessary before starting just to do the basic stuff then you add the real game then make it look sexy so here its
1. Basic Graphics
2. Game Routines
3. Advanced Graphics

First you draw the grenade , you throw it , you blow it up.

and try to write every thing you gonna do in the game down belive me this is really valuable advice, cause at lots of time you wont have any idea on what to next , try as much to avoid complexity it kills projects and most of all HAVE FUN.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
My two cents...
Id work on the basic engine, Load the images, display the images and play some sounds, then id start to add in some game elements, then add the finishing bells and whistels.

One thing that will help you out in the long run is to plan before coding, that has saved me quite a few times, lay out your engine/game, then code it, it will hopefully prevent the discouraging rewrite of something.

And lastly don't give up, yeah thats cliche.

Share this post


Link to post
Share on other sites
I agree with Jemburula. Unless your doing some whacky rotations of images or other things that a DOS game probrably didn't use, you'll find it easier to use SDL alone.

You sort of have to compromise between graphics and the 'meat' code. Neither is much use without the other, so you'll just have to do whatever works for you and your project. Starting with graphics is *probably* the way to go, but who knows.

Share this post


Link to post
Share on other sites
Quote:
Original post by Jemburula
If the game will be 2D why not just use SDL and forget OGL for now?


Mainly because I suck at drawing on the computer and I'm not sure how to do my own art. I didn't know SDL provided graphics. I thought it was more of an interface to the hardware?

Quote:
I agree with Jemburula. Unless your doing some whacky rotations of images or other things that a DOS game probrably didn't use, you'll find it easier to use SDL alone.


Not whacky rotations, but I want to create a better looking DOS game with nice explosions and a dynamic terrain. I'm not aiming for something with Oblivion's graphics, but I don't want EGA either ;)

I'm going to look into SDL and the possibilities of it. No point in using OpenGL if I can do the same effects with SDL ;) I want something that's easy on the eyes, not look "old" and can make one go "ooooh nice one!". I'm not sure if it's realistic with my skills, but the whole point is doing something and complete it. I'm doing this for fun and to learn some ropes along the way.

[Edited by - MdaG on January 2, 2006 7:25:04 AM]

Share this post


Link to post
Share on other sites
Quote:
Original post by MdaG
Quote:
Original post by Jemburula
If the game will be 2D why not just use SDL and forget OGL for now?


Mainly because I suck at drawing on the computer and I'm not sure how to do my own art. I didn't know SDL provided graphics. I thought it was more of an interface to the hardware?

Quote:
I agree with Jemburula. Unless your doing some whacky rotations of images or other things that a DOS game probrably didn't use, you'll find it easier to use SDL alone.


Not whacky rotations, but I want to create a better looking DOS game with nice explosions and a dynamic terrain. I'm not aiming for something with Oblivion's graphics, but I don't want EGA either ;)

I'm going to look into SDL and the possibilities of it. No point in using OpenGL if I can do the same effects with SDL ;) I want something that's easy on the eyes, not look "old" and can make one go "ooooh nice one!". I'm not sure if it's realistic with my skills, but the whole point is doing something and complete it. I'm doing this for fun and to learn some ropes along the way.



OpenGl will render faster than SDL, along with more options ( hardware alpha blending, not using pixel co-ordinates as draw co-ordinates, rotation and scaling... ) SDL will draw bitmaps and blend them, but beyond that you will need to get routines to do any more. SDL may be easier, but it doesnt take to much to turn an SDL image (or SDL_Surface) into an openGL texture, and use openGL for the rest...

Share this post


Link to post
Share on other sites
Quote:
Original post by Jemburula
If the game will be 2D why not just use SDL and forget OGL for now?


@MdaG: Depends on your DOS game I guess.

I personally prefer using OpenGL+SDL as you get all the benefits of the graphics hardware (as previously mentioned by @rip-off).

ie. I can quickly render some cubes and stuff in OpenGL just by a few vertex definitions. Whereas with sticking to SDL, I'd need to put together a cube bitmap,etc.

I'm personally not an artist :)

hth,

Share this post


Link to post
Share on other sites
I guess I'll have to play around with opengl and sdl before I make any decisions about it. I've never written an engine before and I only have some assumptions about how an engine works (and is). Closest thing I've been to using an engine is Java swing (which I wouldn't call an engine). So I still have some research to do :)

Maybe I'll just settle for an existing engine. HGE looks interesting :)
Too bad it's Windows only :( Still, I'll take a closer peak.

Share this post


Link to post
Share on other sites
HGE uses DirectX 8.1 so you are only on Windows. HGE was abandoned by its creator for over six months and now has been open sourced, so its future seems uncertain. I have witnessed and seen graphical lags with ATI cards running the HGE demos. Now that it is open sourced, it would be nice if it was cross platform.

If you stick to windows, you have your choice of PTK and PopCap too. Don't forget Allegro and ClanLib. Check the Game Programming Wiki for libraries and engines.

And don't forget Photon, like I mentioned before.

Think about what you have to do and what middleware can make it easier for you.

Create Window
Resource Management
Drawing Sprites
Tile Map
Sound
Music
Drawing Text
GUI
Particle Engine
Animation
Game States
Special Effects

Also think about how an engine might limit you.

Share this post


Link to post
Share on other sites
I'm still dangerously low on experience with graphics to estimate what engine would be good to use for a project.

Share this post


Link to post
Share on other sites
Using ready opensource engines/libraries will help you advance faster and will keep your motivation high. Reinventing the wheel will likely result in buggy small features and the end of motivation. Before you start writing anything look for some ready code that has it done.

For example:
- GUI: check GUIs, make sure they are custimzable and easy to learn (I recomend CEGUI - full featured and many tutorials)
- particle "engine": havent explored that one yet... if you find a good one let me know!
- Sprite class: Kyra seems nice... now the HGE is opensource you may want to "steal" its sprite class.
- debug code: MMGR locates memory leaks, a simple profiler will help you check performance (superpigs engenuity articles has one), use ASSERTS macros and such
- Collision detection: there are many libs for that
- XML and configuration files: for example tinyXML, SDL_config
- Data structures and algorithms: of course use STL's vector/list/string but before you start implementing a datastructure or algo look for a ready one.
- etc...


I recomend the following order:

1) setup SDL and openGL for 2d,
draw a triangle, have a game loop, use keyboard to change color/zoom/angle
2) use SDL_image to load gif/jpg and use them as textures for polygons
3) use a GUI. make a secret debug panel(pops up when secret key pressed) in it you can print all sort of debug stuff, maybe get commands and act on them (for example: commands such as "load level.001", "insert sprite")
4) Make a sprite class, with animations (walk-left, walk-right). Delete the images and triangle from levels 1 and 2 and put a sprite that moves left and right as you press the keyboard.
5) You are ready for creating a game! Decide on the design (the more effort here the better) and read tutorials for the genre of the game.


Iftah.

Share this post


Link to post
Share on other sites
Sign in to follow this