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 - 93interactive

Pages: [1]
1
SFML website / stylesheet br0ken in some browsers
« on: October 18, 2013, 08:36:43 am »
Hi there,

seems you have not noticed yet, that the web pages styles are broken in some browsers.

You redirect to https and chrome started it and now firefox also does not allow cross https/http loading, so when running a page in https, all stylesheets and javascripts must also be https or firefox/chrome won't load it.

You need to change links like this:

Code: [Select]
<link rel="stylesheet" type="text/css" href="http://sfml-dev.org/styles/style.css" title="default" media="screen,print"/>

to this (double slash = protocol relative):

Code: [Select]
<link rel="stylesheet" type="text/css" href="//sfml-dev.org/styles/style.css" title="default" media="screen,print"/>

Here are all problematic files from firefox console:

Code: [Select]
[08:35:20.568] Blocked loading mixed active content "http://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic" @ https://sfml-dev.org/
[08:35:20.571] Blocked loading mixed active content "http://sfml-dev.org/styles/style.css" @ https://sfml-dev.org/
[08:35:20.571] Blocked loading mixed active content "http://sfml-dev.org/scripts/highlight/styles/github.css" @ https://sfml-dev.org/
[08:35:20.571] Blocked loading mixed active content "http://sfml-dev.org/scripts/highlight/highlight.pack.js" @ https://sfml-dev.org/
[08:35:20.642] Blocked loading mixed active content "http://www.google-analytics.com/urchin.js" @ https://sfml-dev.org/

2
Graphics / RenderTexture, compile fail on linux gcc
« on: October 27, 2012, 12:21:16 pm »
Hi there, i am trying to user RenderTexture, but as soon as i include it as simple as this in my class:

Code: [Select]
class MyClass {
   private:
      sf::RenderTexture tex;
};

I get a compile error:

(SFML 2 current git clone, linuxmint and debian, gcc 4.6.3)

Code: [Select]
In file included from ../SFML/include/SFML/Graphics/RenderTexture.hpp:33:0,
                 from ../SFML/include/SFML/Graphics.hpp:39,
                 from include/hexgrid.h:8,
                 from src/hexgrid.cpp:1:
../SFML/include/SFML/System/NonCopyable.hpp: In copy constructor ‘sf::RenderTarget::RenderTarget(const sf::RenderTarget&)’:
../SFML/include/SFML/Graphics/RenderTarget.hpp:51:25:   instantiated from ‘void __gnu_cxx::new_allocator<_Tp>::construct(__gnu_cxx::new_allocator<_Tp>::pointer, const _Tp&) [with _Tp = HexField, __gnu_cxx::new_allocator<_Tp>::pointer = HexField*]’
/usr/include/c++/4.6/bits/stl_vector.h:830:6:   instantiated from ‘void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = HexField, _Alloc = std::allocator<HexField>, std::vector<_Tp, _Alloc>::value_type = HexField]’
src/hexgrid.cpp:55:29:   instantiated from here
../SFML/include/SFML/System/NonCopyable.hpp:67:5: error: ‘sf::NonCopyable::NonCopyable(const sf::NonCopyable&)’ is private
../SFML/include/SFML/Graphics/RenderTarget.hpp:51:25: error: within this context
In file included from ../SFML/include/SFML/Graphics.hpp:39:0,
                 from include/hexgrid.h:8,
                 from src/hexgrid.cpp:1:
../SFML/include/SFML/Graphics/RenderTexture.hpp: In copy constructor ‘sf::RenderTexture::RenderTexture(const sf::RenderTexture&)’:
../SFML/include/SFML/Graphics/RenderTexture.hpp:47:25: note: synthesized method ‘sf::RenderTarget::RenderTarget(const sf::RenderTarget&)’ first required here
In file included from include/hexfield.h:12:0,
                 from include/hexgrid.h:14,
                 from src/hexgrid.cpp:1:
include/tilerenderer.h: In copy constructor ‘TileRenderer::TileRenderer(const TileRenderer&)’:
include/tilerenderer.h:11:7: note: synthesized method ‘sf::RenderTexture::RenderTexture(const sf::RenderTexture&)’ first required here
In file included from include/hexgrid.h:14:0,
                 from src/hexgrid.cpp:1:
