Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Is good enough?  (Read 23764 times)

0 Members and 5 Guests are viewing this topic.

Core Xii

  • Jr. Member
  • **
  • Posts: 54
    • MSN Messenger - corexii@gmail.com
    • AOL Instant Messenger - Core+Xii
    • View Profile
Is good enough?
« Reply #15 on: August 08, 2009, 01:50:17 pm »
Quote from: "heishe"
SFML isn't even supposed to be a "engine". It's a fucking library for the very basic stuff.


And that's why I would not recommend it for any... complicated projects (anything but the simplest raster graphics). It limits creativity. Every time I consider using SFML for one of my projects I run into some limitation and have to go back to reinventing the wheel. It doesn't have the simplest stuff like palette mode and vectors.

But of course, SFML is still in active development. That's why I'm lurking around here.

l0calh05t

  • Full Member
  • ***
  • Posts: 200
    • View Profile
Is good enough?
« Reply #16 on: August 08, 2009, 02:14:37 pm »
Quote from: "Core Xii"
It doesn't have the simplest stuff like palette mode and vectors.


Why would anyone want/need a palette mode?

eleinvisible

  • Newbie
  • *
  • Posts: 47
    • View Profile
Is good enough?
« Reply #17 on: August 08, 2009, 11:44:27 pm »
Quote from: "Core Xii"
It limits creativity.
Are you saying libraries limit creativity compared to engines? I would have to disagree, a person is free to implement the game however he pleases with SFML but other systems make you use their "descriptor" formats, especially for sprites and animations. In SFML you can implement it the way you find most intuitive. Furthermore, the commercial RPG Torchlight (made by former Blizzard employees who worked on Diablo 2) uses Ogre3D. This is a testament to open source software's ability to progress and compete with commercial libraries. And now may we let this horrid topic die.

Core Xii

  • Jr. Member
  • **
  • Posts: 54
    • MSN Messenger - corexii@gmail.com
    • AOL Instant Messenger - Core+Xii
    • View Profile
Is good enough?
« Reply #18 on: August 09, 2009, 02:09:53 pm »
Quote from: "l0calh05t"
Why would anyone want/need a palette mode?


What kind of a question is that? That's like asking "why would anyone want 3D graphics?" It's an art style as any other. Not as frequently used perhaps, but an art style nonetheless.

l0calh05t

  • Full Member
  • ***
  • Posts: 200
    • View Profile
Is good enough?
« Reply #19 on: August 09, 2009, 02:34:22 pm »
Quote from: "Core Xii"
What kind of a question is that? That's like asking "why would anyone want 3D graphics?" It's an art style as any other. Not as frequently used perhaps, but an art style nonetheless.


No, it's not an art style, it's a limitation. Everything that can be done in palette mode, can be done in 24-bit colors (you just have to limit yourself to a certain pallette).

And here's a suggestion: Why not render in 8-bit grayscale and do a post-fx palette mapper  :P

Core Xii

  • Jr. Member
  • **
  • Posts: 54
    • MSN Messenger - corexii@gmail.com
    • AOL Instant Messenger - Core+Xii
    • View Profile
Is good enough?
« Reply #20 on: August 10, 2009, 03:53:12 pm »
Quote from: "l0calh05t"
No, it's not an art style, it's a limitation.

Are you kidding me? Who makes arguments like that seriously? If limitations were not art styles, the only kind of art style we would have is as realistic as possible. Please tell me you were joking with that incredibly stupid comment. The only kind of art we would have would be photographs and photorealistic renderings.

Quote from: "l0calh05t"
Everything that can be done in palette mode, can be done in 24-bit colors (you just have to limit yourself to a certain pallette).


Here we go again... Yes, you can eat soup with a fork but the spoon just does it better. You can emulate palette mode with 24-bit graphics but it's inefficient, you're forced to draw each sprite multiple times for each palette you intend to use on it.

Here, I'll give you an example. Suppose we have 100 sprites of 16x16 pixels in size, 4 bits per pixel. 16 palettes with 4 colors each, 32 bits per color.

With palette mode, all this takes only 13056 bytes or ~13 kilobytes to store in memory. And you can display any sprite with any palette.

With 24-bit graphics as you suggest, it would require a whopping 1638400 bytes or ~1.6 megabytes to store! That's a 12549% increase in memory consumption!

