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 - Grimshaw

Pages: [1] 2 3
General discussions / Mutual following on Twitter!
« on: January 10, 2014, 05:00:11 am »
Hello guys,

Just got myself a Twitter account for the first time and still marveling on its wonders, but it seems like a great way to connect with other developers!

Unfortunately, I am still a forever alone in there, and would like to enter/learn how to enter in the twitter world.


Well, if you use twitter, why not follow mine, and I will do the same! Post your own twitter links so we can connect in there too :)

Hope it isn't inadequate to do this post ^^

List of SFML's users twitter accounts:

SFML Teamhttps://twitter.com/sfmldev
SFML Game Jamhttps://twitter.com/sfmlgamejam


SFML Users
Rosme https://twitter.com/jsfauteux
Elias Dalerhttps://twitter.com/EliasDaler

General discussions / Open Bundle
« on: August 11, 2013, 01:51:01 pm »
Found this around the webs, would like to share with everyone else:


Graphics / sf::Text artifact
« on: August 07, 2013, 01:46:57 pm »

I use an older version of sf::Text in my code and I still experience the artifact you can see in the image. I was about sure it was already fixed in SFML. Can someone tell me what was the solution so I can fix it more quickly? Thanks!

General discussions / SFML Game Development -- A book on SFML
« on: June 25, 2013, 09:01:55 pm »

I am happy to announce that the first SFML book has just been released! Nexus, Groogy and I have put a lot of work and dedication into this book along the last semester and, now it's ready, we can only sincerely hope you enjoy the book to the fullest.

SFML Game Development is highly focused on using C++11 with SFML in a modern way, in order to create an up-to-date learning experience, where you can get information all the way from the basics until building an actual game!

You can purchase either a digital copy or an actual hard cover book in the following website:

The source code can be downloaded from the PacktPub website as well.

The sample game we produced for the book is all about airplanes and bullets in the sky! You are engaged in a modest warfare where you can kill enemy units and progress through a level until you are victorious. Along these gameplay elements goes a set of sounds that give life to the game and some interesting graphic effects such as bloom. A network mode is also present, showing you how you can interact with friends in co-op and online gameplay.

The following screenshot was taken directly from the sample game:

This book was written in a way where the text evolves in parallel with the code, meaning that for each chapter you will have source code relating only to what was written so far, progressing through the chapters until a finished game is obtained!

Also, a special thanks to Laurent for his support through every stage of development, as well as his feedback whenever we needed!

We really hope everything is of your taste and we honestly appreciate any feedback you can give us!

The team

Graphics / sf::Font wasting resources
« on: May 02, 2013, 11:58:07 pm »
Hello Laurent,

I've been looking into the sf::Font source code and I believe I found a considerably serious issue. What I found doesn't stop the class from working correctly, but it still is a bad practice, I think. I did debug and confirm what I will say, but if for some reason I am wrong, ignore the post altogether.

Inside sf::Font, we find the std::map<unsigned int, Page> where we store the texture and glyph information of each character size. The sf::Font::Page class by itself declares a sf::Texture locally. I found this a little weird due to the type of the container. An std::map uses a tree internally to keep all members efficiently ordered and this means that whenever we add or remove an element, the tree will re-structure itself to remain ordered, effectively copying around the Page objects.

So, I looked into the sf::Texture copy constructor, and it downloads all data from the source texture and uploads it to the destination texture. This means that on a font with plenty of character sizes active, there are potentially dozens of texture copies, and lots of data transfering to/from the gpu.

I verified this by making sure when a new page was added, sf::Texture would be copied around a few times in the re-structuring process of the tree. It seems like a huge overkill of the performance when the map could be a std::map<unsigned int, Page*>, avoiding unecessary copies all together (I tested it and it works as good).

Graphics / Bug in sf::RenderTexture
« on: March 24, 2013, 02:30:53 am »
I think i'm not on shrooms but I just found a sick bug in SFML's code.

RenderTexture::RenderTexture() :

    delete m_impl;

I think further explanations are not needed.. The fix is easy as well!
delete m_impl;      ->          if(m_impl) delete m_impl;

Since an object of type sf::RenderTexture is not valid until a call to create, whenever an instance of it is deallocated it will cause a crash unless create was called.


Window / Dragging icons from the windows explorer into the sfml window
« on: September 29, 2012, 11:29:53 pm »

I need some help to figure out how to make the sfml window accept dragging of external icons in the window.
The solution can be windows only if otherwise complicates it too much.

The desired target behaviour as something like this:
Open SFML-based app, go to desktop, drag a random.png and drop it on the SFML window, and have the application recognize that drop and notify me with at least the path of the dropped file.

This could be use to drag images directly into an editor for faster introduction of graphics etc.

Any ideas? Thanks!

General discussions / SFML in Android with the NDK
« on: July 08, 2012, 01:13:27 am »

I decided to make this post to share my experience while converting my engine from sfml normal use to a full cross-platform solution. Mainly about the things that came in the way.

1 - Main function

No more main function as you need a thin Java layer to interact with your native code, and the activity lifecycle is controlled by the Java.

2 - Asset managing

The usual way to have assets is to pack them in the /assets/ directory in your APK, and they are inside a zip later in the device. There are tricks to read them with FILE* but you need to be really carefull.

3 - Sound

In android ndk, you can use OpenSL ES for sound, but its not recommended as it adds trouble and only supports android 2.1+ if im not mistaken. Java sound access would be better, and that means sf::Sound stuff won't do.

4 - Graphics