include/hexfield.h: In copy constructor ‘HexField::HexField(const HexField&)’:
include/hexfield.h:15:7: note: synthesized method ‘TileRenderer::TileRenderer(const TileRenderer&)’ first required here
In file included from /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++allocator.h:34:0,
                 from /usr/include/c++/4.6/bits/allocator.h:48,
                 from /usr/include/c++/4.6/string:43,
                 from /usr/include/c++/4.6/bits/locale_classes.h:42,
                 from /usr/include/c++/4.6/bits/ios_base.h:43,
                 from /usr/include/c++/4.6/ios:43,
                 from /usr/include/c++/4.6/ostream:40,
                 from /usr/include/c++/4.6/iostream:40,
                 from include/hexgrid.h:4,
                 from src/hexgrid.cpp:1:
/usr/include/c++/4.6/ext/new_allocator.h: In member function ‘void __gnu_cxx::new_allocator<_Tp>::construct(__gnu_cxx::new_allocator<_Tp>::pointer, const _Tp&) [with _Tp = HexField, __gnu_cxx::new_allocator<_Tp>::pointer = HexField*]’:
/usr/include/c++/4.6/ext/new_allocator.h:108:9: note: synthesized method ‘HexField::HexField(const HexField&)’ first required here
In file included from ../SFML/include/SFML/Graphics/RenderTexture.hpp:33:0,
                 from ../SFML/include/SFML/Graphics.hpp:39,
../SFML/include/SFML/System/NonCopyable.hpp: In member function ‘sf::RenderTarget& sf::RenderTarget::operator=(const sf::RenderTarget&)’:
../SFML/include/SFML/Graphics/RenderTarget.hpp:51:25:   instantiated from ‘void std::vector<_Tp, _Alloc>::_M_insert_aux(std::vector<_Tp, _Alloc>::iterator, const _Tp&) [with _Tp = HexField, _Alloc = std::allocator<HexField>, std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<HexField*, std::vector<HexField> >, typename std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type::pointer = HexField*]’
/usr/include/c++/4.6/bits/stl_vector.h:834:4:   instantiated from ‘void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = HexField, _Alloc = std::allocator<HexField>, std::vector<_Tp, _Alloc>::value_type = HexField]’
src/hexgrid.cpp:55:29:   instantiated from here
../SFML/include/SFML/System/NonCopyable.hpp:79:18: error: ‘sf::NonCopyable& sf::NonCopyable::operator=(const sf::NonCopyable&)’ is private
../SFML/include/SFML/Graphics/RenderTarget.hpp:51:25: error: within this context
In file included from ../SFML/include/SFML/Graphics.hpp:39:0,
                 from include/hexgrid.h:8,
                 from src/hexgrid.cpp:1:
../SFML/include/SFML/Graphics/RenderTexture.hpp: In member function ‘sf::RenderTexture& sf::RenderTexture::operator=(const sf::RenderTexture&)’:
../SFML/include/SFML/Graphics/RenderTexture.hpp:47:25: note: synthesized method ‘sf::RenderTarget& sf::RenderTarget::operator=(const sf::RenderTarget&)’ first required here
In file included from include/hexfield.h:12:0,
                 from include/hexgrid.h:14,
                 from src/hexgrid.cpp:1:
include/tilerenderer.h: In member function ‘TileRenderer& TileRenderer::operator=(const TileRenderer&)’:
include/tilerenderer.h:11:7: note: synthesized method ‘sf::RenderTexture& sf::RenderTexture::operator=(const sf::RenderTexture&)’ first required here
In file included from include/hexgrid.h:14:0,
                 from src/hexgrid.cpp:1:
include/hexfield.h: In member function ‘HexField& HexField::operator=(const HexField&)’:
include/hexfield.h:15:7: note: synthesized method ‘TileRenderer& TileRenderer::operator=(const TileRenderer&)’ first required here
In file included from /usr/include/c++/4.6/vector:70:0,
                 from include/hexgrid.h:5,
                 from src/hexgrid.cpp:1:
