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

Pages: 1 2 [3] 4 5 ... 9
31
Window / Re: Fullscreen window but getSize() incorrect (ubuntu)
« on: December 08, 2015, 10:18:21 am »
I think you might find sf::VideMode::getDesktopMode() usefull  ;)

32
Read the official tutorial and learn the difference between static and dynamic linking
http://www.sfml-dev.org/tutorials/2.3/start-vc.php

33
General / Re: Ubuntu - Speed Issues
« on: November 26, 2015, 02:25:47 pm »
Your problem is not connected to Ubuntu or your OS in general. The "problem" is this line in Game::Game()
mWindow.setKeyRepeatEnabled(false);

After this, if you press and hold a key, no additional key events are generated. Therefore you must release the key and press it again, to fire a new key-press event. With every key press you only move by 1.f pixel, and therefore you must press it very fast ;)
Do the additional chapters in the book and you will find more elegant solutions to this "problem". For more info google "fix your timestep".

34
General / Re: Help setting up SFML with Code::Blocks on Ubuntu!
« on: November 26, 2015, 02:18:49 pm »
Depends on your Ubuntu Version, but here is my tutorial for 14.04 http://seriousitguy.blogspot.de/2014/11/how-to-setup-sfml-on-ubuntu-1404-lts.html

Should be mostly appropriate on Ubuntu 15.10 and for SFML 2.3, haven't tested it yet. Some libs should be different (no libglew anymore, but libxcb and maybe others)
If you use 14.04.2 or 14.04.3 you can't compile it yourself because of a nasty bug in aptitude which can't install OpenGL development headers. So you must go with precompiled binaries.

35
SFML projects / Re: Surround Test
« on: November 19, 2015, 11:22:18 am »
Nice, will test this with my new 5.1 headset ;)

36
General / Re: Linking on Linux
« on: November 19, 2015, 11:15:42 am »
Another side question after following your efforts: Are you compiling statically?
I'm asking cause that is not what is commonly done on a *nix-system, dynamic linking is far more common due to how libraries are handled on *nix-systems ( normally installed under /usr/lib or /usr/local/lib via package manager or make) or providing the needed libs alongside your binary and setting library path yourself via a shell script to start your application. (One of the major differences in the Linux philosophy, that's why static libs are rarely provided by binary packages)

Also one side note, do not upgrade to 14.04.2 or 14.04.3 with the new hwe-stack, this breaks some dependencies in aptitude and you are no longer able to compile sfml because of a missing opengl dependency. In 15.10 this works again, and you get a much newer kernel (4.2, especially important for newer nvidia or amd graphic cards) and GCC 5.2.0.
I cannot use 14.04 anymore because of my new graphics card (Nvidia GTX970) which requires kernel 3.17 or newer.

As a new linux aspirant I hope this helps you ;)

37
General / Re: Linking on Linux
« on: November 13, 2015, 03:38:05 pm »
I don't know what's exactly in the package libsfml-dev, but normally a -dev package only contains the developement headers.

It is best you compile it yourself from source, it is easy and since version 2.2 very straight forward. This way you have development headers and library files correctly installed.

38
SFML website / Re: Request: Getting started tutorial SFML and CLion
« on: November 11, 2015, 01:47:56 pm »
I would really like to see a dedicated cmake+SFML tutorial, cause I still can't get my head around using cmake in my own projects, though I can compile premade cmake projects (like SFML itself). Things like out-of-source build, include directories, sub-directories come to my mind. The cmake documentation itself was not very helpful, so real-life examples would be awesome.

39
General discussions / Re: SFML Tutorial Series
« on: November 02, 2015, 10:42:08 am »
Ah, I first learned about SFML with said tutorial, and I ported it myself to SFML 2 & C++11. It was a good tutorial as it helped my get into the topic at that time. So when I have some time I will watch the new one.
Keep up the good work!

40
SFML projects / Re:creation - a top down action adventure about undeads
« on: October 30, 2015, 11:03:04 am »
Congrats on keeping up the work for two years, can't wait to get my hands a copy of your game.

41
Graphics / Re: [Solved] Problem with calculating global bounds
« on: October 29, 2015, 09:07:10 am »
Yes Laurent is correct. In my example program I instantiated TextMenu and saved the global bounds of it into a variable before even doing a transformation to it (menu.setPosition). I then used the saved bounds instead of calling getGlobalBounds again, therefore the transformation did not apply. Obvious mistake is obvious  :D

42
Graphics / Re: Problem with calculating global bounds
« on: October 28, 2015, 01:28:09 pm »
In your example, you retrieve the global bounds before applying your transformations, is it intended?

Oh my god, that was the problem. Now I feel dumb!  :o
Now it works. Thanks!

43
Graphics / [Solved] Problem with calculating global bounds
« on: October 28, 2015, 11:29:26 am »
Hi all,

I'm currently developing a class which represents a text menu for applications (like a main menu for a game). While doing so, I oriented myself at the sf::Text - class, which is used internally for displaying individual meny entries. It works as intended but when calculation the global bounds of the complete menu, the top-left coordinate of the menu is 0.f, 0.f. Width and height should be the same like the local bounds, which is correct (209, 150 in my example below). The local bounds are correctly calculated and stored as a member inside the class.

I used the same method for calculating the global bounds like sf::Text or sf::Sprite do:
sf::FloatRect TextMenu::getGlobalBounds() const
{
  return getTransform().transformRect( getLocalBounds() );  
}
 

... which should return the global coordinates of the menu with all transformations applied.

I have no idea why the global bounds are not correct.   :-\
The complete code with minimal example can be found here: https://github.com/SeriousITGuy/SFML-TextMenu

It is not a deal-breaker as the rest works like intended and is ready to use in my other projects, just wondering why this happens  ;)
I plan on posting this class in the wiki once it's completed and therefor it would be good to get rid of this minor issue.

44
General discussions / Re: Debian/Ubuntu packages for SFML
« on: October 23, 2015, 09:53:04 am »
I just want to report that I could not find a way to pull in OpenGL dev headers on Ubuntu 14.04.2 and 14.04.3 as of now. Every package that wants to pull them complains about unsatisfied dependencies with libcheese and libgtk, which seems to be a bug in aptitude at the moment.
Will continue searching for a solution. If anyone has any hint, I would glady appreciate it.  ;)

45
I tried some tools for that, and what works best is PyxelEdit. Paint.NET works but has no tile specific tools, Krita, Photoshop or Gimp are overkill alternatives. GraphicsGale seems to be very good, but I find it hard to use.
Try the old beta of PyxelEdit, it's worth it. As soon as I start to need more gfx I will buy it.

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