Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

2D game graphics programming

Name: Anonymous 2012-07-10 19:36

I know some C++ and Java, but I've only ever done text stuff with them. Which language, and what libraries, would you recommend for making 2D game?

With sprites and collision detection, basic physics for side-scroller type action.

Name: Anonymous 2012-07-10 19:44

C, OpenGL, OpenAL.

Name: sage 2012-07-10 19:49

ASM, OpenGL, /dev/dsp

Name: Anonymous 2012-07-10 19:49

C, SDL.

http://www.metanetsoftware.com/technique.html
Good tutorials on collision detection and physics, made by the people who made that one ninja Flash game.

Name: Anonymous 2012-07-10 19:55

>>4
SDL
No. SDL is a pile of crap and 3D acceleration is good if you want lots of eye-candy.

Name: Anonymous 2012-07-10 20:03

>>5
What's wrong with SDL?

Name: Anonymous 2012-07-10 20:04

OP here, I was thinking of using object-orientation to organize my character units, so it would be C++ instead of C if I go with SDL.

I get the feeling everyone here hates Java?

Name: Anonymous 2012-07-10 20:08

>>7
just do Android or J2ME (mobile Java), there are plenty of books on both

Name: Anonymous 2012-07-10 20:12

Just download the June 2010 DirectX SDK

Name: Anonymous 2012-07-10 20:20

>>6
SDL is nice, but quite outdated. It's also implemented in C, so your codebase might end up being a little more complicated assuming you use C++. And you can forget about hardware acceleration.

I recommend SFML. It's simple and fast, as implied by the name. It is also better maintained.

Name: Anonymous 2012-07-10 20:24

>>10
When did ``hardware acceleration'' become such a buzzword?
You realize what SDL is, right?
And it's a library, of course it's written in C.

I recommend SFML. It's simple and fast, as implied by the name. It is also better maintained.
Fuck, IHBT.

Name: Anonymous 2012-07-10 20:34

vroom vroom

Name: Anonymous 2012-07-10 20:41

>>11
Shoehorning a C library into a C++ program produces unnecessary complexity. Why would OP do this if there are no performance gains for it and there are simpler and more robust alternatives available?

Name: Anonymous 2012-07-10 20:44

>>13
Have you ever used SDL with c++? There's no difference from using it in c whatsoever.

Name: Anonymous 2012-07-10 20:51

>>14
If you're writing C++ like you would write C, you're doing it wrong.

Name: Anonymous 2012-07-10 20:54

>>15
not 14, but dude seriously stfo you don't fucking know what you're saying

Name: Anonymous 2012-07-10 21:06

>>16
That's true, my apologies. I haven't done any C or C++ or used SDL or SFML in ages. I just like being proved wrong because it helps get rid of fauly concieved notions and shows I have more to learn.

I'll just stop talking out of my ass now.

Name: Anonymous 2012-07-11 2:19

>>17

no, you are sort of right. C++ style does clash with C style, but it is ok to break into C style for the sake of compatibility with a library or an existing code base. It's manageable as long as the transition has a border to it. Like once you are inside the library, it is all C, and once you are outside the library, it's all C++. Doing stuff like mixing malloc free new and delete all over is bad news.

Name: Anonymous 2012-07-11 2:24

The only logical choice is C++11 with GLFW.

Name: Anonymous 2012-07-11 5:35

The current, longstanding version of SDL (1.2) is entirely implemented with software surfaces, unless you're just using for an opengl context and timing/io. Software surfaces are slower than old people fucking. Per-pixel operations or any other sort of low-level image transformation take multiple seconds, even on small images. OpenGL or DirectX (if you don't care about your software running on anything other than windows) is your only hope.

Name: Anonymous 2012-07-11 12:46

In my first experience using SDL, I failed to use it for a simple project. I believe I got problems with mouse handling (out of window + mouse key up or something, can't remember for sure), problems you'd expect when using non-professional solutions, it appeared just another random FOSS project, so I switched to OpenGL which fixed any limitations I experienced with SDL. It just left me wondering why people through decades recommends SDL? For 'what' I ask, because programming using OpenGL/AL is just as simple. Really, it is very simple.

Later on I got to write a wave propagation simulator, using that produced perfect (analytic) wave functions in the time domain, supporting arbitrary amounts of waves and interferences, using OpenGL but it wasn't like OpenGL had anything to do with it really, it's just a stupid API to put doodles on the screen, same as SDL. What you really need is either:

A. A shit load of time to implement the mathematics to handle what ever you want to do, collision detection etc, what ever it might be.
B. A proprietary engine that solves 99% of your problems.

Name: Anonymous 2012-07-11 13:50

Just use python, it's easy and you have pygame, which is basically optimized SDL for python.

Name: Anonymous 2012-07-11 13:54

>>21
Why not skip the FOSS bullshit and use what the pros use?

http://www.microsoft.com/en-us/download/details.aspx?id=6812

Name: Anonymous 2012-07-11 14:03

I'd use DirectX or what ever would be needed today, but at that time, I was mesmerized by FOSS (even had linux t-shirt) and thought it was the shit. I'm embarrased to say I'd been using Linux for well over 10 years at that time. I ate shit for ten years, i.e. reading shitty code, shitty documentation, shitty mailing lists, working with shitty APIs that would change to diarrhea at anytime repeatedly, yet I never realized it for such a long time.

Name: Anonymous 2012-07-11 15:12

Nobody use SDL for drawing pixels you niggers. Also OpenGL is not OOP: deal with it and encapsulate everything!

Name: Anonymous 2012-07-11 15:16

>>24-san is a faggot

Name: Anonymous 2012-07-11 15:46

>>24
I am penetrating your anus with my hard black dick. take this, white boy! take my black load oh yeahhhhhh

fucking fag

Name: Kurwa 2012-07-11 15:59

Jebany.

Name: Anonymous 2012-07-11 16:15

>>23
FOSS bullshit
nvidia and catalyst are not FOSS.

Name: Anonymous 2012-07-11 16:30

>>29
nouveau and radeon are FOSS, thus acceptable in a secure environment.

Name: Anonymous 2012-07-11 17:25

>>24
I know that feel too. But it wasn't ten years; more like four.

Don't change these.
Name: Email:
Entire Thread Thread List