SDL 1.1.7 and svgalib problems

Hi,

I have tested freecraft with SDL 1.1.7 and found following problems.

  1. SDL with svgalib didn’t restores termios

    After running, I must make “stty sane” to restore my terminal
    settings. FreeCraft with its own svgalib driver works fine.

  2. SDL with svgalib has a very fast mouse cursor.

    The mouse cursor moves the half screen, if I only touches the
    mouse. FreeCraft with its own svgalib driver works fine, but I
    set the mouse scale self with mouse_setscale(1) and divide the
    mouse moves through 15.

    If I disable in /etc/vga/libvga.config the acceleration
    (mouse_accel_type off) my program works with SDL fine.

    Anybody else is using svgalib and can verify this?

I have svgalib 1.4.1 and configured SDL with
./configure --enable-video-svga --enable-video-aalib --prefix=/usr
–enable-video-opengl --disable-alsa

  1. The new timer code (threaded) breaks my code

    I use select to get all inputs and events, the new SDL timer
    code didn’t interrupts the select call. I have fixed this by
    hot polling for events and inputs and timer.

    I suggest for SDL 1.3 a new input and event handling API.

Bye,
Johns–
Become famous, earn no money, create music or graphics for FreeCraft.

http://FreeCraft.Org - A free fantasy real-time strategy game engine
http://fgp.cjb.net - The FreeCraft Graphics Project

Hi folks,

I’m looking for a good bitmap editor (Linux - console or under X).

Herr… what I mean ‘good’? Common bitmap-editing functions, stable, not huge
(ciao Corel), “ergonomic” and standard file-format support (don’t need filters
nor distortion no vector…).
Something like Deluxe Paint under Amiga/Atari or Neochrome, Degas Elite,
etc.

I did not find the way under The Gimp to set the depth of a bitmap to want I
want (is this possible???), Xpaint is uggly, SatanPaint buggy with some video
modes, pixmap bof, and every others in Tucows/linux/console|X11/gfx seem not to
be designed for game designers.

I have heard of AOCP, a Deluxe Paint clone, but no mirror has it, and the
official url I can find in many Tool libraries is broken (since 1997?).

Do someone as a AOCP tgz, or the name/url of another bitmap editor that I can
try?

Thanx a lot by advance,

regards

wwp

  1. The new timer code (threaded) breaks my code

I use select to get all inputs and events, the new SDL timer
code didn’t interrupts the select call. I have fixed this by
hot polling for events and inputs and timer.

what do you use select for? Monitoring other descriptors?
You can try doing that in another thread and post events to the main thread
about it

I suggest for SDL 1.3 a new input and event handling API.

so what do you suggest?

I’m looking for a good bitmap editor (Linux - console or under X).

I did not find the way under The Gimp to set the depth of a bitmap to want I
want (is this possible???)

Gimp supports 24 bit RGB with alpha channel, or 8 bit indexed colours, and
loading/saving in a variety of formats, many of which are supported by
SDL or SDL_image

Gimp is mostly good for editing RGB images and I have looked for something
that would handle palettized images better, but gimp is usually good enough
for that as well. You could write your own image editor for that but it
would probably be more worthwhile to add functionality to gimp instead

Gimp supports 24 bit RGB with alpha channel, or 8 bit indexed colours, and
loading/saving in a variety of formats, many of which are supported by
SDL or SDL_image

I don’t know how to create a 8-bit palettized image with The Gimp…
I feel The Gimp VERY boring with his Visual Depth & Class, I’m in 16-bit move
under X, and Gimp is always showing true-color palette, and saving new created
file as 24-bit… arg! Is there a way to create a new indexed color image
(8-bit)?

You’re right about the possibility to edit indexed color palette, The Gimp can
be used whereas it’s not really comfortable for game’s bitmaps design.

Cheers,

wwpOn Sat, 27 Jan 2001, you wrote:

