Ideas for an undergraduate game development course

Next semester, I will be offering an experimental game programming course with a group of enthusiastic sophomore computer science undergraduates. The students have two semesters of experience with C++ and one with Java, but I have selected Java for my course because: (1) it is the language in which I have written games, so I can be more helpful, and (2) we can use java webstart to deploy painlessly onto multiple platforms. We will be using Brackeen’s “Developing Games in Java” and Davison’s “Killer Game Programming”.

Game programming is hard, and there are many interesting and appropriate topics for a computer science major to study. Obvious examples include sprite animation, collision detection, audio processing, and applications of artificial intelligence. My educator’s intuition is that the students will get the best learning experience if they develop their game engines themselves, basing the code on the Java API (as in Brackeen and Davison). The alternative is to use a prebuilt game engine for Java, but frankly, I have little experience with these. I avoid the prebuilt game engines because, as an educator, I wanted to make sure I understood the nuts and bolts as I built my own games. In the end, the students want to have a good learning experience and a cool game, and my fellow faculty want to see that the students have learned something scientifically significant. (Note that they have tenure, and I do not.)

I would like to see how the community feels about such a course. If you have any experience to share, suggestions, or observations, please add to the thread. In May, I’ll post a link to the students’ projects for the community to enjoy.

I would definitely think about using an existing engine or at the very least about using one of the existing openGL interfaces. The reason I would suggest this is simply that the sheer amount of work involved in creating modern games is so great that if you want your students to have something with which they can impress their friends at the end of the day they will need as much help as they can get and if you are teaching modern games writing you need to be using 3D accelleration even if you are only using it for a 2D game.

One thing that might be very useful would be if you could get hold of a bunch of content students could use be it sprites, models, textures, whatever. That’s one of the big problems that you run into if you are writing games and it could make a big difference to how the students’ projects work out. If the college has an art and design course it would be a fantastic opportunity to give both sides practical knowledge of the whole thing. Maybe not for this year, but something that might be a smart idea going forward…

If it’s going to be a 2D based game, and you’re willing to use a engine, then I recommend the GTGE engine (http://goldenstudios.or.id/)

Personally, I just finished a “3D Computer graphics” course which focus was on the workings of OpenGL. It was very beneficial to me and enjoyable to learn all those things, but although I learned a lot about 3D graphics and OpenGL in the course, there was not much emphasize on “game programming”.
^ But 3D programming is very hard to study, and requires a full course just for the basic concepts.

2D game programming is easier. Those books you’re using probably contain everything or most that you need to teach those fundamentals like path-finding, collision detection, behavioural logic (AI), sprite stuff, and how all the different types of 2D games are implemented (RTS types, MarioBros types, SpaceInvaders types etc.)

I think the only thing you need to decide is; a) The goal, what do you want your students being able to create and b) What is it specifically you want to lecture about from those books. c) Give out assignments that focus on using those specific “nuts and bolts”.

We never used to use “engines” in the old days. The whole “engine” thing is just geeky programmers trying to make out that they’re doing some sort of clever engineering rocket science. It’s not rocket science, it’s really, really basic programming.

If you want your students to learn something, get them to write some simple game from scratch without any engine, using just the Java2D APIs. I suggest Space Invaders or Galaxian (quite advanced), Breakout, PacMan, or for proper hardcore programmers, Defender. Critical to the issue is graphics - if they can’t actually get away with ultra-rubbish pixel art they will become very disillusioned. I’d also suggest you provide a bunch of public domain sound effects as well.

BTW, platform independence is a whole other kettle of fish and I’d advise you tackle that separately. Get it working on Windows as a standalone Java application or applet. Webstart and Mac / Linux deployment is a whole exercise in itself.

Cas :slight_smile:

I’d certainly steer clear of any sort of OpenGL based framework, sticking with Java2D means they can spend less time with annoying graphics bugs and more time on core game stuff thats common to all games.

When I did this stuff at uni the biggest problem I had was getting the initial window/display up with a BufferStrategy (although it didn’t help that it was brand new at the time, so had very little on the web about it). It might be a good idea to provide a really simple bit of sample code which opens a window, creates a buffer strategy and has a game loop which draws a single sprite in it. That way they get a good example of the basic game loop which they can tinker with, and they can get straight to the gameplay and logic code.

If you want them to set the games up as webstart apps a simple example Ant script which jars, signs and uploads the example app might be a good idea too.

Learning about Ant would be very valuable as it’s not necessarily a core teaching topic but it’s a very useful tool.

The problem I’d have with using Java2D is that any remotely savvy student could legitimately say “I could do this more easily with Flash - why am I using Java for this?”

Please teach them what a gameloop is, how to build one, and the subtleties of why they’re still a good idea (determinism of execution, consistent framerates, etc).

Also, I’d advise giving them the code that gets a sprite on screen, and moves it left 10 pixels a second, and giving them pointers to explanations for each of the parts of that code (resource loading in java in JAR-compatible ways; rendering Image objects; choosing BufferStrategy; initializing AND opening a window; starting a new thread)

I say this from experience of tutoring comp-sci undergrads and having seen students accidentally discover the most horrifying ways of achieving each of those things, because they only had trial and error to go on (shitty professors) and java2d (+swing) has some really evil horrible stuff in that you can abuse (for instance, the guy who found he could use the event thread as a “free” thread to do animation. ARGH!)