Graphics libraries

G

Guest

Guest
Archived from groups: rec.games.roguelike.development (More info?)

Hi all,

As you see I'm not gone from you all for good yet. I made my last post
here around December(?) last year saying that I'm going to do some massive
code restructuring in WoT, that started out great but then I got better
things to do and didn't have much time left for it so I just stopped
again. Anyway, you don't need my life story.

So far I've been using C++ with Windows GDI as my graphics library (if you
may call it a library) for WoT - but that seems quite clumsy to use in OO
code. And now that I have done quite a lot of work with Java I've grown
to love the Swing library - easy to use, fast (in terms of development)
for windowed programs and of course it fits with the spirit of an OO
program.

So now I'm thinking of going back to WoT once again (this is about a 60%
probability, but I'm just doing some thinking about it now). I don't
really want to switch to Java as that would mean that it would be harder
for me to reuse some of my old code (of which I have a lot) - and it is
slower than C++ performance-wise. Instead I want to use a differend
graphics library.

What I'm looking for needs to meet these criteria:
- Free (in terms of monetary cost, I don't care for the 'Free Software'
movements) - Preferable GPLed - I want to keep my project closed source at
least for a while - Easy to use
- Good documentation
- Suitable for a graphical-tiled roguelike game (so no need for fancy 3D
effects, etc, but more than just an @ running around the screen) - Windows
compatible

I hope this is not too Utopian. Anyone know of any such library?


Cheers,
Konstantin S. Tchernov


--
Kostatus
kostatus001 at ihug co nz
http://www.woodsoftorbin.on.to/
or http://on.to/woodsoftorbin/
 
Archived from groups: rec.games.roguelike.development (More info?)

I think SDL (www.libsdl.org) may satisfy your criteria. It's an easy to
use, cross-platform, relatively lite-weight media library.
Documentation isn't extensive, but I found what was avilable adaqute
enough, especially given how simple the framework is to work with. No
need to worry about dealing with windowing controls and OS-specific
issues; SDL takes care of all that for you. It takes about 2 commands
to have it give you a window (or fullscreen) surface you can draw to.

It's available under the LGPL, but all you basically have to do to
satisfy the licence requirements is dynamically link to the library and
distribute the dll with your program (which you would be doing in that
case, anyway) This means it works equally well with a closed or open
source project.

SDL can also be used to handle mouse and keyboard input, and a few
other things (although its audio componant is pretty basic, and you're
better off using something else, assume your game has audio at all)
 
Archived from groups: rec.games.roguelike.development (More info?)

Kostatus wrote:
> Hi all,
>
> As you see I'm not gone from you all for good yet. I made my last post
> here around December(?) last year saying that I'm going to do some massive
> code restructuring in WoT, that started out great but then I got better
> things to do and didn't have much time left for it so I just stopped
> again. Anyway, you don't need my life story.
>
> So far I've been using C++ with Windows GDI as my graphics library (if you
> may call it a library) for WoT - but that seems quite clumsy to use in OO
> code. And now that I have done quite a lot of work with Java I've grown
> to love the Swing library - easy to use, fast (in terms of development)
> for windowed programs and of course it fits with the spirit of an OO
> program.
>
> So now I'm thinking of going back to WoT once again (this is about a 60%
> probability, but I'm just doing some thinking about it now). I don't
> really want to switch to Java as that would mean that it would be harder
> for me to reuse some of my old code (of which I have a lot) - and it is
> slower than C++ performance-wise. Instead I want to use a differend
> graphics library.
>
> What I'm looking for needs to meet these criteria:
> - Free (in terms of monetary cost, I don't care for the 'Free Software'
> movements) - Preferable GPLed - I want to keep my project closed source at
> least for a while - Easy to use
> - Good documentation
> - Suitable for a graphical-tiled roguelike game (so no need for fancy 3D
> effects, etc, but more than just an @ running around the screen) - Windows
> compatible
>
> I hope this is not too Utopian. Anyone know of any such library?

SDL. I just started playing around with it myself, and have been very
pleased with it. It was really easy to get started with, and was fun
as hell to use. After toying around with DirectX and OpenGL in the
past, I found the simplicity of SDL to be a godsend. It didn't take
me long to get some simple graphical little test programs up and
running, and it features a lot of additional libraries to allow you to
do pretty much anything you need to do.

