Public Group

# whats a good toolkit for creating good 2-d games?

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

## Recommended Posts

I'm self taught, working in java with gridbag right now. (Finnally fixed all the proportioin errors in my current program, apparently java fully expects you to go through each and every component and set the preferred and minimum size manually.) While java is pretty cool all by itself, i know if i want to make more sophisticated 2-d games i am going to need something else. I am also learning that because java is somewhat slow, most games are programmed in C++. I downloaded Visual Studio .NET from a university friend, but so far it is proving to be less than useless, i don't really know how to use J# with it, and Visual Basic is like greek to me, since i have know idea how or even if object oriented programming works with it. I am pretty sure i can get a decent C++ compiler and a copy of VB 6.0 (Which apparently has a good tutorial in its documentation) from a couple of friends. C++ isn't that different from java, and i would like to learn how to use it without having to start from scratch. I think the thing i really need to learn are pointers, since java doesn't have pointers. I also need to know, what is a good jumping off point from using java's AWT and Swing files? My friend was talking about open GL, but i was wondering if i needed to know C++ first. Are there any other tools or things i need to or should know?

##### Share on other sites
You are lucky in that, in many ways, C++ is not that different from Java. Unfortunately, as you mentioned, pointers are and in a big way. I remember the day I finally grokked pointers in all their glory, though...what a day... anyways, always remember that there is no automatic garbage collection for things created with new; you must always call delete. And passing by reference, which is in many cases ideal, doesn't happen unless you specifically do it with a pointer. I went from C++ to Java rather than vice versa, so it was probably a lot easier for me.

Java being the platform-independent toolset that it is, there is no ideal similar place to start from graphically in C/C++. If you're programming for Windows, the Win32 API (specifically, the GDI subset) is how you achieve the same results as Javas Swing and AWT classes, albeit in a much more complicated (though flexible) manner. There are also various libraries available (GTK comes to mind) that provide slightly easier and sometimes cross-platform GUI functionality.

HOWEVER...none of that applies (at least, none of it applies very much) to making games. GUI functionality such as is provided by Swing components doesn't come into play very much when making games, when you're a beginner. What's usually needed is a good library with graphical functionality such as Allegro or SDL. Neither of these is necessarily best for a C++ beginner, as they both are written in C and therefore have no classes or other features generally associated with object orientation (and are a tad harder to get to work properly in C++, sometimes, for beginners). If you start out with text-based things such as you've probably done with stdin and stdout in Java, then work your way up to using (and understanding) graphics and display concepts, you'll do well.

Hope that helps,
Twilight Dragon

##### Share on other sites
SDL and Allegro are very popular. I myself have use Allegro with success. Try 'em both and see what you like.

EDIT: I'll get you TDragon!

• 11
• 15
• 21
• 26
• 11