/usr/include/c++/4.6/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_insert_aux(std::vector<_Tp, _Alloc>::iterator, const _Tp&) [with _Tp = HexField, _Alloc = std::allocator<HexField>, std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<HexField*, std::vector<HexField> >, typename std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type::pointer = HexField*]’:
/usr/include/c++/4.6/bits/vector.tcc:317:4: note: synthesized method ‘HexField& HexField::operator=(const HexField&)’ first required here

3
Graphics / Best way to draw on Sprite?
« on: November 20, 2011, 07:59:06 am »
Hi,

what is the best way to draw on a sprite with sfml 2?

As far as i can see:

    get texture of sprite
    get image from texture
    draw to image
    create texture from image
    set texture to sprite


Doesn't sound high-performance to me... Any other ideas?

4
Graphics / Problem understanding RenderTexture, SFML 2
« on: October 23, 2011, 09:53:19 am »
Hi,

i having a weird situation that i do not understand, maybe someone could explain me what happens and if there is a way to prevent this.

I have a level, built from a tile map, that i render into a RenderTexture (the whole map at once). Although drawing only the visible portion of the tile map would be faster, i need this to be able to modify the level by for example adding blood splatter onto the tiles.

From that render texture, i build a sprite, and that i do render.

Now everything works fine, until i do load any other texture after setting up the RenderTexture object. Once i load any texture object, the RenderTexture seems to get replaced with that texture.

So in code speaking (not the actual code, just to make clear what i am talking about):

Code: [Select]

RenderTexture t;
Sprite s;
Texture otherTex;
Sprite otherSprite;

void init() {
   otherTex.LoadFromFile("sprite.png");
   otherSprite.SetTexture(otherTex);
   RenderTexture t;
   t.Create(800, 600);
   DrawMap(t);
   t.Display();
   s.SetTexture(t.GetTexture());
}

void draw() {
   window.Clear();
   window.Draw(s);
}


does work, while...:

Code: [Select]

void init() {
   RenderTexture t;
   t.Create(800, 600);
   DrawMap(t);
   t.Display();
   s.SetTexture(t.GetTexture());

   otherTex.LoadFromFile("sprite.png");
   otherSprite.SetTexture(otherTex);
}

void draw() {
   window.Clear();
   window.Draw(s);
}


...does draw a large scaled image of sprite.png

Why is this happening?

5
Graphics / performance drop linux vs. vista
« on: October 23, 2009, 03:38:19 pm »
Hello,

i have noticed that on the same machine there is a major difference in drawing performance.

the game is tilebased and in the moment i am blitting tile for tile, but try to only blit tiles that are visible, it does end up with a lot if small blits per redraw.

if i run the game on my notebook under linux, everything is fine, but as soon as i run it on the same notebook under windows vista, its eating away 90% cpu in a stage, where almost no logic takes place (its a simple countdown before the game)

a few ideas came up, how to increase performance, but in the current stage this would be major work, maybe someone here already tried similar and can tell the results:

i have heard, that newer windows (>= vista) do not support opengl well, is there a way to tell sfml (2) which driver to use? (directx)

would it be faster to reduce number of blits by building a huge bitmap with all static tiles blitted on it (would result in a very large bitmap in my case, something around 6000x6000)

is there a way, similar to sdl, to mark images as 'this is something to hold preferable in video ram'?

any other ideas how to optimize such a situation?

6
SFML projects / KreiselBall
« on: October 15, 2009, 12:44:03 pm »
Hello,

after quite some work, my new game KreiselBall (commercial) is right before release.

I am currently building levels and i guess it will be finished in the next two weeks or so.

The game concept is similar to a few old school games from the SNES times. You play a ball, which just falls down, and you can turn the world around it. It will feature 2 game modes, race and puzzle. On puzzle you have to clear the screen from colored objects by changing your own color and then hitting them.

More information will be available on its homepage





I have made a particle emitter class for the game, which can currently achieve quite a few effects like rain, animated clouds, explosions and more. I currently have a problem with it, which makes it not very usable for other projects, so it would require some work to make it available for others, but if the interest is high enough, i could release it to the public, maybe under BSD license. Please let me know if you are interested.

7
Window / Temporary disable double buffering (or capture screen)
« on: September 11, 2009, 01:21:08 pm »
Hello,