OpenGL ES is a must, and must be conditionally compiled along with OpenGL if you want cross-platform apps. Also GLU is not available in android, but you may use GLUES, which is handy.

I can complete this list with more detail and items if you find it interesting, as i've passed through all major porting issues so far, i'd say. This is just to mention that porting to android is not going to be that simple as changing the rendering code.

Hope it helps

SFML projects / Parabola Engine is now on Android!
« on: May 25, 2012, 12:42:00 am »
Hello everyone, some of you may have read about Parabola Engine before, others not so much, but I just wanted to inform you that its next version to be released supports the Android OS.

I wonder how would you like to program your application in C++, pretty much in the same molds as before with Parabola Engine, which is really close to SFML, and have it run right away in Windows/Mac/Linux/Android ?

Seems like a good thing?

The engine is working nice in the mobile platform, a lot of features are working, like transparent file access, libRocket integration, scripting integration, box2D integration, sprites, views and other faculties, ENET networking and more. A lot to be tuned, improved and fixed , for a stable cross-platform release, but you should do good with it. Also had sucessfully integrated AirPush ads into it, seamless so far.

Opions? Questions?

General / Porting to Android / iPhone / Windows Phone
« on: March 10, 2012, 12:41:06 am »

I would like to know how hard it would be to port an SFML app to Android / iPhone / Windows Phone.

Yes, each of these platforms. If anyone has tried, i would like to know how it was, and if not, anything you have to say, shoot ! :)


Graphics / Feature request for sf::Texture
« on: March 06, 2012, 12:49:52 am »
I am using SPARK 2 particle systems, and its renderer gets a texture id,
to draw alpha-tested quads as particles.

Because I load my textures as sf::Texture, i cannot use them with SPARK , because there is no method to get the texture id.

Could you please expose such a method ?! Thanks

Graphics / Adjustment in Transform/Transformable
« on: March 02, 2012, 03:22:06 am »

I am finding Transform and Transformable classes a little confusing because Transform is exactly what i want, but I can't retrieve the position, etc from it.

Also, when I saw Transformable, it looked even more like what I need, but it doesn't let me rotate relatively to an arbitrary point like Transform does. (or does it?)

Imagine a scene graph, with every node position being relative to the parent.
I want to be able to rotate a node around itself by default, but also around its parent, in order to obtain a "gravitation" effect , where the child rotates around the parent in a fixed distance.

Can someone please clarify me on this?

Graphics / Help with SPARK 2
« on: March 01, 2012, 05:30:14 pm »
I am having big time problems to sucessfully render SPARK 2 particle systems, I always get a crash.

Already trying to solve it in SPARK forum, but still no solution.

If someone managed to use SFML 2 and SPARK 2, I would appreciate the help. Follows the pasted post of the SPARK forum.


I've tried to create a minimal example that reproduces the error for me.
Code: [Select]

sf::RenderWindow window;
window.Create(sf::VideoMode(), "heye");

SPK::Ref<SPK::System> sparkSystem = SPK::System::create(true);

SPK::Ref<SPK::Group> effectgroup = sparkSystem->createGroup(400);
effectgroup->addModifier(SPK::Gravity::create(SPK::Vector3D(0.0f, 0.3,0.0f)));
effectgroup->addParticles(100, SPK::Vector3D(200,200,0), SPK::Vector3D());



sf::Clock c;




Also, the Call Stack dies right there..

Code: [Select]
Sandbox.exe!SPK::System::renderParticles()  Line 206 + 0x16 bytes C++
  Sandbox.exe!SPK::Group::renderParticles()  Line 272 + 0x38 bytes C++
> Sandbox.exe!SPK::GL::GLPointRenderer::render(const SPK::Group & group, const SPK::DataSet * dataSet, SPK::RenderBuffer * renderBuffer)  Line 132 + 0x15 bytes C++

Its the same crash I get from the other application, but in this case it doesn't even render one frame, while in the other i see the snow flocks a little time :)

As you can see, i use the latest SFML 2 for windowing, we both know it is pretty good :)

When i mean latest, i mean from yesterday! I fetched the most recent versions of all libraries i use yesterday, compiled them all, and even changed to vs2010 from vs2008. So, different conditions, same problem.

Of course I can be compiling SPARK 2 wrong, but I pretty much compiled it with default settings..

Graphics / Possible memory leak
« on: February 29, 2012, 02:33:32 am »

Recently I noticed a memory leak in my applications, so I tried to track it down and I think there is something wrong with two SFML functions.

So, my applications were simply ALWAYS allocating memory. Like 4KB/s, by watching the task manager.

I started to look for the problem, and i narrowed it down to this piece of code:

Code: [Select]
if(myWindow && activeDrawing){

That is my "render loop". If i comment those 4 lines,the memory does not increase at all.

Otherwise, it goes nuts. Clear() doesn't seem to do harm, however, Display() is consuming the most. SetActive() is also consuming memory from time to time, but way less than Display().

Can you please discuss this?

EDIT: I was unable to reproduce the problem with a minimal application, therefore i don't really understand why that couple of functions are having that effect while commenting them actually works, in the context of the other app.

Audio / Problem loading audio file from sf::InputStream
« on: February 09, 2012, 02:08:11 pm »

I've got a problem with sf::InputStream.

I have a sound file which I can load and play normally, then I insert it into a package of files, try to load it again from the package with sf::InputStream and the sound plays but makes a huge noise 1-2 seconds before playing.

Tried to dump the file outside the package again, and it plays nice both in sfml and external players.

What could it be?

Pages: [1] 2 3