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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - nitram_cero

Pages: [1] 2 3
1
The change (at Font.cpp):
FT_Glyph_To_Bitmap(&glyphDesc, FT_RENDER_MODE_NORMAL, 0, 1);
to
FT_Glyph_To_Bitmap(&glyphDesc, FT_RENDER_MODE_MONO, 0, 1);
(with a way to toggle it that fits with the rest of the Font interface)

The reason:
I'm into retro-looking games with big pixels and low color count palettes. I like using SFML2 because it has a really confortable interface, has window init, scaling, rotation, fonts, network, almost everything I need already handled.

Except for antialiasing of fonts. I managed to just change the libraries code but that's no solution and I think it's a missing feature.
Analogously it would be a pain if "setSmooth()" wasn't there to toggle textures anti-aliasing from nearest neighbour (off) to bilinear.

I've attached an image explaining it better (direct link, make sure it's unzoomed/1:1 pixel ratio)...
For both FreeType render modes, there are both No-zoom version and a render-to-texture (RTT) version where my problem is more evident.

Hope you give it a thought
Best regards

-Martín

[attachment deleted by admin]

2
Graphics / Update a texture subrect with an image subrect
« on: May 25, 2012, 02:45:39 am »
I'm using SFML2 and trying to update a texture subrect with an image subrect.
That way I keep a "dirty rectangle" and a cache of pixels (sf::Image) of the same size as the final texture and only update the necessary parts of the sf::Texture if needed.
(Sort of what sf::Sprite::SetPixel did on SFML1.6)

Now, I don't see a way of doing it with SFML2.

Shouldn't there be a method for what I'm asking?
Something like
sf::Texture::update(sf::Image &img, int imgX, int imgY, int txX, int txY, int width, int height);
or
sf::Texture::update(sf::Uint8 *imgPixels, int imgX, int imgY, int txX, int txY, int width, int height);

Am I missing a way?

Thanks!

3
I'm helping on the diffusion of this contest.
ADVA is an game development organization here in Argentina.
If you could spread the word it would be awesome, as the more people voting means the results will be more fair (we got just 39 voters on the last contest).


The page is an index of the games and you can vote right there.
Everything is in english, so you won't get lost :)


http://www.adva.com.ar/codear-mashup-games/


I think the only game using SFML is mine, but check all of them if you have time.

(I hope this is ok to post here about this. :oops: )

Thanks for your time.
-Martín

4
Network / Congratulations
« on: June 25, 2009, 02:46:35 pm »
I know I'm always bitching around about stuff :lol:

But I want to congratulate you (Laurent) on the design of a great game-oriented networking interface.

It's easy to understand, has a lot of functionality (I truly didn't expect  sf::IPAddress::GetPublicAddress()).

Even if I complain a lot, I can also appreciate things too :P

Great job!
-Martín