i am trying to implement some pause to my game, so my game runs in game mode, renders everything and calls Window->Display(), then the user hits escape, and the game changes changes to the pause mode.

so my plan was, just to keep the drawn screen and render my pause menu over it, but calling Window->Display() in the pause mode, does switch between the last 2 frames of the game mode.

is it possible to temporary disable double buffering, so that in menu state, only the last frame is kept, and when back in game mode, double buffering is active again?

some other option would be to somehow capture the last render screen and blit it once in the pause state.

8
Graphics / Bug in 2.0 branch
« on: September 10, 2009, 11:45:08 am »
hello,

there is a bug in current revision of the 2.0 branch.

i have two gimp made 32 bit png files with alpha, both are 64 pixels high, one is less than 32 pixel wide, and the other more then 32 pixel.

if i set it up like (untested code ahead):

Code: [Select]

this->smallImage.LoadFromFile("small.png");
this->smallSprite.SetImage(smallImage);
this->smallSprite.SetOrigin(this->smallImage.GetWidth()*0.5f,this->smallImage.GetHeight()*0.5f);


this->bigImage.LoadFromFile("big.png");
this->bigSprite.SetImage(bigImage);
this->bigSprite.SetOrigin(this->bigImage.GetWidth()*0.5f,this->bigImage.GetHeight()*0.5f);


and then draw it with:

Code: [Select]

float x=100.0f;
float y=100.0f;

this->bigSprite.SetPosition(x,y);
this->RenderWindow->Draw(this->bigSprite);

x+=this->bigImage.GetWidth();

this->smallSprite.SetPosition(x,y);
this->RenderWindow->Draw(this->smallSprite);

x+=this->smallSprite.GetWidth();

this->bigSprite.SetPosition(x,y);
this->RenderWindow->Draw(this->bigSprite);


then the small sprite is rendered offsetted to the right, so either the SetOrigin() or the GetWidth() seems to fail on images < 32 pixels.

edit: if i just take the image smaller then 32 pixels in with and scale it in gimp to more then 32 pixels, it works.

9
Audio / crash with audio on vista/visual studio 2008
« on: September 08, 2009, 09:22:49 am »
Hello,

i have tried to start playing audio samples in my game, but it crashes the application under vista / visual studio 2008 and svn branch of sfml 2.0

i have stripped everything down as much as possible, so i now have a soundfile class, that looks like this:

Code: [Select]

class SoundFile {
private:
sf::SoundBuffer buffer;

public:
sf::Sound sound;

SoundFile() {}

bool Load(const char *name);
};


i do not even have to used it, just the fact to do something like this:

Code: [Select]

class MyApp {
private:
SoundFile sound;
};


does crash the application with the following messagte:

Code: [Select]

First-chance exception at 0x76fb2f3d in MyApp.exe: 0xC0000005: Access violation reading location 0x00000044.
Windows has triggered a breakpoint in MyApp.exe.

This may be due to a corruption of the heap, which indicates a bug in MyApp.exe or any of the DLLs it has loaded.

This may also be due to the user pressing F12 while MyApp.exe has focus.


i have installed newest openal and libsndfile and copied it to the binary folder.

any ideas?

10
Window / disable keyrepeat?
« on: September 05, 2009, 12:42:10 pm »
Hello,

is there a way, to disable keyboard repeat. At least it seems, that for example if the user holds space down, KeyPressed events are received repeatedly

11
Graphics / view rotation
« on: September 03, 2009, 01:26:49 pm »
hello,

i am a little confused about view rotation. didn't find anything in the docs and the forums state that it is not available (older posts)

but feature list clearly states:

Can use views like in a 3D scene, to zoom / translate / rotate the whole world

so what is the situation about rotation of views?

using sfml-1.5

12
General discussions / visual c++ 2008: why is there a command prompt?
« on: September 01, 2009, 05:51:21 pm »
hello,

i am trying to compile a sfml project on windows vista via visual c++ 2008.

i have installed sfml 1.5 and in general it works, but the examples in the sfml zip do *not* show up a command prompt.

my own project is always opening a command prompt window before opening the application window, so i have two windows open.

i have tried to follow the docs step by step, but i am a total visual c++ n00b, i'm more used to makefiles under unix, maybe i missed something.

Pages: [1]