Quote from: "l0calh05t"
And here's a suggestion: Why not render in 8-bit grayscale and do a post-fx palette mapper  :P


Because it's not the same. You can't draw any sprite with any palette with that.


Now thankfully, you probably won't need every sprite in every palette in practice, but my point stands. It's more efficient. And easier.

dunce

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Is good enough?
« Reply #21 on: August 11, 2009, 05:32:30 am »
Core Xii, you seem to be here just for trollish flame. If you don't like SFML or other free libs, wouldn't you just pass by?  :evil:  :evil:  :evil:

orgos

  • Newbie
  • *
  • Posts: 27
    • View Profile
Is good enough?
« Reply #22 on: August 11, 2009, 06:17:52 am »
I think the point of Core Xii is not making a critize of SFML but triying to get better SFML with some issues.

l0calh05t

  • Full Member
  • ***
  • Posts: 200
    • View Profile
Is good enough?
« Reply #23 on: August 11, 2009, 08:30:25 am »
Quote from: "Core Xii"
Are you kidding me? Who makes arguments like that seriously? If limitations were not art styles, the only kind of art style we would have is as realistic as possible. Please tell me you were joking with that incredibly stupid comment. The only kind of art we would have would be photographs and photorealistic renderings.


Yes, I am serious, and your metaphor is totally off. Do painters only paint photorealistic paintings, just because they have many kinds of paint and brushes? No, they still make all types of painting, despite not being limited to -say- flat brushes.

Quote
Here we go again... Yes, you can eat soup with a fork but the spoon just does it better. You can emulate palette mode with 24-bit graphics but it's inefficient, you're forced to draw each sprite multiple times for each palette you intend to use on it.

Here, I'll give you an example. Suppose we have 100 sprites of 16x16 pixels in size, 4 bits per pixel. 16 palettes with 4 colors each, 32 bits per color.

With palette mode, all this takes only 13056 bytes or ~13 kilobytes to store in memory. And you can display any sprite with any palette.

With 24-bit graphics as you suggest, it would require a whopping 1638400 bytes or ~1.6 megabytes to store! That's a 12549% increase in memory consumption![/i]


So what? An average PC today comes with, what, 1GiB of Memory? So in one case you're using 0.001% and in the other 0.15% of total memory. Not much either way. Also you don't really have to draw them once for each palette. You can store them in palette mode and simply "expand" them on load.

Quote
Because it's not the same. You can't draw any sprite with any palette with that.


Then use 8 bit colors and shade the sprites individually using different textures as palletes (this is admittedly not supported by SFML)

Quote
Now thankfully, you probably won't need every sprite in every palette in practice, but my point stands. It's more efficient. And easier.


Well, about the more efficient part... I'd like to point out that the paletted texture opengl extension can only be considered deprecated ( http://www.opengl.org/wiki/Common_Mistakes#Palette ). So in any case the textures would still have to be "expanded".

This discussion is getting a little off track, so if you want to continue... just send me a pm  :wink:

Core Xii

  • Jr. Member
  • **
  • Posts: 54
    • MSN Messenger - corexii@gmail.com
    • AOL Instant Messenger - Core+Xii
    • View Profile
Is good enough?
« Reply #24 on: August 11, 2009, 07:24:42 pm »
Quote from: "dunce"
Core Xii, you seem to be here just for trollish flame. If you don't like SFML or other free libs, wouldn't you just pass by?  :evil:  :evil:  :evil:

God, what's with all the hate? All I'm trying to do here is have an intelligent debate on whether SFML is good enough for StarCraft, the topic's original question.

I am not saying SFML sucks. I just want you to acknowledge that it's not the one and only all-powerful solution to all our problems. I already said I use SFML myself, didn't I? Not talking about one's flaws for the sake of not springing argument is just ignorance and stupidity.

Quote from: "l0calh05t"
Yes, I am serious, and your metaphor is totally off. Do painters only paint photorealistic paintings, just because they have many kinds of paint and brushes? No, they still make all types of painting, despite not being limited to -say- flat brushes.

