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.


Messages - heishe

Pages: 1 [2] 3 4 ... 9
16
General discussions / Re: New Release?
« on: April 07, 2012, 03:12:02 pm »
Laurent: Some of us can help you write the tutorials if you want.

17
General discussions / why sfml is not on the wikipedia ?
« on: March 17, 2012, 09:46:52 pm »
SFML has for a long time had a PR issue. It was always (imho) by far the best 2D C++ game library out there for people targeting linux/windows, for various reasons, and with all the improvements of 2.0 there will simply be no doubt at all.

But for some reasons the library still isn't known enough. When people on popular sites like stackoverflow (or gamedev.stackexchange.com, or gamedev.net... etc.) ask for 2D libraries and clearly state that they use C++, 90% of the time the first poster will still suggest SDL.

18
SFML projects / SFML Light System - Let There Be Light
« on: March 12, 2012, 12:05:50 am »
A question: Can you explain in a couple of sentences what the principle behind the (hard-)shadow generation is (not interested in soft shadows since it seems like it's just a stretched texture that is attached to the edges of the shadow)?

I implemented a lighting system a while ago that was in essence based on the algorithm used here (although I completely rewrote and refactored the code since the original implementation was pretty slow and also quite ugly):

http://www.sfml-dev.org/wiki/fr/sources/lightmanager

I have used another algorithm before that but that turned out to be even slower, so I'm interested to see what your system is based on.

19
SFML projects / ParabolaEngine - 2D Game Framework
« on: October 17, 2011, 09:55:47 pm »
I can't find anything new in the first post, what's going on? :_)

20
General discussions / The new graphics API in SFML 2
« on: October 17, 2011, 09:53:31 pm »
Laurent, do you know how the XNA Framework does batching? I think the way their API works is really nice. There's a class called "SpriteBatcher" that does all the low level stuff for you. The only thing that the user can do (it's optional) is hand over parameters concerning the drawing mode, e.g. blending, sorting by textures and batching that way, etc.

You just hand over sprites/textures and the class does the rest for you.

It's incredibly fast as well. I get about 20000FPS (yes, 20k fps) in a demo where I draw about 100 small rects with three different 16x16 textures on them.

