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

Pages: 1 [2] 3 4 ... 11
16
Network / Simple UDP connection that transfers message using packets
« on: January 02, 2016, 11:36:43 pm »
So, I don't know why this isn't working. I've read some documentation and I've made this code. Both server and client are ran on the same machine.
SERVER
(click to show/hide)

CLIENT:
(click to show/hide)

17
SFML projects / Re: boxGame
« on: December 30, 2015, 11:47:06 pm »
fixed :P

18
SFML projects / boxGame
« on: December 30, 2015, 11:21:53 pm »
So, I wanna create simple multi player game and here is what I've done so far. Please comment, criticize etc. Idk if this is correct way to do state machine.
https://github.com/paupav/boxGame


19
Because GCC is most widely used compiler.
Death to all compilers besides GCC!

20
General / Re: Rotating player depending on the mouse position
« on: November 23, 2015, 09:42:10 pm »
Shouldn't that be atan instead of tan? And are you sure you have to operate with angles in radians instead of degrees?

I'm not sure if there is any function that returns angle in degrees, but I0ve definded #define RAD 57.29 and at the end I simply multiply angle in radians with that constant.

It's atan2, and "sfml rotate mouse position" yields lots of results on google.

Idk why it worked, but it didn't work with atan.

21
There should be big sign that says "Install Ubuntu/Fedora and use "this" command/s to install SFML, codeblocks and gcc. "

22
General / Rotating player depending on the mouse position
« on: November 23, 2015, 07:29:01 pm »
So basically I wanna make player1 rotate and always look at the cursor, but I'm stuck. For some reason code below doesn't work

 
click1Pos.x = (int)sf::Mouse::getPosition(cliff->window).x;
        click1Pos.y = (int)sf::Mouse::getPosition(cliff->window).y;
        moveToCursor = true;

        double one = playerYposition - mouseYposition;
        double two = playerX - mouseXposition;
        double tanges = (tan(one/two)* RAD);

        player1.setRotation(tanges);

23
General / Re: Segmentation fault when trying to draw sprite[10]
« on: November 23, 2015, 04:09:11 pm »
That was the problem. thanks  8)

it is giving me unexpected behaviour when I'm trying to load texture when number of sprites isn't defined ( sprite[]; ) .

24
General / Segmentation fault when trying to draw sprite[10]
« on: November 21, 2015, 03:50:13 am »
i have pointer in second cpp which points to window and when im trying to draw sprite[10] I get segmentation fault.

window->draw(boxS[10]);

25
SFML projects / Re: Simple SFML Game Starter Setup
« on: May 10, 2015, 09:47:05 pm »
Thanks  ;)

26
SFML website / Re: Precompiled binaries Linux 64bit problem
« on: April 04, 2015, 04:15:15 pm »
It seems that Debian team and Red Hat have different ways of storing libraries
http://www.redhat.com/magazine/009jul05/features/multilib/

27
SFML website / Re: Precompiled binaries Linux 64bit problem
« on: March 03, 2015, 12:24:27 am »
ElementaryOS has folders "lib" and "lib32" on 64bit machine.

It seems that Debian team and Red Hat have different ways of storing libraries
http://www.redhat.com/magazine/009jul05/features/multilib/

28
SFML website / Re: Precompiled binaries Linux 64bit problem
« on: March 02, 2015, 10:50:38 am »
I think that Debian based distros should have the same way of storing libraries. I can check them out too.

29
SFML website / Re: Precompiled binaries Linux 64bit problem
« on: February 27, 2015, 10:30:51 pm »
I am currently running Fedora 21, but I think that it also applies to Ubuntu. I will try and see if that also applies to Arch.

30
SFML website / Re: Precompiled binaries Linux 64bit problem
« on: February 27, 2015, 05:07:08 pm »
In the 32 bit Linux distros there are folders in /usr/local called "include", "share and "lib". In the 64bit distros there are folders "include", "share", "lib64" so, I think that folder "lib" should be renamed to "lib64" to avoid error that I have mentioned in previous post in the thread.
 :D

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