My 2nd Game w/Graphics - Lesson Learned

Started by
4 comments, last by hspirdal 15 years, 2 months ago
Download: Asteroid Evasion Download MyImageLinkMyImageLink Here's my second game. I made it to understand concepts like motion and collision. Inspired by a game that I played a long time ago where you moved a stick figure to dodge rocks falling from above. I think I will move on to a side-scroller now to learn moving backgrounds and event handling, tiles, and levels. What I learned and what I wish I did better: * For small simple games like this, C++ is overkill. If you're making a small game, use a different language if you know one. * Write more cleaner code. I didn't really get lost but there were parts where my code was just a long list of function calls and my eyes were moving all over the screen to try and find what I was looking for. * Use an error log/check for error in code. This is something I didn't do. Although I got through fine with the debugger having an error log if the program exited suddenly would have pinpointed the problem quicker than using the debugger to find the problem. * Use a longer screen size in height. Falling rocks sometimes hit the robot too soon because the screen is so short. * Learn and implement frame independent movement. Not everything would move so quickly. * Smaller hitboxes :) Questions I have I'm using SDL_ttf, SDL_image, and SDL_Mixer. There is a small console window that pops up. My previous game which used SDL does not have a console window open. What's up with that? Is it because it's a release version? Third-party library dependency? * How do you deploy a program for those who don't have VCRedist or don't want to have VCRedist installed? How come commercial games work (I think) without installing Redist. files? Would like positive and negative feedback! [Edited by - ICUP on January 22, 2009 12:21:09 AM]
Advertisement
Quote:
I'm using SDL_ttf, SDL_image, and SDL_Mixer. There is a small console window that pops up. My previous game which used SDL does not have a console window open. What's up with that? Is it because it's a release version? Third-party library dependency?

If the subsystem is set as console windows will create one when your program starts (if it wasnt started from an existing console). You need to change to the windows subsystem.

Project -> ... properties -> Config -> Linker -> System -> SubSystem
Select /SUBSYSTEM:WINDOWS from the drop down box

Quote:
* How do you deploy a program for those who don't have VCRedist or don't want to have VCRedist installed? How come commercial games work (I think) without installing Redist. files?

Statically link the runtime, allthough doing this may conflict with SDL if they were using the dll runtime.

Project -> ... properties -> C/C++ -> Code Generation -> Runtime Library
You want the two (one for release one debug) that are not dlls.
If the program crashes and you are debugging it you can view the "callstack" which gives a very good indication of where and why it died. A logger is still useful though for indicating when resources aren't loaded and when unexpected hardware incompatibilities are found and when crashes occur after you've released your game so that users can submit an error report. But for a basic crash the callstack is pretty much the most important tool for pinpointing where.

Also, you didn't package libfreetype-6.dll with your game and downloading freetype and renaming its dll to match didn't work for me so I assume it's something sleightly different.
_______________________"You're using a screwdriver to nail some glue to a ming vase. " -ToohrVyk
A logger is absolutely crucial for full screen games. Perhaps my computer is sub-par but a good portion of the time I lose complete focus of the game and cannot get it back without exiting VS or restarting my comp. This happens both in release and debug mode (although I'll admit, I naturally compile more in release because I'm lazy, it still happens when I switch to debug).
Typically before release I'll compile and test in windowed mode, but I understand what you're saying, it can be a real issue when a crash in your program crashes your computer too.
_______________________"You're using a screwdriver to nail some glue to a ming vase. " -ToohrVyk
I applaud you for doing the "whole package", even though it's "Just A Small Clone". It's very tempting to rush on to the next shiny project when the basic game code for a demo is finished. Also, taking the time to reflect and learn from the process, as you no doubt know, is important.

Is the art minus the background your work? If so, your programmer art is really good, you should be proud! :)

I haven't tested your game because of the freetype problem mentioned above, but your thread was really good, and I think you deserve a pat on the back. You seem to take pride in your work, judging by the screenshots.

This topic is closed to new replies.

Advertisement