I think that style fits SFML best. The abstraction level where SFML is now (high level but it's very easy to get access to low level stuff) is pretty much perfect, and the SpriteBatcher as a performance boost would be a good addition to that, imo.

21
Graphics / Points of my rotated picture
« on: September 16, 2011, 08:51:59 pm »
Yes, you need to translate the sprite to the origin of the coordinate system, then multiply the position of each point with a 2D rotation matrix:

http://en.wikipedia.org/wiki/Rotation_matrix

and translate each point back the same direction and distance that you translated it when translating to the origin.

All of that is assuming that your sprite rotates around its center.

22
Graphics / sf::Image needs huge amounts of memory. Why?
« on: August 20, 2011, 01:31:52 am »
Yes, I'm actually a little behind on schedule so I pushed the performance-optimizations back for a bit, so it's going to be a few days until I get the debugger going to check which part of the code is causing the bloat (even though it'll probably take me 10 minutes or less, but I have to focus on other things right now).

50mb is really not bad at all as long as the application doesn't incrementally bloat by 20mb every time I load a 4kb image or something, which (I think) isn't happening.

23
Graphics / sf::Image needs huge amounts of memory. Why?
« on: August 18, 2011, 10:41:22 pm »
Actually my application bloats in all kinds of places, even though I have no memory leaks (I have very few pointers and those are managed with smart pointers).

Currently it takes about 50mb in ram with just a couple of images loaded and very few actual data in memory (a few order-3-quadtrees (meaning 64 nodes) and 3 or so images for the tilemaps.

This is frustrating mainly because I don't like the fact that there are games like Knytt Stories which run at less than one megabyte in memory while having huge landscapes and lots of soundtrack :P

I'm still researching though what exactly is causing this bloat. Maybe its a bug in Visual Studio 2010 (compiler or linker) or something else alltogether (really just the cause of initializing a couple of things on windows).

24
Graphics / sf::Image needs huge amounts of memory. Why?
« on: August 17, 2011, 07:53:27 pm »
The following code:

Code: [Select]

#include <sfml/graphics.hpp>
#include <iostream>
int main()
{
   sf::Image i;
   int a;
   std::cin>>a;
   return 0;
}



Lets my application jump from 600 kilobyte memory usage to 13 megabytes (13,000 kb) after the line "sf::Image i". Adding a second image let's it jump only marginally (a few bytes).

Why is that? Is there a memory leak in there somewhere (maybe one of the sub libs you're using to do the loading?)?

I'm running in Release mode, with release libs of sfml. I'm using MSVC2010 and have compiler optimizations on (/O2).

Hardware: Intel i5 2500k, Radeon HD 6870, 4GB (don't remember exact type) Ram.

By the way, I still use sf::Image because I haven;t update to the latest revision yet (I assume it's unnecessary work because all it does is change a couple of names in my code - unless of course sf::Texture has some sick performance improvements which I doubt). [/code]

25
SFML projects / Atom Zombie Smasher
« on: August 12, 2011, 10:02:47 am »
Quote from: "Brendon"
Yup, I did all the design, programming, and art. The music was from a band called The Volcanics and the sound effects were from a library.


That's awesome. Was the library one of these sound banks that you can license? Or did you find a good, free one?

That said, awesome game!

26
SFML projects / Atom Zombie Smasher
« on: August 12, 2011, 03:45:57 am »
Was this game a complete 1-man project? Where did you get all the graphics,sfx,music etc?

27
Graphics / Maximum amount of RenderImages?
« on: July 18, 2011, 09:52:52 am »
Quote from: "Laurent"
In fact it might be a bug. Unfortunately I can't reproduce it, your first piece of code works fine on my computer.

What OS / graphics card / revision of SFML 2 do you use?


It might be a bug... but my graphics card could be the problem as well. Intel's GPUs are somewhat known for their crappy OpenGL support.

OS: Windows 7
Graphics card: Mobile Intel 965 Express
SFML 2 revision: Well, I don't know the exact version, but it is the revision of about 4 weeks ago. Int-timers are already implemented, PollEvent instead of GetEvent as well.

28
Graphics / Maximum amount of RenderImages?
« on: July 18, 2011, 12:25:00 am »
Yes, this actually fixes everything.

You might want to add some references to this to the tutorials, the documentation of the functions/classes or something like that, though, in case someone runs across the same problem.

29
Graphics / Maximum amount of RenderImages?
« on: July 18, 2011, 12:12:32 am »
Actually, the problem seems to be that you can't interlace Clear() and Display() calls of the RenderWindow and RenderImage-s. I haven't looked at the SFML source so I can't say why that is, but changing the drawing code to:

Code: [Select]
     

      r1.Clear();
      r1.Draw(spr1);
      r1.Display();
     app.Clear();
      everything.SetImage(r1.GetImage());
      app.Draw(everything);

      app.Display();


Fixes the flickering. I'm currently reworking a part of my renderer (now fully deferred rendering using std::vector) to see if it fixes my problem, will check back later.

30
Graphics / Maximum amount of RenderImages?
« on: July 17, 2011, 10:03:15 pm »
Quote from: "Laurent"
The only limit is the amount of RAM that your graphics card has. But you shouldn't need so many render-images, what do you do with them?


Well, I actually only have two. One for regular (deferred) rendering (in order to apply full-screen shaders to the scene) and one for my light/shadow map (which is just drawn on top of the regular RenderImage using multiplicative blending).

But I've just now tried to implement a minimal case to reproduce the problem, and it even occurs with just one RenderImage:

Code: [Select]

#include <sfml/window.hpp>
#include <sfml/graphics.hpp>

int main()
{
sf::RenderWindow app(sf::VideoMode(800,600,32),"renderimage");

sf::RenderImage r1;
r1.Create(800,600);

sf::Image i;
i.LoadFromFile("Data/Sprites/test.png");
sf::Sprite spr1(i,sf::Vector2f(0,0));
spr1.Resize(800,600);


sf::Sprite everything;

while(app.IsOpened())
{
sf::Event e;
while(app.PollEvent(e))
{
switch(e.Type)
{
case sf::Event::Closed:
app.Close();
break;
}
}
app.Clear();

r1.Clear();
r1.Draw(spr1);
r1.Display();

everything.SetImage(r1.GetImage());
app.Draw(everything);

app.Display();
}

return 0;
}


Produces the same mad flickering. But that doesn't make sense to me, since I pretty much do exactly the same in my engine and it only produces flickering once I add in clearing/drawing/displaying of a second renderimage.

By the way, this works fine and shows the sprite in question:

Code: [Select]

#include <sfml/window.hpp>
#include <sfml/graphics.hpp>

int main()
{
sf::RenderWindow app(sf::VideoMode(800,600,32),"renderimage");

sf::RenderImage r1;
r1.Create(800,600);

sf::Image i;
i.LoadFromFile("Data/Sprites/test.png");
sf::Sprite spr1(i,sf::Vector2f(0,0));
spr1.Resize(800,600);


sf::Sprite everything;

while(app.IsOpened())
{
sf::Event e;
while(app.PollEvent(e))
{
switch(e.Type)
{
case sf::Event::Closed:
app.Close();
break;
}
}
app.Clear();

                app.Draw(spr1);

app.Display();
}

return 0;
}


I actually might post the relevant code of my renderer, but I'm not sure what good it will do.

Pages: 1 [2] 3 4 ... 9
anything