Jump to content


Language to use for 2D game?


  • You cannot reply to this topic
14 replies to this topic

#1 Erra

    New Member

  • Members
  • PipPip
  • 17 posts

Posted 01 May 2007 - 05:36 PM

Okay, need some information now, I'm 99.999999% sure I'm going to use C++, but what compiler should I use?

Post any tips about upsides/downsides about compilers and the best ones to use for, as I stated, making a 2D game.

Thanks,
Erra

#2 dave_

    Senior Member

  • Members
  • PipPipPipPip
  • 584 posts

Posted 01 May 2007 - 06:36 PM

Language and compiler are not important to any sort of game.
If you're using C++ the compiler should not matter either, as long as its modern.

You will probably find it difficult to make a game using C++ if you are only just beginning.

Download Visual Studio Express C++, its important to follow the install instructions too (for the platform SDK).

Find some beginners C++ tutorials and follow them. Come back when you need more info.

#3 Erra

    New Member

  • Members
  • PipPip
  • 17 posts

Posted 02 May 2007 - 03:38 PM

I've already got full version of Visual Studio C++, both of my parents are programmers :p

#4 dave_

    Senior Member

  • Members
  • PipPipPipPip
  • 584 posts

Posted 02 May 2007 - 07:31 PM

Are they neglecting you or something??! Ask them for help, they'll be loads more useful than us!

#5 Erra

    New Member

  • Members
  • PipPip
  • 17 posts

Posted 03 May 2007 - 02:06 PM

I can assure you they aren't, they haven't programmed anything about games yet I think.

#6 SamuraiCrow

    Senior Member

  • Members
  • PipPipPipPip
  • 459 posts

Posted 03 May 2007 - 03:44 PM

I generally recommend Python and PyGame to beginners but if your parents are C++ programmers and you want to use C++, I'd recommend using C++.

Download Simple Directmedia Layer (SDL) and use that library along with SDL_Mixer and several other SDL-related packages as your first 2d programming API. Best of all, you can recompile your source codes for Macintosh and Linux with minimal (if any) modifications.

#7 Erra

    New Member

  • Members
  • PipPip
  • 17 posts

Posted 03 May 2007 - 04:50 PM

Okay, any other tutorials? O.o

#8 dave_

    Senior Member

  • Members
  • PipPipPipPip
  • 584 posts

Posted 03 May 2007 - 07:32 PM

Come on, google for it!

#9 Erra

    New Member

  • Members
  • PipPip
  • 17 posts

Posted 03 May 2007 - 08:08 PM

Did that already :p
Couldn't find much O.o

#10 Reedbeta

    DevMaster Staff

  • Administrators
  • 4979 posts
  • LocationBellevue, WA

Posted 03 May 2007 - 08:10 PM

http://www.google.co...n+game+tutorial
reedbeta.com - developer blog, OpenGL demos, and other projects

#11 irrdev

    New Member

  • Members
  • Pip
  • 5 posts

Posted 04 May 2007 - 03:42 PM

I use SDL myself. It has many advantages over Python and Pygame. The biggest factor is speed. In a game, it is very important that speed doesn't restrict the actual play. Python is a lot slower than C++. Check this article out to see what I mean. Anyway, if you want SDL articles, check this out:
http://www.libsdl.org/tutorials.php
This tutorial in particular is very good:
http://cone3d.gamede...ls/ogladv/index

Hope that helps :)

#12 dave_

    Senior Member

  • Members
  • PipPipPipPip
  • 584 posts

Posted 04 May 2007 - 04:39 PM

irrdev said:

Python is a lot slower than C++. Check this article out

That article is over 5 years old, thats practically a lifetime in computing.
You're missing the point: speed isn't everything, especially for the beginner.

http://discuss.joelo...oel.3.219694.19
http://www.strombergers.com/python/

#13 irrdev

    New Member

  • Members
  • Pip
  • 5 posts

Posted 07 May 2007 - 08:01 AM

dave_ said:

That article is over 5 years old, thats practically a lifetime in computing.
You're missing the point: speed isn't everything, especially for the beginner.

http://discuss.joelo...oel.3.219694.19
http://www.strombergers.com/python/

True, and I didn't check out the date of the article. Yes, a lot happens in five years. However, I'd say that the facts haven't changed much since then. Python has always been known to be a slow language, second only to Java. ;)

#14 Bad Sector

    Member

  • Members
  • PipPip
  • 39 posts
  • LocationAthens, Greece

Posted 09 May 2007 - 04:15 AM

Java isn't slow. Java array access is slow (bounds checking, but the newer VMs from sun can eliminate this if needed). And when it comes to games many people try to make their own rasterizers in order to use them in applets (so they have lots of array accesses). And generally many Java coders simply suck.

For a nice Java game, check Jake2. It's the Quake2 engine rewritten in Java and in some cases it's faster than the original C engine (i'm talking about the OpenGL renderer - there isn't any rasterizer, but if there was, it would obviously be slow for the reasons mentioned above).

#15 hovermonkey

    Member

  • Members
  • PipPip
  • 38 posts

Posted 09 May 2007 - 10:53 AM

Quote

True, and I didn't check out the date of the article. Yes, a lot happens in five years. However, I'd say that the facts haven't changed much since then. Python has always been known to be a slow language, second only to Java.

http://psyco.sourceforge.net/

This would have sped up many of these benchmarks considerably, with little change to the code other than two extra lines at the top of your program. Yes Psyco is older than 5 years too, but it looks like the author of the original paper didn't know about it (or chose to ignore it).





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users