Herr… what I mean ‘good’? Common bitmap-editing functions, stable, not huge
(ciao Corel), “ergonomic” and standard file-format support (don’t need filters
nor distortion no vector…).
Something like Deluxe Paint under Amiga/Atari or Neochrome, Degas Elite,
etc.
Why don’t you use it simply? Take WinUAE and let the amiga life again…
BTW, IMHO it is STILL the most useful pixel tool.

Regards,
Andreas Podgurski

wwp wrote:

Gimp supports 24 bit RGB with alpha channel, or 8 bit indexed colours, and
loading/saving in a variety of formats, many of which are supported by
SDL or SDL_image

I don’t know how to create a 8-bit palettized image with The Gimp…
To convert a picture to 8-bit palettized use image->mode->indexed in the
menu.

Bye, Karl.> On Sat, 27 Jan 2001, you wrote:

Andreas,On Sat, 27 Jan 2001, you wrote:

Why don’t you use it simply? Take WinUAE and let the amiga life again…
BTW, IMHO it is STILL the most useful pixel tool.

Huu, funny! my own oldy-atari is dismantled in a dark room, and workin’ with an
emulator… bah, not very handy :slight_smile:

I’m still looking for AOCP… praying for someone to say “Yes I got it”… but
now, thanx to Mattias, I know that The Gimp can be helpful for color
palettized bitmap-editing.

Regards,

wwp

Try the option “Image/Indexed”, after create the image, to convert image
to a 256 colors palette.
Anyway I think Gimp is not the right tool to make bitmap images, doesn’t
have lines or circles tools, you must work pixel by pixel.On Sat, 27 Jan 2001, wwp wrote:

I don’t know how to create a 8-bit palettized image with The Gimp…
I feel The Gimp VERY boring with his Visual Depth & Class, I’m in 16-bit move
under X, and Gimp is always showing true-color palette, and saving new created
file as 24-bit… arg! Is there a way to create a new indexed color image
(8-bit)?

Roger D. Vargas | "Humans have so many emotions, Artoo. And most
VQt Development Team | seem to cause them pain. I do not understand,
http://vqt.sourceforge.net | but I’m glad I have none. And yet – I can’t help
wondering sometimes… what it would be like."
C-3PO, Protocol Droid. Star Wars 2: World of Fire.

Anyway I think Gimp is not the right tool to make bitmap images, doesn’t
have lines or circles tools, you must work pixel by pixel.

shift-click with a brush or pencil tool to draw a line from the previous
drawn spot. Mark a circle and use Stroke from the Edit menu to draw a circle
or ellipse

this is getting offtopic, so for any more gimp discussions, please turn to
another forum (i.e. the newsgroup comp.graphics.apps.gimp)

To make a line:
1\ choose your brush
2\ hold down shift
3\ click where you want the line to start
4\ click where you want the line to finish
5\ release shift

To make a circle:
1\ choose the “select elliptical regions” tool
2\ click where you want the top left “corner” of the circle
3\ click where you want the bottom right “corner” of the circle (hold
down shift to force it to be circular)
4\ if you want a filled circle, select the “fill” tool and click inside
the circle
4a\ if you want a circle border, right click and choose select->border.
use the fill tool to fill in that border

Ok, yes making circles is a pain (there’s prolly an easier way though),
but lines are simple.

Julian.On 27 Jan 2001 14:04:04 -0500, Roger D. Vargas wrote:

On Sat, 27 Jan 2001, wwp wrote:

I don’t know how to create a 8-bit palettized image with The Gimp…
I feel The Gimp VERY boring with his Visual Depth & Class, I’m in 16-bit move
under X, and Gimp is always showing true-color palette, and saving new created
file as 24-bit… arg! Is there a way to create a new indexed color image
(8-bit)?
Try the option “Image/Indexed”, after create the image, to convert image
to a 256 colors palette.
Anyway I think Gimp is not the right tool to make bitmap images, doesn’t
have lines or circles tools, you must work pixel by pixel.

One of the reasons I like Gimp is because it supports PNG very well - and
PNG has all the things a game designer needs - deep colors, good alpha
support, and good compression. If you are making a game, you don’t want to
limit the color depth to make it simpler. (And personally, I don’t like
palettes because they are so hard to deal with, but PNG supports that quite
well as well). Gimp also has some very powerful bitmap editing techniques,
if you want to work pixel-by-pixel.

