Coding a game from scratch
#1
Posted 15 November 2007 - 01:11 AM
Im a new member of this board, have read posts for a long time but never posted. My coding knowledge is newb. I know C/C++ but no graphics programming as of yet. I have done some games in text mode and yes, I must say it, ASC-II graphics because I was borred :) Im probably not a total newb but when it comes to 32-bit programming like win32 I am and need some help. I have recently come over some spare time and would now like to refresh and learn game programming. Here is my idea.
I want to make a small simple game to get into the swing of it all. Its a space ship shooter game. Think of Galaga but in 3D. Instead of a Vertical scroller the objects move in a Z axis. So if an asteroid chunk is comming towards you the object begins out small and by the time it reaches you/your ship its say 5 times larger in size so you get the feel of travel.
Here are some questions whoever has time to answer or if your borred and feel compelled to help out. Anything is mega appreciated.
Language of choise : C++ via Visual C++ 6.0
1. Do I use DirectX or would OpenGL be easiest to start with.
2. I know Im going to have to use Win32 skills that I lack but bought a ton of books on the subject.
3. Should I, as a learning stage, program from scratch or find a good freeware game engine.
Many thank yous in advance whoever has some spare time on their hands to answer some questions.
Regards, Mike.
#2
Posted 15 November 2007 - 01:44 AM
2) it is an appropriate step up from where u r now.
3) like u, i work on games for fun in my spare time. been doing this for years.
4) i'm now working on steering behaviours of autonomous agents.
5) i use rectangles, circles and lines in my 2D simulation.
6) not great graphically but it works for me.
#3
Posted 15 November 2007 - 02:36 AM
2) the very popular "geometry wars" is more or less a souped-up asteroids clone.
#4
Posted 15 November 2007 - 03:12 AM
Coredev said:
Be careful knocking text mode graphics around here. :ohmy:
http://www.devmaster...ead.php?t=11223
I just recently won this little ASCII game for the first time after 15 years or trying!
#5
Posted 15 November 2007 - 05:18 AM
Hunguptodry, gonna take your recommendation and just do it plain and simple to start with.
Thx for the info.
Regards, Mike.
#6
Posted 15 November 2007 - 10:45 AM
http://www.colossuse...GameEngine.html
I've kept it all as simple as possible, and it should be very easy to get your head around it. Even if you do everything yourself from scratch, it can be good to have something to look at or nick stuff from :-)
It's 2D of course, but all good things are :D
- www.mattiasgustavsson.com - My blog and current projects
- www.rivtind.com - My Fantasy world and isometric RPG engine
- www.pixieuniversity.com - My Software 2D Game Engine
#7
Posted 16 November 2007 - 12:55 AM
Coredev said:
BTW, would you be interested in encapsulating some copper effects into shared libraries so they could be used in a modern Amos BASIC sequel? I'm sure we could use some help on the Amos compatibility extension of Mattathias BASIC if you don't mind putting some of your demo coding experiences to use.
It wouldn't be a paid effort but Sidewinder52c, the guy who's doing the classic AGA chipset Amiga version of Mattathias, has never coded a copper-list before and is pretty involved in trying to make an extensible parser after having to start the whole project over mostly from scratch (after having worked for several years' worth of spare time on a "fixed function" parser that couldn't be extended).
I'm in charge of doing the SDL and OpenGL version so I could help you brush up on how to do those same special effects on a semi-modern graphics card.
If you're interested, PM me or post on the Mattathias Yahoo group linked above.
#8
Posted 16 November 2007 - 01:31 AM
Regards, Mike.
#9
Posted 17 November 2007 - 04:13 PM
#10
Posted 17 November 2007 - 05:47 PM
DirectX 10 is only available for Vista but OpenGL 2.x and 3.0 will still work on XP and will support many of the same features as DirectX 10 (including geometry shaders in the case of OpenGL 3.0).
Microsoft really dropped the ball when it came to Vista and DirectX 10. And the fact that OpenGL works on Macs, Linux boxes, and modern Amigas is just an added bonus!
#11
Posted 17 November 2007 - 08:36 PM
Coredev said:
1. Do I use DirectX or would OpenGL be easiest to start with.
2. I know Im going to have to use Win32 skills that I lack but bought a ton of books on the subject.
3. Should I, as a learning stage, program from scratch or find a good freeware game engine.
Hey Mike,
I use Windows and program 2d and 3d games in C++. My suggestion would be to take a look at SDL (www.libsdl.org) for a simple way to get access to various hardware, especially video. SDL allows you to create 2d games, but also sets the stage for an OpenGL context. I do not recommend DirectX, mostly because it is non-portable, but it has some ugly syntax and bad history too (Thanks a lot, Microsoft!). With SDL and/or OpenGL, you'll avoid any nasty Win32 programming as well. My preference has been to write games from scratch (on top of SDL), but it's up to you to try a game engine.
Feel free to email me with any more questions,
Jonny D
#12
Posted 18 November 2007 - 02:58 AM
#13
Posted 18 November 2007 - 07:29 PM
GrimFang4 said:
I'll second that with the following caveats: SDL is written in C rather than C++ and makes more sense in C than C++. Sure there are wrappers for it to be used with C++ but they are just memory-consuming wrappers. Also, it's license is LGPL so you can only dynamically link closed-source software to it legally.
I'm thinking of switching some of my future projects to SFML instead of SDL. It has a few advantages over SDL: It is written in object oriented C++. It has a more liberal ZLib/LibPNG license so it can be statically linked without having to open up the source code (just be sure to credit the author in the readme files). Has fewer library dependencies. Doesn't include music player in memory (useful if you are streaming audio for all of your music or, like me, have a self-running music format).
The main downside to this switch is that SFML is a much newer (read that as buggier) library than SDL and may not have as much 2d functionality as what SDL 1.3 will have when it comes out. Since they are both open-source you can look at the source code and figure out what the problem is if you run into one.
#14
Posted 19 November 2007 - 05:57 AM
You're right about the licence. That's kind of a drag sometimes, but I personally don't mind a couple of .dlls. On certain operating systems (e.g. MacOS), you can hide those, though.
If you're not going to rebuild SDL, any dependencies don't matter. SFML looks interesting, but yeah, it's pretty new. SDL has been around since 1999 or earlier, has a huge base of users (including major games like Neverwinter Nights), and it's getting on towards a 2.0 release (1.3 will become 2.0 since it's such a major set of changes). Historically speaking, SDL is _the_ reason gaming on Linux has gotten so far. SDL 1.3, which you can download already, doesn't include any really new functionality for 2d, but it does work much better with hardware acceleration than previous versions. It gives you hardware accelerated rotation, mutliple windows, and such on top of the already possible accelerated blitting. I'm excited about some of the other things, like multiple mouse input, which will make its way into my next game. SDL is very good with input and events. The SFML site says that it only supports up to two joysticks, but that's not a problem for most games.
#15
Posted 24 November 2007 - 04:13 PM
As for SFML, I like that it uses OpenGL for everything just like SDL 1.3 but has all of the 2d stuff hidden in the sprite class. Likewise, OpenAL doesn't have embedded MikMod music player routines in it so it should be streamlined in ways that SDL_mixer isn't.
One of my projects is to make a clone of Amos using emulation for all of the Amiga graphics chipset features used. I'll probably make a backend for both SDL and SFML since I may need to embed the libraries into the executable for some of the home-brew console development.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











