Programming language choice

Talk about computers, hardware, applications, and consumer electronics.
Beyond a Perfect Math Score
Posts: 829
Joined: 2008.09.25 (21:35)
Location: England
Contact:

Postby Luminaflare » 2008.11.01 (23:38)

What would be a good choice of programming language to code your own 2D game engine in?

User avatar
Bayking
Posts: 315
Joined: 2008.10.01 (20:26)
NUMA Profile: http://nmaps.net/user/exuberance
Location: Guelph, Ontario, Canada

Postby Exüberance » 2008.11.01 (23:46)

Well, if you just want a kind of rapid-devolopment kind of thing, I would recommend either Flash or Game Maker. Game Maker is more of a beginner language, but is EXTREMELY powerful and efficient (when you use code. The drag-and-drpo thing seems to give larger file sizes and loading time- probable because it's harder to compile that way), but doesn't have some more advanced things like error handling, and for some reason they decided to make array-handling functions difficult by making several different kinds of lists :/. it's also very limited as far as Object-Oriented Programming goes. You can access and change variables, but nto functions, in other instances, but you can't create Objects, and things like arrays are referenced in a kind of weird way.

If you have experience in Object-Oriented programming, you might want to consider Flash. It's similar to Java, and lets you create visual things very quickly. You can use both vectors and bitmaps, but it is limited in that you can't receive input from joysticks or gamepads, and writing to and reading from external files can be kind of tricky.

There's lots of great languages out there. C++ is a common language for programming games, but I would say Flash is probably a good place to start, or if you don't have much programming experience, you might want to start with something easier like Game Maker.
ExüberNewsFeed: Exuberance is mostly <AFF> (Away From Forums) for a while, though I may still participate in epic contests/threads. When I return, I shall bring several comic updates (enough to finish season 1) and hopefully 1 or 2 games- at least one of which is N-related
Comic Activity-O-Meter: (how often I'm updating my comic)
(Click here to see what each level and half-level means in terms of updates per time period)

NOTE: If I just add a bunch of comics in one day, but plan on going back to normal after that, I probably won't update the status.
+ Dead: Canceled. Done. Maybe you'll get a random comic like once a year, but it's pretty much done.
- Zombie (Dead/Comatose): The comic is probably done regular updates forever, but I'll probably still add something once in a blue moon. It's still POSSIBLE, that I'll raise the status up, but not very likely. Maybe I'll have a comicplosion for like a week, then go back to being dead
+ Comatose: Complete stand-by. No (or very few) updates for some amount of time, but the comic's far from being over
- <AFK> (Comatose/Loitering): Stand-by, but you might possibly count on a few updates once and a while. Again, this is temporary
+ Loitering: Like comatose, but for short amount of times.
- Turtling (Loitering/Semi-Active): Really slooooww updates
+ Semi-Active: One every 2 weeks...ish?
- Quasi-Active (Semi-Active/Active): Averaging about 2 comics every 3 weeks
+ Active: Loosely defined status, but about a weekly update
- Over-Active (Active/Power-leveling): About 2 comics a week
+ Power-leveling: About 3 comics a week. Possible a schedule, possibly not
- Über-Epic (Power-leveling/COMICPLOSION!!): In some cases, this may actually be mean updates more frequently than COMICPLOSION!!, but I'm defining this level as a non-organized comic rush, kind of like a few days after my comic started
+ COMICPLOSION!!: Daily updates for a minimum of 5 days (since the daily updates started. It remains at this status until the 5, 7, whatever days are done)

Image
"Science without religion is lame. Religion without science is blind." ~Albert Einstein
My N+ Vector Sprite Sheet ::: My Caption Contest ::: My Comic :::Puzzles of the Exuberant ::: DEFEND YOUR NINJA: THE FLASH GAME (Release Date TBA)
Image
Exüberance on WoW
Image
Maps in the Fernat Epic (so far): (meh, let's put this in a spoiler too. My sig's gettin too big. I'm such a packrat :p)

Nmaps.netNmaps.net


User avatar
Lifer
Posts: 1099
Joined: 2008.09.26 (21:35)
NUMA Profile: http://nmaps.net/user/smartalco
MBTI Type: INTJ

Postby smartalco » 2008.11.02 (01:36)

I'm going to agree with Exuberance (only I would definitely recommend Flash over Game Maker... just to be clear)
Image
Tycho: "I don't know why people ever, ever try to stop nerds from doing things. It's really the most incredible waste of time."
Adam Savage: "I reject your reality and substitute my own!"

Ice Cold
Posts: 202
Joined: 2008.09.26 (11:49)
Location: Australia
Contact:

Postby mattk210 » 2008.11.02 (01:56)

If you don't know the first thing about programming and don't really want to learn, go with game maker or multimedia fusion. The advantage of Game maker is that if you do get into programming properly, it is possible to make some fairly complex things using GML and you can have decent speed with ENIGMA.

If you are prepared to spend a few hours learning the basics of programming you'll want something a bit more logical, structured and better documented. Torque Game builder is very nice, but isn't that popular so you'll have trouble asking for help. Flash is very high-level so it's slow but is excellent at rendering vectors and has a lot of programming constructs that are very useful (like nested "movieclips"). There are some limitations like not being able to do file IO, but this can all be overcome by a flash wrapper of the likes of SWF studio. It's also multiplatform and can be embedded on a web page.

If you want to delve into real programming and graphics, C++ with DX/OpenGL is probably your best bet right now. It's very popular and has a lot of stuff written for it, and it's fast. Java is multiplatform and can be embedded online, but I don't have much to say about it because I've never really used it. Avoid BASIC variants like the plague.

I hear Raigan recommends processing, but I have no experience with that.

EDIT: I should also mention that flash is expensive, and GM, Java and C++/OGL are completely free (but you pay for special features in GM)

User avatar
Bayking
Posts: 315
Joined: 2008.10.01 (20:26)
NUMA Profile: http://nmaps.net/user/exuberance
Location: Guelph, Ontario, Canada

Postby Exüberance » 2008.11.02 (04:43)

EDIT: I should also mention that flash is expensive, and GM, Java and C++/OGL are completely free (but you pay for special features in GM)

Yeah, that's a good point too. GM is technically free, but you can't do anything usefull without upgrading for $20. As for Flash... well It's a programming language, vector drawing program, and animation in one, so it's pretty expensive. Plus they increase the price every version even though the barely add anything (with some notable exceptions- when they added AS 2 and AS 3... actually come to think of it Flash isn't that bad for updates. They actually add pretty useful stuff. Fireworks, on the other hand. No clue what they added in the new version. Didn't have the trial version long enough to find anything different from the last 2 versions.)

If you know all about pointers and memory and stuff, you should go for C++

If you've got some imperitive programming knowledge, but you've never done anything really major, I'd go for Flash

If I asked you what polymorphism is, and you responded a spell that turns people into sheep, I'd go with Game Maker.
ExüberNewsFeed: Exuberance is mostly <AFF> (Away From Forums) for a while, though I may still participate in epic contests/threads. When I return, I shall bring several comic updates (enough to finish season 1) and hopefully 1 or 2 games- at least one of which is N-related
Comic Activity-O-Meter: (how often I'm updating my comic)
(Click here to see what each level and half-level means in terms of updates per time period)

NOTE: If I just add a bunch of comics in one day, but plan on going back to normal after that, I probably won't update the status.
+ Dead: Canceled. Done. Maybe you'll get a random comic like once a year, but it's pretty much done.
- Zombie (Dead/Comatose): The comic is probably done regular updates forever, but I'll probably still add something once in a blue moon. It's still POSSIBLE, that I'll raise the status up, but not very likely. Maybe I'll have a comicplosion for like a week, then go back to being dead
+ Comatose: Complete stand-by. No (or very few) updates for some amount of time, but the comic's far from being over
- <AFK> (Comatose/Loitering): Stand-by, but you might possibly count on a few updates once and a while. Again, this is temporary
+ Loitering: Like comatose, but for short amount of times.
- Turtling (Loitering/Semi-Active): Really slooooww updates
+ Semi-Active: One every 2 weeks...ish?
- Quasi-Active (Semi-Active/Active): Averaging about 2 comics every 3 weeks
+ Active: Loosely defined status, but about a weekly update
- Over-Active (Active/Power-leveling): About 2 comics a week
+ Power-leveling: About 3 comics a week. Possible a schedule, possibly not
- Über-Epic (Power-leveling/COMICPLOSION!!): In some cases, this may actually be mean updates more frequently than COMICPLOSION!!, but I'm defining this level as a non-organized comic rush, kind of like a few days after my comic started
+ COMICPLOSION!!: Daily updates for a minimum of 5 days (since the daily updates started. It remains at this status until the 5, 7, whatever days are done)

Image
"Science without religion is lame. Religion without science is blind." ~Albert Einstein
My N+ Vector Sprite Sheet ::: My Caption Contest ::: My Comic :::Puzzles of the Exuberant ::: DEFEND YOUR NINJA: THE FLASH GAME (Release Date TBA)
Image
Exüberance on WoW
Image
Maps in the Fernat Epic (so far): (meh, let's put this in a spoiler too. My sig's gettin too big. I'm such a packrat :p)

Nmaps.netNmaps.net


Plus (Size) Member
Posts: 42
Joined: 2008.09.27 (02:56)

Postby taaveti » 2008.11.02 (08:25)

You could try Euphoria or Python, if you want something a little heavier duty than Flash but don't want to go as far as Java or C. They're both pretty easy to learn, and they both take care of a lot of details for you.

User avatar
Lifer
Posts: 1099
Joined: 2008.09.26 (21:35)
NUMA Profile: http://nmaps.net/user/smartalco
MBTI Type: INTJ

Postby smartalco » 2008.11.02 (16:33)

I just remembered another little language thing I found a couple years ago that is fun to play around with and has a pretty low learning curve.
Processing
It is java based so it can use java code as well (teaches you a higher level language too, which is a plus).
Image
Tycho: "I don't know why people ever, ever try to stop nerds from doing things. It's really the most incredible waste of time."
Adam Savage: "I reject your reality and substitute my own!"

Beyond a Perfect Math Score
Posts: 829
Joined: 2008.09.25 (21:35)
Location: England
Contact:

Postby Luminaflare » 2008.11.03 (16:13)

Euphoria seems tempting. Opinions on it?

User avatar
Global Mod
Global Mod
Posts: 1416
Joined: 2008.09.26 (05:35)
NUMA Profile: http://nmaps.net/user/scythe33
MBTI Type: ENTP
Location: 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0

Postby scythe » 2008.11.03 (19:18)

Luminaflare wrote:Euphoria seems tempting. Opinions on it?
Well, it's interpreted, which means that in order for people to play your game, they have to download the interpreter. Other than that, it should work well enough; I don't know much about it to be honest.
As soon as we wish to be happier, we are no longer happy.

User avatar
Retrofuturist
Posts: 3131
Joined: 2008.09.19 (06:55)
MBTI Type: ENTP
Location: California, USA
Contact:

Postby t̷s͢uk̕a͡t͜ư » 2008.11.03 (20:51)

scythe33 wrote:
Luminaflare wrote:Euphoria seems tempting. Opinions on it?
Well, it's interpreted, which means that in order for people to play your game, they have to download the interpreter. Other than that, it should work well enough; I don't know much about it to be honest.
No, there are ways of compiling code that would otherwise be interpreted.
I mean, it basically bundles a mini-interpreter, unpacks the code, and interprets it, but it all looks and functions like a compiled binary.
[spoiler="you know i always joked that it would be scary as hell to run into DMX in a dark ally, but secretly when i say 'DMX' i really mean 'Tsukatu'." -kai]"... and when i say 'scary as hell' i really mean 'tight pink shirt'." -kai[/spoiler][/i]
spoiler

Image


Plus (Size) Member
Posts: 42
Joined: 2008.09.27 (02:56)

Postby taaveti » 2008.11.04 (03:58)

I haven't really been up on the latest developments in Euphoria for a few years now, but back then you had to register (I don't remember the cost; I convinced my boss at the time that we should use it at work) in order to be able to make bound executables (as Tsukatu described). You can, however, freely distribute the interpreter, so you could distribute a package consisting of the source, the interpreter, and a shortcut/shell script/etc. which just does "exec ./ex myprog.ex". You'll run into the same issue with Python, or even with Java or Flash (although just about everyone has a JRE and Flash player installed nowadays).

That said, I still think it's definitely worth learning Euphoria. It does a good job of making certain challenging stuff much more accessible, so you can learn how to do it in other languages (probably 90% of my knowledge of Windows GUI programming came from dissecting David Cuny's win32lib for Euphoria).

User avatar
Albany, New York
Posts: 521
Joined: 2008.09.28 (02:00)
MBTI Type: INTJ
Location: Inner SE Portland, OR
Contact:

Postby jean-luc » 2008.11.13 (02:58)

I've never done it myself, but I know that Python is very popular for rendering. examples I raise would be Phun (a 2D physics simulator) and Blender (an open source 3D rendering system competing with Autodesk's Maya/3ds Max). Python does seem to work great for simple projects up to projects of great complexity (like Blender).
-- I might be stupid, but that's a risk we're going to have to take. --
Image
Website! Photography! Robots! Facebook!
The latest computers from Japan can also perform magical operations.


Who is online

Users browsing this forum: No registered users and 11 guests