Of course, that’s just my vote.

Gimp works GREAT on windows as well, so if you are working with windows
people, it is a breeze.

And yes, if you need something that’s not there, it probably already is
(like Perl’s libraries :slight_smile: ). If it isn’t, you could probably add it using
your favorite scripting language. (Whatever it may be.)

That’s where I ended up after my long search for a bitmap editor. It’s just
my opinion, however.> ----- Original Message -----

From: f91-men@nada.kth.se (Mattias Engdegard)
To:
Sent: Saturday, January 27, 2001 8:48 AM
Subject: Re: [SDL] GFX - Bitmap-editor for game designers

: >I’m looking for a good bitmap editor (Linux - console or under X).
:
: >I did not find the way under The Gimp to set the depth of a bitmap to
want I
: >want (is this possible???)
:
: Gimp supports 24 bit RGB with alpha channel, or 8 bit indexed colours, and
: loading/saving in a variety of formats, many of which are supported by
: SDL or SDL_image
:
: Gimp is mostly good for editing RGB images and I have looked for something
: that would handle palettized images better, but gimp is usually good
enough
: for that as well. You could write your own image editor for that but it
: would probably be more worthwhile to add functionality to gimp instead
:
:

I did not find the way under The Gimp to set the depth of a bitmap to want I
want (is this possible???)

Image -> Image -> Mode

You can select RGB, Greyscale, or Indexed. In the latter, you lose access
to quite a few filters, scripts and color controls, but you can chose exactly
how many colors you want the image to contain.

I haven’t dealt much with indexed images, except when creating GIFs.
There are palette controls and the like, but I can’t say how useful they
are. (Knowing Gimp, they’re probably quite sufficient, though.)

Good luck!

-bill!

I don’t know how to create a 8-bit palettized image with The Gimp…
I feel The Gimp VERY boring with his Visual Depth & Class, I’m in 16-bit move
under X, and Gimp is always showing true-color palette, and saving new created
file as 24-bit… arg! Is there a way to create a new indexed color image
(8-bit)?

How about this? :slight_smile:

Toolbox -> File -> New (Image Type: RGB)
Image -> Image -> Mode -> Indexed (# of Colors: 256)
Image -> Dialogs -> Palette

There are a number of palettes in the “Select” tab. Not 100% sure how to
use them. (My Gimp book is at work)

Image -> Dialogs -> Indexed Color Palette

Here, you can see any colors living in the indexed image right now.
You can also edit them (right click a color, select “Edit”), or add
a new one (right click, select “Add”… actually duplicates whichever
color you had right clicked, so you’ll then want to Edit it)

You can also drag-n-drop colors from the “Color Palette” window
into your “Indexed Color Palette” window. (Not sure how to add an entire
collection, or load/save palettes… I’m guessing you can, but I don’t
have my Gimp books with me :slight_smile: )

From there, it’s all pencil tool. :slight_smile: Have fun making sprites!

-bill!
bill at newbreedsoftware.com
http://www.newbreedsoftware.com/bill/

4a\ if you want a circle border, right click and choose select->border.
use the fill tool to fill in that border

Ok, yes making circles is a pain (there’s prolly an easier way though),
but lines are simple.

Cool! I never noticed that option. :slight_smile: I always used “Edit -> Stroke”,
which doesn’t do what I need sometimes.

-bill!

heh, likewise, somehow the “stroke” option escaped me =)
Learn something new everyday.

ok, now we’re completely off topic.

Julian.On 28 Jan 2001 01:46:05 -0800, William Kendrick wrote:

4a\ if you want a circle border, right click and choose select->border.
use the fill tool to fill in that border

Ok, yes making circles is a pain (there’s prolly an easier way though),
but lines are simple.

Cool! I never noticed that option. :slight_smile: I always used “Edit -> Stroke”,
which doesn’t do what I need sometimes.

-bill!

heh, likewise, somehow the “stroke” option escaped me =)
Learn something new everyday.

