Where SDL goes

Where does SDL code go in your game? Does it go into its own class (its own
header,cpp) or does it go within the same class as your game? In other words
does it have its own little section of code or do you combine it with the app
code. Any help would be appreciated. Thanks!

Up until now I’ve mixed it with the game code, but now I’m making what
is called a “game engine” to separate them. =P

Armond Sarkisian wrote:> Where does SDL code go in your game? Does it go into its own class (its own

header,cpp) or does it go within the same class as your game? In other words
does it have its own little section of code or do you combine it with the app
code. Any help would be appreciated. Thanks!


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

That’s a good idea. I think i’ll consider doing the same. Thanks! :)On Sun, Jul 20, 2008 at 3:22 PM, Leo Cabrera wrote:

Up until now I’ve mixed it with the game code, but now I’m making what is
called a “game engine” to separate them. =P

Armond Sarkisian wrote:

Where does SDL code go in your game? Does it go into its own class (its
own
header,cpp) or does it go within the same class as your game? In other
words
does it have its own little section of code or do you combine it with the
app
code. Any help would be appreciated. Thanks!


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

nothing should be mixed up if it doesnt have to be. i am working on an
nes emulator and the cpu and graphics (of the nes) are separate from sdl.
i might add opengl support and maybe qt or gtk and take out sdl (sdl or qt
build for example). this is almost like the other ongoing
thread about the sdl as a lib (interesting thread). keep your code
organized.

mattOn Sun, 20 Jul 2008, Leo Cabrera wrote:

Up until now I’ve mixed it with the game code, but now I’m making what is
called a “game engine” to separate them. =P

Armond Sarkisian wrote:

Where does SDL code go in your game? Does it go into its own class (its
own
header,cpp) or does it go within the same class as your game? In other
words
does it have its own little section of code or do you combine it with the
app
code. Any help would be appreciated. Thanks!


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Thanks Matt. I will create a class solely for SDL purposes.

ArmondOn Sun, Jul 20, 2008 at 10:56 PM, wrote:

nothing should be mixed up if it doesnt have to be. i am working on an nes
emulator and the cpu and graphics (of the nes) are separate from sdl. i
might add opengl support and maybe qt or gtk and take out sdl (sdl or qt
build for example). this is almost like the other ongoing thread about the
sdl as a lib (interesting thread). keep your code organized.

matt

On Sun, 20 Jul 2008, Leo Cabrera wrote:

Up until now I’ve mixed it with the game code, but now I’m making what is

called a “game engine” to separate them. =P

Armond Sarkisian wrote:

Where does SDL code go in your game? Does it go into its own class (its
own
header,cpp) or does it go within the same class as your game? In other
words
does it have its own little section of code or do you combine it with
the
app
code. Any help would be appreciated. Thanks!


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

I’ve found SDL itself low-level and portable enough that ‘wrapping’ it
(for some future replacement) hasn’t been necessary. I also often write
most of an entire game in two evenings, and then work on the next game. :wink:

OTOH, I’m hankering to go back and make all of my vector-based games look
nicer, and was thinking of making a little line-drawing library on top of
SDL (with the option of also sitting on top of OpenGL) so that I could
make the games look more like real vector screens from arcade games of
the 1970s and 1980s.

(A key feature would be the ability to change the level of realism…
straight bresenham pixelated lines, like I have now, for slow systems,
up to anti-aliased, alpha-blended, blurred lines for fast systems.
Something chosen either at runtime or build-time. I obviously haven’t
spec’d this out much yet. :slight_smile: )On Sun, Jul 20, 2008 at 09:58:21PM +0000, Armond Sarkisian wrote:

Where does SDL code go in your game? Does it go into its own class (its own
header,cpp) or does it go within the same class as your game? In other words
does it have its own little section of code or do you combine it with the app
code. Any help would be appreciated. Thanks!


-bill!
“Tux Paint” - free children’s drawing software for Windows / Mac OS X / Linux!
Download it today! http://www.tuxpaint.org/

Bill Kendrick wrote:

OTOH, I’m hankering to go back and make all of my vector-based games look
nicer, and was thinking of making a little line-drawing library on top of
SDL (with the option of also sitting on top of OpenGL) so that I could
make the games look more like real vector screens from arcade games of
the 1970s and 1980s.

Ahh… Starwars, Battlezone… Stop Bill, you’re getting me all
misty-eyed and nostalgic! :wink:

Eddy

I went to California Extreme in San Jose yesterday, so yeah…

Star Wars
Red Barron
Tail Gunner
Tempest
Speed Freak
Star Trek

probably there was a BattleZone, but I didn’t see it. I was mostly eyeing
uncommon games. I was surprised how much was there that I’ve never seen
before (despite growing up in 1980s arcades, and having been to CAX twice
already!)On Mon, Jul 21, 2008 at 08:24:22PM +0100, Edward Cullen wrote:

Ahh… Starwars, Battlezone… Stop Bill, you’re getting me all
misty-eyed and nostalgic! :wink:


-bill!
“Tux Paint” - free children’s drawing software for Windows / Mac OS X / Linux!
Download it today! http://www.tuxpaint.org/

Bill Kendrick wrote:

I went to California Extreme in San Jose yesterday, so yeah…

Star Wars
Red Barron
Tail Gunner
Tempest
Speed Freak
Star Trek

probably there was a BattleZone, but I didn’t see it. I was mostly eyeing
uncommon games. I was surprised how much was there that I’ve never seen
before (despite growing up in 1980s arcades, and having been to CAX twice
already!)

Aww man, I’ve gone all wobbly at the knees in a jealous rage… :wink:

Pete