(I'm such a suck-up :lol:)

5
Graphics / [IMPORTANT!] Using floats for projection matrix sucks.
« on: June 19, 2009, 06:00:58 pm »
Finally I figured it out!

This issue has been pointed out in this thread.
Using the example there can this hack be tested for the change in behaviour.

I found this blog post that talked exactly about this issue, but for OpenGL ES for the iPhone. Credits to that fellow.

I hacked the RenderTarget drawing function in SFML1-svn (when it loads the projection matrix) to prove my point.
This hack consists in using a double-precision projection matrix instead of float-precision one.

Please download the svn-patch here and try it out!

Aside note:
A debug-time assertion should be made when accessing Matrix3::operator() out of bounds, instead
of just returning the first element


Regards
-Martín

6
Needed for files with Unicode characters (e.g. Open a filename in russian, japanese, chinese, etc.)

I'm making an application with SFML+wxWidgets and images will be loaded depending on user input. I can't know beforehand the filenames nor change them.
For now I just copy the image file to an ANSI path (duplicate the file), load it, and delete it... but this is no solution.

I think someone else already asked for this. Sorry if it's repeated, I searched the forum but I don't seem to find it.

Thanks
-Martín

7
Feature requests / Peeking for events
« on: June 17, 2009, 02:54:07 am »
Is there a function to know if there are any pending window events?

It would be great to avoid constant CPU use for applications that only change their display with user input (like multiple SFML windows integrated in a GUI).

Something like "bool Window::HasPendingEvents();" would be great.

Thanks
-Martín

8
I'm requesting the ability to change the rendering mode when loading font glyphs to a texture.
For pixel-based games (i.e. pixellated, "vintage looking", etc.)
As antialiased fonts look bad where everything else is pixelated.

With this parameter, the font's image smoothness should also be disabled (SetSmooth(false))

(this will solve the issue for this other guy in the forum)

"Where to change it":
src\SFML\Graphics\FontLoader.cpp @ 213
Code: [Select]
FT_Glyph_To_Bitmap(&Glyph, FT_RENDER_MODE_NORMAL, 0, 1);

Quote
FT_RENDER_MODE_NORMAL   

This is the default render mode; it corresponds to 8-bit anti-aliased bitmaps.

FT_RENDER_MODE_MONO   

This mode corresponds to 1-bit bitmaps (with 2 levels of opacity).


Example!



Thanks
-Martín

9
Audio / Error looping wavs.
« on: June 12, 2009, 10:27:31 am »
When I try to loop a sf::Sound from a Wav file, it doesn't. But when I do it with an Ogg file, it works!

You can try them for yourself.
Both were exported from the same sound data using Audacity.
http://sharebee.com/df99e078

10
Graphics / Cascade of transformations inheriting from Drawable?
« on: June 11, 2009, 06:33:24 pm »
Hi, I'm willing to implement cascading transformations for a skeleton system.

Children joints would have to be transformed as the parent previous to their own transformations.
This will allow me, for example, to have a translated hat as a children of the head joint, but when applying a rotation to the head... the hat would rotate acordingly and be correctly positioned.

If I draw a sprite inside my joint's Draw() function (derived from Drawable), is there a way to make it multiply the transformation matrix (glMultMatrix) instead of loading it (glLoadMatrix)?
Same goes for any drawable (as I will be drawing a Joint tree structure having Sprite's for leafs)

Thanks
-Martín

11
Graphics / Line between tiles appearing with certain Views
« on: June 10, 2009, 06:24:50 pm »
When rendering, some lines appear between tiles on certain view conditions.

I will make a simple example to reproduce it... but you'll need to wait.

The view's size is static, it just moves.
The position is rounded to 0.0001f just in case of rounding errors (i.e. x-=fmod(x, 0.0001f)).
The half-size is set after each position change to avoid entropy of the values.
This won't fix it.

All tiles are placed in integer multiples (positions 0.0, 64.0, 128.0...)

Temporarily I worked around it by having the tiles to be 1 pixel wider (my tiles are 64x64, the sprites are 65x65).
Adding half a pixel helped but it still happend but less times.

Regards
-Martín

12
Graphics / Unsetting a Sprite's Image
« on: June 09, 2009, 03:10:08 am »
to avoid the "SetSubRect" of sprites, I oftenly do a

Code: [Select]
spr.SetImage(Image());
spr.SetImage(theNewImage);


And it works correctly.



But if I don't set a real image afterwards, the behaviour differs from a "fresh sprite": It draws a white rectangle instead of "nothing"



Code: [Select]
App.Draw(spr);                  //nothing
spr.SetImage(someLoadedImage);
App.Draw(spr);                  //an image
spr.SetImage(Image());
App.Draw(spr);                  //a white rect


I have a HUD display with prerendered numbers. 6 sprites, one for each number.
So setting the number is basically dividing by 10 a bunch of times and getting the modulo 10, and for each digit I have an image.

I wanted to reset the sprite to do "spaces", instead of showing zeros to the left. And assigning an alpha=0 image is to much of a hack.


Is there another poper whay I should know?
Thanks
-Martín

13
SFML projects / The Duke
« on: June 08, 2009, 07:11:57 pm »


-A mashup of vintage games-
Duke Nukem: Attitude
Abuse: Gameplay
Golden axe: Enemies/Era

(Video teaser)
http://blog.tbam.com.ar/2009/06/duke-beta.html

You can download it and try it at:
http://forums.tigsource.com/index.php?topic=6637.0

It's still in a Beta state.


Hope you like it.
-Martín

14
General / Is there a reason to have everything so "private:"
« on: June 08, 2009, 07:07:56 pm »
I mean, having a bunch of "protected:"s wouldn't kill anyone, and would make the library much more expandable, without having to hack and compile SFML for custom needs.

In my case I could use it to get the OpenAL source id ("source name") from a derived sf::Sound and implement a buffer queue for seamless uninterrupted playing of non-music non-streamed sounds.

For others, it could be a way to export the HWND from a sf::Window.

To avoid having to change and maintain all the hacks in SFML lib code when updating revisions.



I just want to know the reasons, which probably are important, and learn something new.


Regards
-Martín

15
I had a bunch of problems releasing the dinamically linked Microsoft CRT.

Apparently when IE7 was installed, it installed a DLL that the CRT uses (without delay-load, dunno why).
That DLL generated a dependency to another DLL that comes only with Vista, but not WinXP.

So the only solution was to statically link the CRT in SFML and also in my application (God save open source :D), that made the dependecy dissapear.

It's a pain to make static-CRT configs each time I install SFML, so it would be nice to add a bunch of configs for that (like "Debug/release static with static CRT")

Thanks
-Martín

Pages: [1] 2 3