Crash Course in Game Programming?
Lullabye_Muse asks: "I want to write a game program for an independent research class I am taking at my High School. I have until June to deliver a final product or a good demo. I'm somewhat new to programming and will be doing work at home, and at school (Linux and Windows, so cross platform OSS is best). What is the best language to learn to code games in, and do you have suggestions for any useful sites, on game programming?"
Since you said you are new to programming, you might want to consider taking on an OSS game that is already out there and modifying it to suit your purpose. It will help you learn a lot of the basics of programming, but it will also give a great starting point.
If you are dead set on writing an entire game yourself, best of luck to you. Even for an experienced programmer, throwing together a game (or even a demo) in three - four months is a feat.
Johnkoerner.com
I don't know much, but I know that you'd be best off using a pre-existing game engine so that you could keep development short. Sounds like a fun project. What kind of game are you making?
Nobodies Prefect
Tidbits for Techs Technology Blog
talk to this guy, seems to think he's the greatest game designer of all time.talk to
Don't Blame me if I seem bitter, I'm at work, and the TV only plays soap operas.
to code a game in is the one you already know. Don't bother trying to learn some new fancy languange if you know BASIC right now. Concentrate on the results. You can create a good looking, fun game with BASIC. It just won't be powerful enough to make the next Doom or Half Life.
Languages aside, SDL (Simple Directmedia Layer) is a great library for graphics/sound/network programming. Simple, easy to learn, cross platform. For a class project, it should do the trick.
I'd suggest C++ for programming languages, but that's probably just because it's what I've used for years.
--trb
Since you are doing this in high school, and want it cross platform, it obviously doesn't have to be a high performance 3D super game of awesome. So make it in java.
The design pattern for most simple java games is model view controller. You create an object oriented game model with map, player, item classes etc. Then you create a view, or the gui that looks at this game model and translates the data into graphics or text on the screen. Then the controller portion interprets player input and modifies the game model accordingly.
This is a very good pattern to follow for games, especially for research projects. This is because the game itself usually isn't the research, but some underlying CS principle or algorithm. And this makes very simple cross platform games to which you can attach or embed your real research very easily.
You can also follow this same approach with python, or ruby or even C++. Python might even be a better choice since it might beat java in performance and is used quite often in the game industry.
The GeekNights podcast is going strong. Listen!
Best bet at this point would be to do a mod to an existing game. Unreal Tournament 2004 offers a pretty well documented scripting language and all the tools are included or easily downloaded.
You should definitely get Python and Pygame. Python is both easy to learn and more powerful than most languages. Better yet, there are plenty of example games to study. If you want to do 3D, also get PyOpenGL, and get the started with the NeHe tutorials (Python code available).
The downside with Python is that it can be slow (a fact that can be remedied to some degree, but not entirely, by also installing Psyco). Fortunately, the slowness doesn't matter (unless your aim is to compete with the next id Software engine). I've written a simple engine for a 2D platformer in Python myself, and even with a game logic and collision detection, 90% of the processor time is spent blitting the graphics to the screen. Since Pygame (written in C) does the rendering, using C++ for your game code won't provide any big advantage.
Good luck!
If you're new to programming, and actually want to code this yourself, it's going to need to be a simply game with little to no graphics. Implementing a OpenGL game is NO trivial task. A game I did in Java was the simple squares game where the object is to arrange the pieces like so ..
1 2 3
4 5 6
7 8 *
So I wrote a Java app that would mix up the squares like so
4 7 2
* 1 8
6 5 3
and allow you to move the pieces around via the *blank* square. This still wasn't trivial, especially for someone new to Java, much less programming in general. Not trying to disparrage your efforts, but being new to coding is probably your biggest disadvantage.
We used to program games in Basic, on BBC Micros! First game I ever wrote was a donkey kong clone, and a poor one at that - about 1500 lines of code, max.
Also, back in my day, we had to burn our feet as fuel, we were so poor. And we had no monitors. And we only had one keyed morse-code based keyboards. Bah!
http://www.blender3d.org/t ml
.EXE or web 3d games viewable with its own (small) plugin.
http://www.blender3d.org/cms/Game_Blender.365.0.h
It's a 3d design package, that gives you a game engine, so you could have the graphics part solved, and can worry just about the actual game. I believe you can program for it with python.
It works on MSWindows, GNU/Linux, and other platforms, and it can generate
PyGame is a great starting point. I use C++ myself.
I'm interested into become a multibillionaire. I've already brought a few grand to my high school project but I'm willing to learn more as to how to become a billionaire. I'm very economically gifted because I read the cover of Adam Smith's "The Wealth of Nations" by accident. Could you please give me a few good sites and perhaps hints?
2D or 3D? (Or text or something?) Are you looking to learn basic programming, etc., as would be necessary for a 2D or text game, or are you looking to learn all that plus a 3D api? The answer is different for the two cases.
I've had this sig for three days.
If you're starting from scratch, so to speak, consider using perl or python to create a text based game, I'm biased towards adventure\rpg type text games, but you could also make a more arcadish style game using ascii characters.
It may not seem as sexy as creating an awesome 3d something or other - but you'll have learned a lot if you can make a game that allows for some of the following:
1. users can create a character, which they can save and load
2. the game keeps an inventory of objects
3. users can interact with certain things in the environment
4. the game tracks and displays high scores
I would encourage you to google 'perl games' or 'python games' to see the kinds of things that can be done.
Good luck! Sounds like you'll have some (fun) late nights ahead!
5 months isn't a terribly long time to learn how to program a game. Java is definately the cross platform language to use. Not the fastest in the world, but you're probably not going to be using pixel shaders 2.0 in your first game anyways. But using Java with eclipse or netBeans is probably the best way to go.
My suggestion would be Java, simply because the graphics libraries are pretty decent and it's not hard to write a decent GUI. Additionally, it's cross-platform and would probably help you in the real world later.
But the real question is, how much experience do you have currently? I started programming in HS by doing games on those little calculators (TI-81 to 85 completely self-taught) and enjoyed the experience so much I decided to do CS in college (graduated last year). If I were in your shoes, you may want to think small. Many of the early video games were text-based, many made by one person. Nowadays due to complication, you need teams. So it may not be a bad idea to write something simple and textbased in whatever language. Text-based doesn't need to mean uncomplicated or compromised gameplay; chess, othello, hearts, and dungeon-crawlers were all very popular and I still know people who prefer these over newer games.
-- Political fascism requires a Fuhrer.
Buy a couple of his books. You can find them dirt cheap at discount book stores or eBay.
If you want to go cross-platform, pick up his Java book. You could be writing primitive games in a week.
Check out the community sites garagegames.com, flipcode.org, and gamedev.org to meet other people in similar situations. The forums are really good for getting quick answers to beginner questions.
-m
Without a doubt, Simple Directmedia Layer (SDL) is the best platform for writing cross platform games. It provides a very clean abstraction layer to the high performance APIs (DirectX, etc.) available on each platform. Many people who code only for Windows use it since the API is a lot nicer than the COM based DirectX API. A number of commercial games have been ported to Linux using SDL.
For serious game programming, you need to learn C or C++. I would guess that 99% of all commercial games for the PC are written in mostly C or C++. This doesn't mean you need to write all of your code in a low level language. Even the original Quake used an interpreted language (QuakeC) for the game logic. But almost no language other than C or C++ will provide the speed or memory usage necessary for most commercial games.
If you'd rather concentrate on writing your game rather than learning C, try Python with Pygame. Pygame is a Python binding to SDL. It is fairly fast since all the low level graphics stuff is done using SDL. Certain things will be slower in Python (collision detection, physics, etc.) but most code isn't speed critical anyway. Some things will be harder in Python since it's easier to manipulate bytes and bits in C.
Also check out PyOpenGL if you want to learn OpenGL. It can be used in conjunction with Pygame. I used this when I was learning OpenGL and it's quite nice. The API is almost exactly like the C based API, but it is easier to use. At least one of the popular OpenGL tutorials has been ported to PyOpenGL.
Personally, I started with LogoWriter (though not in French, as depicted on this page).
;)
Then again, I'm old now, so maybe it's not the best example.
That green slime had it coming.
You have to take into account the game content. So if you want a graphical game you will need an artist; if it's 3d you will also need a modeler. If the game you want is simple enough, you can do everything yourself, but be aware of your time constraints. Chose a language you are familiar with and keep in mind that, depending on your (class) requirements, you can find (search sourceforge) a lot of useful third-party libraries that you can build upon.
The easiest and most rapid way is with Flash. Loads of major stuff (importing sprites/moving sprites/collision detection) is taken care of. The langiage (actionscript) is very similar to Javascript. There are millions of easy tutorials/samples online to teach you the basics. Plus swf's are cross platform.
It's not the most powerful tool for making games, but its definitely one of the most rapid.
Many games provide you with the tools to build new levels and even modify the game out of recognition. I've done a fair amount of work-related coding and mapping using the Unreal engines and it's pretty easy to pick up, with a lot of resources online. Unrealwiki and UDN are good places to start. You don't even need to buy the game, as they have released a free cut down version for exactly your kind of project. This has the advantage of not having tons of someone elses code in it so it's easier to get started.
Good luck, I'm sure you'll have a lot of fun.
BlitzMax is cross-platform (Windows, OS X and Linux) and ideal for fast development.
Everyone seems to suggest it would be hard to just jump in. I guess this all depends on your knowledge of programming and logic in general.
I do agree with starting simple. Let's think tic tac toe. The gui would consist of a frame with nine buttons. Each button would call the same method passing in a variable for which player the turn currently belongs to. The gui would then be re-packed to screen with the button now holding an x or o depending on who clicked.
How do you keep track of the logic and actualy find a winner? Everytime a play is called you store it in a two dimensional array of size 3x3. Your array would consist of type int using 1 for player one and two for two ofcourse. After every move logic would be called to check the array for three of either type in a row(this can be optimized later to only check for pieces made by the current player).
Seem too simple? It might, i doubt it if you're new to programing. Check with your instructor. Don't forget if you find that you get this done in record time there are ways to expand this. Think network play with peer to peer, client server network play with checking for cheating, and if you want to get really complicated try to implement 3d tic tac toe(think three boards stacked, you can win going across multiple boards verticle and diagnal).
feel free to shoot me an email at jjshoe gmail
-- botsex is {grep;touch;strip;unzip;head;mount}
If you are new to programming then don't program, as simple as that. Or in this case program as little as possible. So use Game blender http://www.blender.org/ download the blender game demos, and check them out. You can get up to speed in days, also the logic is scripted in python, which is easy to learn. You can get lots of help on the web, on IRC, irc.freenode.net, #gameblender and finally you can get lots of premade scripts/blender files for things like fps (first person shooter) motion etc.,x .php?page=Crystal+Core (#CrystalSpace on irc.freenode.net) or nebula device. But good luck on that.
Keep it simple, it should be one level or two atmost.
Even things like shooting arrows at moving targets are fun, the arc of the arrow etc., teach you physics and for the player it takes time to learn, so they get hooked.
Have a goal, the user at the end needs to do something like rescue a princess or find treasure.
No OpenGL, SDL and C++. Period. That is simply impractical. You'll end up coding the engine and won't have time for art or game play planning.
If you really want to do something like that look at CrystalCore http://crystal.sourceforge.net/tikiwiki/tiki-inde
Slashdot: Tabloid for the nerds. Stuff that doesn't matter.
Hi,
If you want to make some good looking 3d game i might sugest soya. It is a library for python wich is quite easy to learn.
http://home.gna.org/oomadness/en/soya/index.html
When i tried i was able to some good looking demos in a few hours.
It is not suitable for professional games but is perfect for your situation.
btw it runs on windows macosx and of course Linux.
Nigral
Disclaimer: it is my website. I'm not plugging my website's links collection; I just think it might be useful to starting developers. I have a pretty collection of websites useful for game programmers.
Click here and under 'Game Development'...
I highly recommend FlipCode and GameDev.net for game-programming-related content. They have tons of stuff for beginners.
With the information you provided, it is pretty hard to direct you to *the* website you need because we don't know if you wanna do 3D or 2D, Ogl or DX, game genre?
There are also some crappy 'game toolkits' but if you know how to write C++ code, I'd recommend you stay away from these things.
You need to ask yourself one thing before starting to learn to program: Do you want to program games, or just make games? The two are different.
A lot of gamers wind up deciding "hey, I want to program video games!" at some point, without realizing that what they really want to do is make games. If you don't know anything about programming, then you should start by learning the basics of programming and forget making video games for a while. You need to understand the basics first, before you can start doing anything complicated.
If you really do decide to make video games, I'd highly suggest making a couple of really simple games first. Something like hangman, where you just take a list of words and make the user enter letters until they "guess" it. This will teach you the basics of keyboard input and graphical display without having to worry too much about speed or game mechanics.
I'd suggest starting with Java too - maybe grab Eclipse as your IDE, or just use a simple text editor. This solves the "cross-platform" part, and as long as you understand that you won't be creating Quake in it, you shouldn't be too disappointed. (You could, of course, also try using Mozilla.) It's similar enough to C and C++ that you'll should be able to pick up those if later you wind up making a game in C.
But based on your post, I'd suggest learning more about how to program in general first. Take some classes, if you can. Learn the basics. Learn about basic data structures. This will give you the ground-work you need to create a game, as well as help you determine if programming is really for you.
You are in a maze of twisty little relative jumps, all alike.
http://brackeen.com/javagamebook/
If you are going to do 3D game programming, I would also suggest you look at PyOgre. Ogre is a powerful open source graphics engine written in C++. You can download the python bindings for it here. Download it and check out the demos that come with it (the demos are placed in you python directory in a folder called ogredemo).
Linux bindings are not ready yet, but they shouldn't be too far off into the future. You should check the the API Reference and Manual for most starting information, and use the ogre Wiki and forums for most questions you have.
There's been about 100 of high schoolers looking to do their game IS project, and asked questions. The advice is fairly sound.
Don't set your sights too high. Try to keep yourself in a position where you can hand your assignment in at any time.
Tetris is often recommended as a first game because it is fairly simple yet it covers most of the hard parts about writing a game. Once you have it working put in an AI that trys to choose the best/worse piece to fall next.
Don't overlook modifying a current game. Battle for Wesnoth is open source. It is fairly easy to plug a new AI in, and they could use one. In this way you can say you helped without having to do all the work.
Before the locals gather their pitchforks to run me out of town, here's why:
-If you don't know much about programming, even something basic like vectors or graphics libraries could be more than a little daunting. Flash makes graphics dog-dumb easy, leaving you to focus on the logic. A lot of the abstractions (game speed, display parameters, collision detection) can be handled easily, leaving you to learn how to program.
-You can do some OO programming with Actionscript, so you can start with a simple program, and when you get skilled, learn how to extract that functionality into libraries or classes.
-You should be able to focus on some simple programming aspects like game physics, or making it fun (which doesn't have much to do with programming).
-There are a zillion sites out there with bits of code that you can learn from and modify. Granted, lots of it sucks (i.e. it works, but it will not show you how to be a 'good' coder). Offhand, I don't know what to recommend to become a good coder, but at the least, I'd recommend plowing through at least the first 3 chapters of Bruce Eckel's Thinking in C++ (free online). Once you get through pointers and address references, actionscript will look like child's play. Sure, there are sites out there with sample PyGame/Java/etc. code, but Flash code is easier to cherry pick and drop in.
-You have to realize that what you're doing is similar to saying "I've never turned a wrench before, but I want to build a car in 4 months." Game programming can be exceptionally difficult on a number of levels.
Start with something small, like a puzzle game. They aren't sexy, but they are doable in your time frame. The game mechanics for things like tetris or minesweeper are pretty easy to understand, which will allow you to spend more time focusing on other things like the basic inner-workings of a game, how do sound engines work, how to best utilize graphics libraries, etc. Plus with puzzle games your need for hitting 100 frames per second is reduced.
The biggest mistake I have seen people make is they want to build a FPS or a RTS as their first game and they get so bogged down in artwork, tweaking frame rates, AI, etc. that they finally just give up. I almost fell to the same mistake. I thought "turn based strategy game, how hard could that be." It took two years of late night work to get PocketWar to the point it's at today, and many times I wish I had started with something simpler.
Almost all games are written in C++ so if you are looking for experience to apply toward the future break down and learn it. As most the post above say, SDL is also a wonderful thing. There are tons of samples on the net that you can use as references.
Pocket PC Games
gcc (try Dev-C++ on Windows) + SDL + OpenGL
It allows you to write once, compile anywhere. Plus SDL is very easy, straightforward.
If you love torture, rather than the ease of SDL, another cross platform graphics answer is Java + JNI + C++ + OpenGL. I used it for my capstone.
C/C++.
;)
You can use other languages, but these two are what 99% of existing open source software is written in, and thus what you're likely going to find libraries to use. I'm assuming your proejct is due in 3 months, you'll want to link against some libraries
I have come to like irrlicht.sourceforge.net for a graphics library if you need 3D, otherwise use SDL if you only need 2D. Both will work in windows or linux. For games on a short fuse, do windows.
Push all the "great ideas" to the back of your head, for now. They'll only get in the way at this point. Lay out a very basic game design and write it down. Do this both in plain English and in pseudocode. Resist the temptation to dive into feature details; don't go on about how different guns will do different things, and how there will be ten different types of enemies, or how you want the explosions to be green and shimmery. For now, make it simple: one guy, one gun, one type of enemy, one behavior. Note that this doesn't mean you shouldn't design for such expansion, though--be thinking about how to go about building your code to allow all sorts of things down the road, just don't get mired down in the minutae.
Build a basic, working prototype. Get input working; get drawing working; get audio working; get physics working; get collisions working; get interaction working; get menus and user interface working. Use placeholder graphics and sounds for now. Once you've made a good, solid, stable engine, then start working on graphics, audio, backgrounds, et. cetera. A good way to tell if you've reached this point is if you can play your ugly, bare-bones game and enjoy it. If you don't enjoy the game without the flashy stuff, adding finished content will just be like putting lipstick on a pig.
Finally, stick to 2D. You'll learn more about the "game" part of making games if you don't need to wade through all the extra crap you need to know to work in 3D. (It is also much faster and easier to create 2D content than it is to create 3D content, but again--that comes after you've got a solid engine in place...)
Obliteracy: Words with explosions
What do you mean by "game"? If you need to write a full screen OpenGL FPS, then your needs are going to be different than if you're writing a civ-style game, and different still if it's a windowed solitaire game.
For some reason, a lot of people think a game needs to be direct rendered full screen. You task will be a lot simpler if you get out of that mold.
Here's an idea that is sure to get me a lot of flamage: look at Qt. First, it's a very well documented library. Second, it comes with lots of examples, including a tetris clone. Third, you get the QCanvas component, which allows you to do sprite work without a lot of hassle. If you want an interesting research project, then think about writing an isomorphic engine based on QCanvas. Find the old XSpriteWorld++ library that was ported to Qt and you're halfway there.
Don't blame me, I didn't vote for either of them!
You have a fixed deadline of June. You probably have some ideas about what kind of game you want to do. Create a design document. (Gamasutra has had articles about that. Links anyone?) Don't spend a lot of time on it--you don't have to justify this to the suits. You can start rough and refine it later as you get a better idea of where you're going. Start blocking out time estimates for various parts and keep track of it. (It's no good to wake up in May and try to bang it off on the fly.) Have a quick "status meeting" with yourself each week to see how you're doing and what needs to get done in the next week. Set project milestones. Keep a project log. (Hand it in with the project, it'll be good for marks.) If there's extra stuff that you're not good at, graphics, sound, etc, perhaps you can trade favours with friends who are? (Get permission, possibly retroactively. ;) Have a Plan B for when your schedule shows that you'll be finished in August.
Technology comes and goes, but good time and management skills will pay off forever. Too many people in the gaming industry never learned those skills except the hard way, and that results in classic mistakes like continuous burn-mode, completely blown schedules and adding people to a late project. Don't spend more time planning than programming, but know where you're going and how late you are. Always wear sunblock.
Good luck and have fun!
One line blog. I hear that they're called Twitters now.
I also suggest you setup a subversion server and begin using that.
Also don't think you're special. You'll have to design, implement, and test like the rest of us.
I suggest you think of a design *quickly*, and keep it as simple and straightforward as possible. I doubt the teacher is going to grade you on your innovation. If you actually finish this in time, I am pretty sure you will get high marks. Implement this into something that works. Once you get a working core, then add small features one at a time, carefully testing to make sure you haven't broken anything in the process.
Don't forget to document and comment your code as well. Otherwise, you will get lost and won't be able to find your way back.
And remember, have fun throughout the process, and keep yourself interested. Once you lose interest and stop having fun nothing is going to get done.
The radical sect of Islam would either see you dead or "reverted" to Islam.
Duke Nukem Forever
Now you have lots of free time, be sure and point your instructor to the official websites and forums to see how this is coming along.
DarkBasic is an excellent language to begin with. There are a LOT of examples to work from, and it is aimed at beginners.
black art of java game programming
java is a bit more platform independent, but director/shockwave is fairly easy for even those with limited or no programming ability, I wrote a primative stickdeath clone for a college project in about a week.
The Answer
Javascript, CSS, and DHTML are each well documented on the internet, and there are numerous books to get you started, as well.
Finally, before you cry out "but Javascript won't let me create a cool game!" - take a look at this:
Illumia RPG
and especially this:
TRIGLAV RPG
Reason is the Path to God - Anon
GameMaker is a free/shareware development kit that has syntax very simular to C++.
It is windoze only and has its limits, however it is a great starting point to learn about how games work.
It is mainly 2D based programming, but since the release of 6.0, Mark Overmars (its creator) added quite a bit of 3D functionality.
There is even a tutorial for making your own basic FPS, but from what I've seen on the forums, some people have figured out how to do some really cool stuff with it.
DEAD DEAD DEAD DELETE ME
Go with Dark Basic
http://darkbasic.thegamecreators.com/
its a horrible programming language really but for a begining its great because there is a lot of pre made stuff in it so if you wanna be able to knock somthing up quickly its excelent
i managed to put together a simple 2D racing game in about a month soon after i started programming
I think you need to ask yourself whether you are more interested in making games or programming.
If it is making games then I suggest you take an existing game that has a well developed mod community and a simple to use tool. I would check out Neverwinter Nights if you are into fantasy RPGs.
If you are interested in programming then make the simplest game you can think of. I'm talking Tic Tac Toe simple. Perhaps a remake of some early Atari/arcade stuff or something like text-based adventure game. The game in this instance is just an excuse to write code.
The main thing is to start the project with something so simple it might not even seem worth doing. Get it done. Then make it more complex.
Complexity Happens
Programming a game takes more than just knowing how to program. There are a lot of concepts involved. Maybe try outlining the aspects of simple game programming, and then from this outline try to write some code demonstrating an implementation. If you can, from this, end up with a working version of "Breakout", I would say you have learned quite a bit in four months. If you don't get that far, you still have an interesting paper with something to show for your work.
If you go the classic VGA route, you can learn quite a lot about programming and hardware.
1) Video Card Access
Maybe start with a graphic demo by changing your video mode and plotting points to the screen. Maybe write a "line drawing" routine. Perhaps make some of this move by redrawing. You can learn about various buffering/paging techniques while you're at it.
2) Reading from input devices.
Now control the screen contents with a joystick, keyboard or mouse. In fact, do them all. There are plenty of libraries out there, but you might want to learn how to do this at a low level.
3) Programming a Timer
Control your cycles so it runs the same on all machines capable of running the program.
4) Collision Detection
Demonstrate how the computer "knows" when objects touch other objects. Maybe just make a shape that bounces around the screen, or two shapes that bounce off each other.
5) Screen Scrolling
6) AI
No matter how far you get, everything you learn will be useful information.
- Start simple -- do a 2D game, either a simple arcade game or a conversion of a board game.
- Build it incrementally -- game programming actually spans many areas, so don't get frustrated if your first creation isn't a graphical wonder with advanced sound and cutting-edge AI.
- Since you're new to programming and want to do cross-platform, choose your environment carefully. Python and Java
are probably good choices, and both will probably serve you well in a college CS program. Java also offers the possibility of targeting things like web delivery or cellphones if you want to keep growing your project.
- Set achievable milestones -- things that seem impossibly large can be done quicker than you'd think by breaking them into smaller, independently testable units.
On the good side, building a simple game can be a pretty good first project. Simple games are fairly common as 1-2 week assignments in CS courses, so you should be able to tackle one over 5 months. Here's one of my favorites from Stanford, though it may be a little advanced for a first project.: Tetris in JavaGood luck and have fun.
Its actually very simple and you dont need to know Code! Who needs C++ when you can take advantage of the gaming industry's number one method of selling games... Hype. .net version that obviously wouldnt have any corp ties.
Step 1: Buy out the rights to whatever game it is you're making; or be vague and buy out the rights to 'High School Game Development Project' - This will wipe out any competition you might have.(I.e. EA)
Step 2: Buy out URl's such as Planet[insert game name].com, then hire a 'fan' to make a
Step 3: Release a rendered video and laybel it a "working Demo". And if anyone questions it Sue them.
Step 4: Have an 'Exculisve' interview with an online gaming site; GameSpot, IGN, etc.
Step 5: Always use 'When its Done' as your release date. (I.e. http://www.3drealms.com/duke4/)
Step 6: when people question your relase date thow up some screen shots.
Step 6.5: If they suspect too much claim your source code was stolen; this will give you atleast a years worth of spare time.(HL2)
Step 6.5.5: If that doesnt work claim that you're development team is planning to take the game in a diffrent direction to better compete with the current market (I.e. Starcraft Ghost)
Step 6.5.5.X: If none of that works, claim the development team has left the project and turned it over to another group of developers; even if you alone are the development team (I.e. Counter Strike:CZ)
Step 7: announce that you're holding closed beta, and plan on an open beta within the year. Create a beta forum and fill it with fake beta tester post. allow public posting and start a flame war about nerfing this and that(most Trolls dont need to play games to start a flame war)
Step 8: When your teachers or critics/reporters investigate your progress and claim you have not done anything; Sue them. (I.e. Phantom)
Step 9: When you have something of an interactive App, send it to the major gaming sites and magazines as a beta. Provide them a pack of Cds and an installer that takes forever to load, show opening CG and then crash the game. Demand a good review based on what they've seen and demand GOTY or you'll sue. when they question the bugs remind them its just a beta and they will be fixed on release, and give them the exclusive scoop that you've Gone Gold.
Step 10: If/When you do release a retail package pretend that the cross platform versions(mac/linux) are on their way, along with the patches to the many crashes/bugs/crappy servers; at which time you also promote your up-and-comming expansion pack and sequal! (I.e. Blizzard & WoW)
I can't tell you how many games we've prototyped in flash (almost a complete version) and then ported to java for speed improvements, I would realy suggest making the game in flash, go to
www.gotoandplay.it, it has enough info for you to create a game even if you never realy programmed before.
shameless plug, my game: www.flashcrap.com/ufo2.html
you can pretty much do it in anything you're comfortable with. you say you don't have much programming experience, so, ye lords, take the language you are the most confortable with.
/* insert prime example of richard "lord british" garriott here */.
i'm written little crap games in lots of languages. you're NOT trying to write ut2k4 in 4 months here.
in college, i had to write a simple, graphical game in pascal for !insert term of choice!'s sake. i've written simular ones in c, c++, java, ada, etc.
remember, a lot of the old, classic games where done by people in high school just tinkering arround
the only real advice i'd give is to plan ahead and start slow. when nolan bushnell was creating pong, the version released was an early alpha verion. of course, they had so much fun playing it, they realised they were done there . . .
Ignore everything you've read here about graphics and sound libraries, existing game code, existing game libraries, and (for now), choice of languages. If you've never done any programming before and intend to use this as a vehicle to start programming, read this first. Clear your mind, and ignore the details for now.
More important than anything else you can ask right now is to find out what you're trying to achieve. Saying "I want to write a game" isn't specific enough, as humanity has invented tens of thousands of games over the years using all sorts of different mechanisms (cards, dice, boards, pieces, pots, beans, joysticks, vector graphics, role playing, puzzles...). So first, figure out what you want to write.
Next, take the game you want to write, and stick it on a mental shelf. Everyone would love to write Grand Theft Auto: San Andreas as their first game, but it isn't going to happen.
My first piece of advice: don't try to create a new game for your first project. Take something you already know, and know well, and implement it first. Try to pick something that has finite states that are easily describable, and then work from there. Preferably something that has mechanical rules and won;t require too much "artificial intelligence" on the part of the computer (ie: you may know Chess really well, and it has a finite number of pieces, the logic required to decide how to have the computer move is exceedingly complex. Companies like IBM have spent millions trying to perfect such algorithms).
Two classes of games which are typically excellent candidates for first projects are card and dice games. Both are fairly easy to program, as they involve numbers, and have a finite number of possibilities (ie: 52 cards, 6 sides per die). When selecting a game to implement, find something you enjoy, but preferably something that again, won't require an M.Sc. in Artificial Intelligence. Blackjack is an excellent candidate (many Universities use this as a first year programming assignment anyhow, so you'd be getting a leg-up on others if you plan on persuing Computer Science in higher education), as the compter can act as the dealer, and has very specific rules it always follows (requiring no AI at all). Don't worry about how many times the game has already been done -- your goal is to learn programming, and not to create the next Halo 2.
Once you've selected a good candidate game, you need to code the game mechanics before you code anything else. So again -- forget everything anyone here has told you about graphics and sound libraries, or even languages. You won't need these until later.
Continuing with Blackjack as an example, here are some of the things you need ot think about first:
If you can get all of this down in code, you'll be off to an excellent start. From here, you can graft whatever user interface you want atop the "game engine" you've just created. And you'll find you'lll learn a lot about the basics of programming (variables, arrays, functions, objects, random numbers, sorting, comparisons, etc.)
You'll probably want to be able to test things out as you go along, which will require a minimal user interface. To start, you'll probably want to use just text to represent everything (ie: "10 Hearts", "A Spades", etc.).
If you want to do something simple and don't know how to program at all, this is definitely the way to go.
Python is not only easy to learn, it's a great starting language. (enforces proper formatting, doesn't use crazy things like ; line endings ;)
Python.org Beginner's GuideDive Into Python (free on-line book, well written IMO)
and of course the http://pygame.org/ which the parent poster already said.
I would NOT suggest using PyOpenGL if you're new to programming, it's an unnecessary layer of complexity for very simple projects. Use it after you know how to program and have created at least a few simple things already. :)
Anyway, just wanted to give my vote for Python.
If your goal is to get a game into reality, Virtools is one good way to do that. You can still code with letters and words if you want to, but the main way you create a game in Virtools is defining behaviors, graphically linking code building blocks together. You'll have to learn how to use it, and I think you'll need a license for a student copy (think it was in the neighborhood of $99-$125 for a student license), but it can be worth it.
h em/index.html
Hardcore coders sometimes scoff at Virtools because they see it as somehow less noble to use a middleware tool instead of re-inventing the wheel themselves every time. But you still have to know the logic behind every behavior you define, there's no "Create Game" button you can use. The bonus to Virtools is speed. Our lead programmer can make a small game where you fly a jetpack, swing around on vines through trees, or drive a pretty good rendition of a Halo jeep in about an hour. All through definining a few springs, key controls, and a few other behaviors, and a play space.
Got four months? Here's what we made and had commercially ready in four months thanks in part to Virtools:
http://www.adultswim.com/games/powerplay/sweetmay
Granted, we started that project knowing how to use it. But even with the learning curve you should be able to produce something playable and even pretty good. I'm recommending it because it works for us.
Oh by the way if you want to check it out it's at:
http://www.virtools.com/index.asp
Also, Python is arguably a good language to learn programming basics with, and it is also a highly effective tool for advanced programming users also.
Even though Python is not characteristically known for its raw speed performance, this is dramatically offset by the processing power of modern CPU's. Most 2GHz and better processors will run Python well enough that performance simply is not an issue.
PyGame gives you quite a lot of functionality. It effectively provides your main() loop, handles keyboard and mouse events, blits graphics to your canvas, plays music, and a lot more. If you also use the Numeric package then you can do vector processing with pretty decent performance.
I'm using Python and PyGame for my project Space Commander and I'm pretty happy with it so far.
Clickety Click
See, you take one of them OSS Linux games, like one with the funny looking penguins, and you mess with the opening comment and replace the creator's name with yours. Then you mess with the credits and opening screen so that you name it 'My School Project Penguin Game' or something, instead of 'Super Tux Racer,' or whatever, and call it your own. Problem solved.
Many games out there like Unreal, Warcraft 3, have great tools for creating fun games. The scripting languages that come with these games are legitimate programming languages that let you focus on gameplay and not on implementing basic engine components.
Creating a games engine is not creating a game. Using a toolset lets you create a game, while skipping creating the engine.
---
I support spreading santorum
Fortran. Definitely Fortran. Any version will do, but Fortran77 is especially good.
Java is probably your best bet for your requirements. If you go with Java and Netbeans you've got a cross-platform IDE as well (I use it [NB3.6] as my Java IDE [it may be a bit of a memory hog, but I don't know much about Eclipse to recommend it]). Other posts mention the benefits so I won't get all preachy about Java other than to say if you google something like "java game programming" you can find a wealth of examples and articles.
What most everyone is saying here (and what I just hinted at) is do not re-invent the wheel! Most programmers borrow or adapt source code to their liking and this is all acceptable as long as it falls in the realm of public domain or doesn't have some license issue.
Good luck! Keep it simple and don't get too ambitious. Your deadline will find you a lot sooner than you think.
just get the torque engine from www.garagegames.com
Tribes 2 (probably my favorite fps ever) was developed on it, it comes with a good networking package, a great scripting package, and a demo fps game to start you off (with source, so you can see what and how they have done it). It is really a great package. no, i do not work for them, but i have used their sdk, and for ~100 USD, its awesome, you can also demo it.
plus, along with the 100 USD license, you get royalty free rights up to 250,000 USD in sales! (you dont have to pay them any fees for your successful game until it gets >quarter-million successful - at which time you are happy to pay royalty fees).
oh, it has a good physics, texture, and terrain engine too, and takes export models from 3dsmax, blender(open source), and others (i use blender - go OSS!)
check it out! cross platform goodness with networking in a box!
There are a couple of books introducing Managed DirectX and the programming language C#. You can achieve results fairly quickly and your programs will not crash on you as easily as if you used C++. The runtime environment will prevent you from accessing memory outside of array bounds and similar mistakes (In C++, this could mean hours and hours of debugging). And there are no pointers in C# which can easily confuse a programmer and lead to mistakes. It is all type-safe references.
.NET runtime environment is executing C# code fairly quickly. And it applies garbage collection so you don't have to make sure you are explicitly deallocating everything you don't need anymore. If there is no reference to an object anymore, it will be disposed of automatically.
.NET idea and you also get a basic understanding of DirectX, without all the pitfalls you encounter when using C++.
The
The more complex part in 3D programming is understanding the concepts of 3D graphics, coordinates and game physics. So pick a simple type of game first. Something like 3D tetris, 3D Tanks, Tron, etc...
Check it out, you might like the whole
Okay, slashdot crowd - now bash me for plugging a Microsoft product.
Christian
--- Eat my sig.
Don't know if anyone has mentioned it yet, but try going to www.eastcoastgames.com. It gives basic tutorials on how to program in c and c++ using games as examples, refrences. At least give it a look you might find it a very usefull resource.
IMHO, there is no best language for game programming . Whatever langauge/tool you choose is likely to be dependent on what kind of game you decide to develope.
Any way, here are some resources for you.
Articles/Tutorials:
http://www.gamedev.net (If you have time for just one site, this is the one. I suggest you read up the excellent articles under the "For Beginner" section)
http://nehe.gamedev.net (In case you decide that a full fledge game is impossible and decide to just have a demo, here is where you can find all the OpenGL codes you need)
http://www.gametutorials.com/ (Some DirectX stuff)
Development stuff:
http://java.sun.com (Java language sdk and documentation. Though you might need a OpenGL/directX binding if you plan to do 3D stuff)
http://www.bloodshed.net/devcpp.html (An IDE C/C++
, open source. You need to get the compiler though. gcc will do just fine)
I would reccomend Java, because not only is it a platform that has a few good books on creating Java games, but you will learn a 'in-demand' language that would actually be a future job skill. If you don't go with Java I would try C++.
Two years after I first learned to program in GW-Basic through some data processing classes in middle school, I was faced with the challenge to develop something for the required science fair. I had no idea how to develop games, but I knew that I wanted to, and I also knew that I enjoyed fishing at a particular pond near my home. I did about 3 hours of research via the encyclopedia to learn about how water alkalinity, water depth, seasonal changes, and tidal changes affect the fish I was going for.
Then I started programming. I had never seen any game code and likely wouldn't have understood it if I did, but 9 hours later, I had a fully functioning text based fishing simulator with a grid based map and bait selector, as well as a menu to change the conditions in which I fished in. I used this project through all 4 years of high school, only changing the poster boards each time, and it got me out of approximately 3 weeks of classes to go through local, parish, regional, and state fairs. I always ranked at the state level.
Here are my suggestions that you may take with a grain of salt (or not):
You need to set a realistic set of goals in front of you before you attempt this project. You do not have to surprise anybody to get credit for this; the main focus is that you learn something through independent study. Take a look at some of the game development sites on the net and read a few of the tutorials to see what you're getting yourself into.
Once you have decided on your project, discuss your plans with your teacher or advisor to see if the project you've picked is realistic for your skill level. Don't get discouraged if they disagree with you, simply choose something simpler and put that project aside for your personal enjoyment. Regardless of how smart you might be, you want something that is manageable. No 3d, no action games.
I would take a look at the source code of some of the simpler games on the net. Some might suggest that you simply take an open source program and modify it, but I can guarantee you that it is NOT the purpose of your assignment to take someone's work and turn it in as your own, no matter how you changed it.
If I were you, I'd focus on a game with a static game board that only changes slightly during the game. Mahjong and Solitare would be my two top choices simply because they both use a game loop and don't require a whole lot of graphic movement.
If you want movement, tetris would be next because it does not require AI; it simply speeds up the game as you drop more blocks. If a 2 player only game is allowed, Pong and Tic Tac Toe are good places to start. Pong will allow you to demonstrate collision detection and Tic Tac Toe is simply an easy game. Breakout might also be a cool game to lay on them. You could also do a rougelike game, which is curses based and demonstrate your knowledge of data structures by giving your little squiggle person some items to fight parentheses with.
Whatever you do, I wish ya luck!
As a high school programming teacher, I'd highly recommend you first work on a trial program. For someone new to programming, a 3-4 month project is complex. Write a smaller, non-trivial program first, allowing yourself to get a feel for the language, structures, techniques, etc. (note: this post presupposes "somewhat new to programming" + "high school" = "start from the beginning." If you're more experienced, good job with the modesty and no offense intended.)
... take a look that the closing credits for those games, it's not something you're going to be doing by June 2006, let alone 2005.
... if you finish ahead of schedule, add features! (practical note: keep version backups!) If you head in a different direction, classic arcade games can provide a wealth of inspiration, ie., Tetris (my pick in this category,) Galaga, Asteroids, Breakout, etc. Note that these are real-time games, which are typically significantly harder, and use more math/physics.
... check your library or ebay if your school can't get them for you. On the free side, there's many great Python tutorials and examples online (python.org, pygame.org), though some code examples are non-optimal. Check out pygame.org's link page, and www.lupinegames.com. Since you mentioned "independent study," I'm guessing there's no programming teacher, so I'd recommend joining a mailing list or web community that can fill some of that role.
Some of my kids want to jump right in with a GTA clone or Zelda or something
Yaztromo, in a helpful comment somewhere above, mentioned starting with Blackjack, with some suggestions for going about that. An ASCII single-player version is relatively simple. Other possible intro projects would include some other card games, Mastermind, Simple Simon, Yahtzee, etc. Keep it simple to start-- graphics, sound, languages, even the computer are secondary here. Test as you go: in the blackjack example, get a card deck implemented first, then add draw/hold, then double, then split. Get something down on paper that a mindless automaton can follow and successfully complete it's task. Then substituting a computer for the dummy is simple, and programming is just translating your instructions efficiently. Once you have a project like this completed, you'll better understand game complexity, allowing yourself realistic goals.
Your final project could be something entirely different, or you could extend your intro project to include multi-player (hotseat and/or online), graphics (very extendable), or AI, which is also very extendable. And there's always optimization, which is infinitely extendable. The nice thing about this path is you know you'll have something to be proud of come June
On the language issue, I teach with Python. It's clean, powerful, and easy to learn, and my kids seem to like it. Use Pygame as well if you go this route. I introduce some of my more advanced students to Java later in the year (last quarter) if they're interested, which some like, some don't. I hesitate to recommend it if you don't have any previous programming experience, especially given your timeframe. However, if you are really interested in Java, consider trying this: the first Java assignment I give is the re-implementation of a previous Python project, typically something like one of the games mentioned above. This would give you a feel for both languages, though as a caveat it would take more time from your final project.
For resources, the Learning Python and Programming Python (O'reilly) books are pretty good
Make something you can be proud of. Good luck, and keep it fun.
Michael
Instead of creating a whole game from the ground up in four months, (Good luck with that btw =) How about take an existing creation, in this case a mud, and build from that foundtation.
;)
First: What is a MUD. Mud stands for Multi User Dimension/Dungeon/Dillusion/whatever. It is a multiplayer, text based enviroment similar to D&D. Players connect to the mud via telnet, and hack and slash away, forming partys, talking to eachother, raiding dungeons, etc.
From a programming point of view, muds are incredibly simplistic. No need for graphics, everything is based in text. Also most mud codebases that are around are already very advanced, and very simple to add to. Take the ROM code base for example. (Based off of Merc, which is based off of Diku..) It already has a game world, basics such as classes, races, note system, channels, magic system, skill advancement, etc, and is relitivly well documented code. You could easily start your game from that codebase. There also a very large community associated with muds, check out www.mudmagic.com/www.mudconnector.com.
Also, most muds are writen in C, which is pretty easily understood once you get use to it. Muds are, contrary to popular belief an easy way of learning C. Just dont expect to create Quake 3 out of it like so many new coders try
check out garagegames.com
they have the Torque game engine.
$100 for a license. i am in the middle of a project using it.
some pretty well-known games have been made with it.
might not be what you're looking for, but it might be.
cross platform, too!
Where's Robin Hood? We could kinda really use him now.
I think Blender is an excellent choice here. It's free, cross platform and very easy to get started in. Combinde with Pythin and the info available at GameBlender.org it should be very easy to get a awesome project out quickly. My 11 year old daugher got going with the 3D modeling in an afternoon after watching the online video tutorials.
T.J. Schmitz - the man, the myth, the legend - o
That post is probably the best advice I've seen here.
l
s p
The most important question I think is
"what is your true goal?"
Possible answer include:
a- something new and original
b- something really usable
c- something pretty
d- a combination of a/b/c?
Is the goal just to create any game? Being for a class and depending on your TA or professor, I would expect the engine to be more important than the look. (if it were commercial, it would probably be the reverse, ymmv.)
One important detail is how it should look, depending on your true goal. Be warned that if you are not already a designer (i.e. used to draw manually or with computer tools) then stay away from anything that requires a lot of art.
Even something as simple as a Pacman clone or 2d vertical shooter requires a lot of art and that can divert a substantial amount of time from your project.
If it's a class project and what matter is more having a complete usable game with a real engine that just pretty static picture, nobody will care if your pacman looks like a blue circle as long as it can travel around and properly collide with walls.
Now for the specifics: some people like card games, some others don't. Personally I'm more into 2D games. They can be easy to program. As a start, you can have a look at a basic game I wrote a long time ago (it clones an old Amiga game) and that I regularly port to different platforms (it's a great way to learn a new language and framework):
http://www.alfray.com/projects/Nerdkill/index.htm
This one is in C# and uses DirectX (desktop) or GDI (PocketPC). The engine was written to reasonably easy to understand and adaptable to other languages or platforms and is somewhat described here:
http://www.codeproject.com/netcf/cfgamenerdkill.a
and
http://ralf.alfray.com/.izumi/Dev/NerdkillDev
Technically it could sure be ported to work under Linux using Mono and GTK#, although there's some work there especially if you have to learn these APIs too.
The whole thing is GPL so feel free to reuse it if you like. I thinking of it more as a way to see how to organize your project (or not.)
Make your game as a mod for an existing game. Unreal has a language that is based on C++. Neverwinter Nights has a scripting language also similar to C++. They both also have rich GUI tools and a large developer community.
Why try to invent the wheel in a semester? These tools are made to make games. This is how the real world works except everyone uses professional grade middleware like Renderware, another engine like Doom3/Source/Unreal, or proprietary middleware developed in house like Sega and Nintendo.
Game developers spend as little time messing with the engine as possible. Unless you want to do something that's just never been done before or needs to run in a restictive environment (Palm, GBA), DO NOT DEVELOP AN ENGINE.
http://pages.cpsc.ucalgary.ca/~parker/cpsc585-2004 /cpsc585-2004.html
Ada95 is an object-oriented strong-typed reliable language created for the US Department of Defense, if it's good enough for them, it's good enough for you. The language is well designed (unlike C++) and you can always expect the code to do what is written in the Ada Reference Manual. A unique feature of the language is quite an extended model of multitasking, beside that it includes modularization, polymorphism and generic programming capabilities.
Bindings for X11, SDL, OpenGL and GTK+ exist, what more do you need?
The free compiler for Ada95 is GNAT, which is included in the recent versions of GCC (stable as of 3.4.0), but you can also get an older stable version 3.15p based on GCC 2.8.1 from here.
The compiler won't generate code as fast as that of C and C++ compilers but since you're probably not writing Doom4 it's perfectly acceptable.
The benefits of javascript are:
Downsides:
I'd like someone to make a variant of the above game btw. as I state at the end of the description :)
I'm still trying to figure out what people mean by 'social skills' here.
He probably hasn't taken more than a cursory glance at Flash before dismissing it and making assumptions. Flash's "scripting" is damn close to most other programming languages. In fact, Flash actionscript is closer to C++ than even BASIC is, so you'd be going a step in the right direction.
;-)
The advantage of Flash is that as a newbie, you have at your disposal a complete "engine". You can prototype ideas very fast. And you don't have the learning curve of a compiler to learn. No MAKE files and weird configurations to figure out. Just code and publish.
What usually throws off "real" programmers is the ability to scatter your code all over the place rather than being restricted to one long loop. This is a powerful feature, which throws off even the seasoned coder (and thus because it doesn't fit their paradigm, they dismiss it).
As for cost... 30 day uncrippled free trial. Uninstall and reinstall it for the next 4 months.
Given you're just starting out with programming, Game Maker is a fine environment for making games. It has everything right there, from a sprite editor to a room/level editor.
Its very high-level, in that everything is very object oriented, and quite literally drag and drop.
However, it does have a very nice and fairly deep scripting language that resembles C.
At the higher level, it does teach basic programming constructs quite well, and on the lower level it can remain just as simple or go quite a bit further.
Once you understand the basics, its trivial to write a game such as pong, breakout, or pacman. After you've gained experience, you can even write full blown side scrolling jump and runs, and recently, even games like Doom.
Its free to use, and cheap to get the registered version. Its at least worthy of checking out.
http://www.cs.uu.nl/people/markov/gmaker/