And now suppose someone comes up with a painter's kit to aid painters in their work. It does not include flat brushes at all. And you're arguing that nobody uses those anyway. (actually, someone comes in and asks if the painter's kit is good enough to paint the Mona Lisa, etc....)

Quote from: "l0calh05t"
So what? An average PC today comes with, what, 1GiB of Memory? So in one case you're using 0.001% and in the other 0.15% of total memory. Not much either way.

SFML is also designed to run on low-end and embedded systems. (wait, I couldn't find any mention of this on the features page; Isn't it?)

Quote from: "l0calh05t"
Then use 8 bit colors and shade the sprites individually using different textures as palletes (this is admittedly not supported by SFML)

Why suggest something that's not supported?

I don't think it's getting off topic. We're still discussing whether SFML is good enough for StarCraft.

l0calh05t

  • Full Member
  • ***
  • Posts: 200
    • View Profile
Is good enough?
« Reply #25 on: August 11, 2009, 08:09:43 pm »
Quote from: "Core Xii"
And now suppose someone comes up with a painter's kit to aid painters in their work. It does not include flat brushes at all. And you're arguing that nobody uses those anyway. (actually, someone comes in and asks if the painter's kit is good enough to paint the Mona Lisa, etc....)

Since were talking about colors... what about this: You give a painter 256 colors... or you give him 16.7 million colors (including all those 256 colors)... can't he do everything he can do with the 256, when given 16.7 million?

Quote
SFML is also designed to run on low-end and embedded systems. (wait, I couldn't find any mention of this on the features page; Isn't it?)


It's targeted at OpenGL 1.2 systems. Which by today's standards is very low end. Embedded systems not quite yet... (No OpenGL ES support... btw... did you know that GLES2 is a shader-only pipeline :P )

(PS: your sprite example would still only use up 1.22% of memory on a 128MiB machine)

Quote

Why suggest something that's not supported?

It's not -directly- supported, but you could of course make your own extension... (wouldn't be GL 1.2 anymore though) Besides, it's the only option except expanding the paletted images at load time. (OpenGL does not support palettes, no way around that)

Quote
I don't think it's getting off topic. We're still discussing whether SFML is good enough for StarCraft.

Which it definitely is  :lol:

Core Xii

  • Jr. Member
  • **
  • Posts: 54
    • MSN Messenger - corexii@gmail.com
    • AOL Instant Messenger - Core+Xii
    • View Profile
Is good enough?
« Reply #26 on: August 12, 2009, 06:55:32 pm »
Quote from: "l0calh05t"
Since were talking about colors... what about this: You give a painter 256 colors... or you give him 16.7 million colors (including all those 256 colors)... can't he do everything he can do with the 256, when given 16.7 million?

That would be a valid analogy if we were debating bit-depth. But we're not; This is about the pixel format, RGBA versus palette index.

Quote from: "l0calh05t"
(PS: your sprite example would still only use up 1.22% of memory on a 128MiB machine)

Fine, I'm a perfectionist. So kill me. :wink:

l0calh05t

  • Full Member
  • ***
  • Posts: 200
    • View Profile
Is good enough?
« Reply #27 on: August 12, 2009, 07:11:16 pm »
Quote from: "Core Xii"
That would be a valid analogy if we were debating bit-depth. But we're not; This is about the pixel format, RGBA versus palette index.

Ok, he gets the same 16.7 Mil. colors but is only allowed to use 256 at the same time  :lol:

Quote
Fine, I'm a perfectionist. So kill me. :wink:

Hey, that's ok. Doesn't change anything about OpenGL (and therefore SFML) being incompatible with real palette modes (aside from emulation via shaders, which would be GL 2.0).

Core Xii

  • Jr. Member
  • **
  • Posts: 54
    • MSN Messenger - corexii@gmail.com
    • AOL Instant Messenger - Core+Xii
    • View Profile
Is good enough?
« Reply #28 on: August 15, 2009, 05:30:03 am »
Quote from: "l0calh05t"

Ok, he gets the same 16.7 Mil. colors but is only allowed to use 256 at the same time  :lol:

Still no. Palette mode doesn't restrict you to 256 colors. You can use any number of bits for that, just as with RGBA.

The trick is that you can change easily what the colors are by swapping the palette.

Jaenis

  • Newbie
  • *
  • Posts: 48
    • View Profile
Is good enough?
« Reply #29 on: August 15, 2009, 07:11:48 am »
Quote from: "Core Xii"
The trick is that you can change easily what the colors are by swapping the palette.

This can be done with shaders, as l0calh05t already pointed out.
And since those shaders are supported by SFML, why couldn't you just use that approach?

 

anything