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

Pages: [1] 2
General discussions / Re: SFML Game Development -- A book on SFML
« on: August 06, 2013, 11:04:33 am »
Could you explain me why SceneNode and Entity were split in two classes?

Is it like SceneNode is for drawing & collisions while Entity is for the rest of logic? Why it's not just one class? Collisions seem to be logic part and not drawing part...

Window / Re: Key combinations in SFML
« on: January 11, 2013, 04:04:34 pm »
Sorry, I missread your code! I thought there is input everywhere... Yes, your solutions solves the problem. Thanks.

Window / Re: Key combinations in SFML
« on: January 11, 2013, 03:46:50 pm »
No, I said I don't need the held (input class) approach as this one is trival. I just want one-time press (ie when I ctrl + click and held them, only one action gets triggered). So it's the event approach, but it must be tweaked in some way because I can get events at different frames and in different order.

Window / Key combinations in SFML
« on: January 11, 2013, 02:52:56 pm »
Well, handling key combinations like when 'shift' and 'a' are held using real time input are easy peasy.
But I have a problem. I need combinations like "ctrl and left mouse button pressed at once". I can get mouse event at one loop and the ctrl event at the next loop. So it's hard to do. What's the good way of handling this?

Graphics / Rendering on minus coordinates in linux
« on: January 09, 2013, 02:13:51 pm »
I have a strange problem. After porting my game to linux and to newest SFML 2 snapshot, the strange bug appeard. When I draw textured sprite at for example (0, -5), it doesn't get drawn at all. On windows and sfml 2.0 rc, the sprite was drawn cutted at the top (which is what I need for smooth scrolling). Is there something different on linux/was something changed in sfml recently? Or it is a bug in my code and for you drawing on linux on minus coordinates works?

Nvm... It was caused because C++ is weird....

int a = 5
unsigned int b = 30;

a - b = 423121312313213213
So stupid, I need to cast unsigned to int every time I store something in unsigned (ie widget position).

SFML projects / Re: SFGUI
« on: January 06, 2013, 07:52:32 pm »
I use linux actually :P
Is there a way to theme sfgui in some way (images, css layouts, whatever)? As the default font and theme isn't good for me.

SFML projects / Re: SFGUI
« on: January 06, 2013, 07:34:49 pm »
The download on http://sfgui.sfml-dev.de/download gives error 500 and the github project from the first post doesn't exist. How can I download sfgui?

Graphics / Render Texture and weak gpu
« on: December 26, 2012, 02:10:08 pm »
I know that if it comes to normal texture, on most intel gpus etc it can be only 512x512. My question is if render texture must be 512x512 too? If yes, is there any ready class that acts to me like one render texture and actually it cointains few smaller render textures?

I also want to know the same about normal textures if there is such a class that allows me to have 800x200 textures on all gpus and render it.


Window / Re: setPosition and getPosition don't work correctly on linux
« on: December 24, 2012, 04:19:09 pm »
sf::VideoMode::getDesktopMode().width = 1920
window.getSize().x = 1400

Both are correct. I use github version of SFML, I think its max 2 days old.

What's more, even if I don't change window position, the window.getPosition().x is 1 and the window.getPosition().y is 26. (of course, the window is by default placed somewhere in the middle of screen, so they are wrong)

Window / setPosition and getPosition don't work correctly on linux
« on: December 24, 2012, 03:32:54 pm »
So, I use lubuntu 12.10, the window manager is openbox. Code:

#include <SFML/Graphics.hpp>
#include <iostream>

int main()
 sf::RenderWindow window(sf::VideoMode(1400, 900), "Bug");
window.setPosition(sf::Vector2i(sf::VideoMode::getDesktopMode().width / 2 - window.getSize().x / 2, 80));
std::cout << window.getPosition().x; //gives 1
std::cout <<  window.getPosition().y; //gives 26

 while (window.isOpen())
        sf::Event event;
        while (window.pollEvent(event))
            if (event.type == sf::Event::Closed)



My resolution is 1920x1080, so it should be x = 260. Of course, the position isn't updated on screen as well.

for example in browser when you resize the window the text is always the same size. In SFML, when I create 1200x900 window, the text is exactly as I want, but when I maximize the window, it is way too big. Is there any simple way to make the text always be the same size :)?


SFML projects / Re: TGUI: a c++ GUI for SFML (with Form Builder)
« on: December 22, 2012, 11:54:02 am »
Btw, there is a little error on tgui's page. It should be "Texus' GUI" not "Texus's" ^^ (and it does not mean plural in this case)

Graphics / Re: Creating windows using wxwidgets - anti aliasing and vsync
« on: December 19, 2012, 11:01:50 pm »
Yes, wx has ancient api and documentation and learning resources aren't that good... However, I really want to make the editor using python + pyside (awesome qt official binding), as its much more convenient. And there is my question. Can I do sfml subwindow like in C++? But using cython binding of course.

General / Re: Generic Game Loop
« on: December 19, 2012, 10:46:53 pm »
Never do game loop which uses delta time for movement and never try to have a game that tries to run at 60 fps constantly... The only way to go is the fixed step with interpolation. Even if in simple 2d games it's not necessary, it's a good idea to have a good habbit since beggining, and when you move into 3d or even 2d fast paced games with physic, you will avoid A LOT of problems. The classic tutorial on this topic: http://gafferongames.com/game-physics/fix-your-timestep/


Graphics / Re: Creating windows using wxwidgets - anti aliasing and vsync
« on: December 19, 2012, 05:33:09 pm »
Uhh wxWidgets is so painfully and oldschool designed that basically I must manage the window and loop through the wx... No succes with letting SFML manage the window. What a shame that so few libs are as good designed as sfml, irrlicht or tgui... Most are Cish relict, to be honest when I see macro in "c++ "lib (as the wx widgets authors claim), i get sooo angry.

Is creating a normal wx app and creating sub-window for sfml (as in tutorial) a good way to write game map editor?
Or there are better options?

Pages: [1] 2