Allegro is another option, although I personally didn't like it as
much. Can't really say why, but it wasn't nearly as fun to use as SDL
is now, and I really don't care for their approach. SDL is relatively
barebones, but is designed to be very modular. When you want to add
in support for something else (MP3s, OGG, jpeg, etc.), you just plug
in the appropriate library (SDL_mixer, SDL_truetype, etc.). It keeps
bloat down, because you only need to add what you need for your
program. Allegro includes most of it's functionality built in.
Nothing wrong with that, necessarily, but I prefer the modular
approach. Also, I was able to find a lot of really good tutorials for
SDL, compared to the far fewer number of Allegro tutorials.

Those are my two recommendations. Both are suitable choices, although
I personally found SDL to be much more enjoyable to work with.
Granted, I'm probably the wrong person to give advice concerning
Allegro, since I quit using it after a week or so. I guess it just
didn't "do it" for me.

Also worth noting, SDL has a great little abstraction layer for
network programming, if you're into that sort of thing. I'm
considering adding multiplayer capabilities to my game, just because
of that nice little bit of functionality. Plus, it was very easy to
play music and sound effects. A few lines of code, and I was playing
mp3s. Very handy. After DoomRL's outstanding improvement, thanks to
music and sound, I'd consider that a must have in any new roguelike.

Hope I've been of some help! If not, well, too bad. ;-)


--
"There are of course many problems connected with life, of
which some of the most popular are `Why are people born?'
`Why do they die?' `Why do they spend so much of the
intervening time wearing digital watches?'"

-- The Book.
 
Archived from groups: rec.games.roguelike.development (More info?)

Kostatus wrote:
> What I'm looking for needs to meet these criteria:
> - Free (in terms of monetary cost, I don't care for the 'Free Software'
> movements) - Preferable GPLed - I want to keep my project closed source at
> least for a while - Easy to use
> - Good documentation
> - Suitable for a graphical-tiled roguelike game (so no need for fancy 3D
> effects, etc, but more than just an @ running around the screen) - Windows
> compatible
>
> I hope this is not too Utopian. Anyone know of any such library?

Three letters -- S D L ;-)

--
At your service,
Kornel Kisielewicz (charonATmagma-net.pl) [http://chaos.magma-net.pl]
"The name of GenRogue, has become a warning against excessively
complex design." -- RGRD FAQ
 
Archived from groups: rec.games.roguelike.development (More info?)

Kostatus wrote:
> Hi all,
>
> As you see I'm not gone from you all for good yet. I made my last
post
> here around December(?) last year saying that I'm going to do some
massive
> code restructuring in WoT, that started out great but then I got
better
> things to do and didn't have much time left for it so I just stopped
> again. Anyway, you don't need my life story.
>
> So far I've been using C++ with Windows GDI as my graphics library
(if you
> may call it a library) for WoT - but that seems quite clumsy to use
in OO
> code. And now that I have done quite a lot of work with Java I've
grown
> to love the Swing library - easy to use, fast (in terms of
development)
> for windowed programs and of course it fits with the spirit of an OO
> program.
>
> So now I'm thinking of going back to WoT once again (this is about a
60%
> probability, but I'm just doing some thinking about it now). I don't
> really want to switch to Java as that would mean that it would be
harder
> for me to reuse some of my old code (of which I have a lot) - and it
is
> slower than C++ performance-wise. Instead I want to use a differend
> graphics library.
>
> What I'm looking for needs to meet these criteria:
> - Free (in terms of monetary cost, I don't care for the 'Free
Software'
> movements) - Preferable GPLed - I want to keep my project closed
source at
> least for a while - Easy to use
> - Good documentation
> - Suitable for a graphical-tiled roguelike game (so no need for fancy
3D
> effects, etc, but more than just an @ running around the screen) -
Windows
> compatible
>
> I hope this is not too Utopian. Anyone know of any such library?

I'll join the chorus here with "SDL".

I'll up the ante by pointing you to:
http://www.zincland.com/7drl/liveonce
where you can find C++ source code for roguelike using SDL under
Windows for the tiles.
--
Jeff Lait
(POWDER: http://www.zincland.com/powder)
 
Archived from groups: rec.games.roguelike.development (More info?)

U¿ytkownik "Kostatus" <to.get.my.email@see.bottom.of.this.post>
napisa³ w wiadomo¶ci news:Xns96507791597F5Kostatus@203.109.252.31...

> I hope this is not too Utopian. Anyone know of any such library?

Try SDL, you won't end up as an underprivileged minority ;-)

regards,
Filip
--
Contrary to what some people say, my OS _is_ a lifestyle choice, not a
tool; however, I am against osizm