Heck, I just learned how to do a circle in the GIMP from both you guys. :)On 28 Jan 2001, Julian Peterson wrote:

Craig Maloney (@Craig_Maloney) http://ic.net/~craig
In an orderly world, there’s always a place for the disorderly.

Yes, it 's svgalib issue and best things is disable 'mouse_accel_type’
anytime.> 2) SDL with svgalib has a very fast mouse cursor.

The mouse cursor moves the half screen, if I only touches the
mouse. FreeCraft with its own svgalib driver works fine, but I
set the mouse scale self with mouse_setscale(1) and divide the
mouse moves through 15.

If I disable in /etc/vga/libvga.config the acceleration
(mouse_accel_type off) my program works with SDL fine.

Anybody else is using svgalib and can verify this?

I have tested freecraft with SDL 1.1.7 and found following problems.

  1. SDL with svgalib didn’t restores termios

After running, I must make “stty sane” to restore my terminal
settings. FreeCraft with its own svgalib driver works fine.

I’ll take a look…

I don’t see any difference between the FreeCraft SVGAlib cleanup code
and the SDL SVGAlib cleanup code. Both perform vga_setmode(TEXT) followed
by keyboard_close(). I can’t get SVGAlib to work with my G450, so I can’t
debug this myself. Any ideas?

  1. SDL with svgalib has a very fast mouse cursor.

The mouse cursor moves the half screen, if I only touches the
mouse. FreeCraft with its own svgalib driver works fine, but I
set the mouse scale self with mouse_setscale(1) and divide the
mouse moves through 15.

If I disable in /etc/vga/libvga.config the acceleration
(mouse_accel_type off) my program works with SDL fine.

As mentioned before, SDL is just reporting the raw values given to
it by SVGAlib, respecting the user preferences. You probably shouldn’t
have acceleration defined in libvga.config

  1. The new timer code (threaded) breaks my code

I use select to get all inputs and events, the new SDL timer
code didn’t interrupts the select call. I have fixed this by
hot polling for events and inputs and timer.

Using select() is inherently non-portable. You shouldn’t rely on the
SDL timer to interrupt anything. If you need for the select() to be
interrupted periodically, you may want to set the timeout value in the
select() call explicitly, or use setitimer() directly.

There are several reasons why SDL doesn’t use select() internally.
One is that X protocol transactions trigger the select() call and
another is because select() doesn’t handle the case where the user
is adding user-defined events from a different thread.

Thanks for the feedback! :slight_smile:

See ya!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

Sam Lantinga wrote:

I have tested freecraft with SDL 1.1.7 and found following problems.

  1. SDL with svgalib didn’t restores termios
  After running, I must make "stty sane" to restore my terminal
  settings. FreeCraft with its own svgalib driver works fine.

I’ll take a look…

I don’t see any difference between the FreeCraft SVGAlib cleanup code
and the SDL SVGAlib cleanup code. Both perform vga_setmode(TEXT) followed
by keyboard_close(). I can’t get SVGAlib to work with my G450, so I can’t
debug this myself. Any ideas?

I have searched for the bug, but I didn’t found it.
But I have found that with testwin, the keyboard terminal setting is destroyed,
with testkey not.

Any trick how I can rebuild the library faster? Just make didn’t build a
new library, I must make “make clean; make install”.

I will look more.

  1. SDL with svgalib has a very fast mouse cursor.
  The mouse cursor moves the half screen, if I only touches the
  mouse. FreeCraft with its own svgalib driver works fine, but I
  set the mouse scale self with mouse_setscale(1) and divide the
  mouse moves through 15.
  If I disable in  /etc/vga/libvga.config the acceleration
  (mouse_accel_type off) my program works with SDL fine.

As mentioned before, SDL is just reporting the raw values given to
it by SVGAlib, respecting the user preferences. You probably shouldn’t
have acceleration defined in libvga.config

Perhaps a point for the FAQ.–
Become famous, earn no money, create music or graphics for FreeCraft

http://FreeCraft.Org - A free fantasy real-time strategy game engine
http://fgp.cjb.net - The FreeCraft Graphics Project