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

Pages: [1] 2
1
General discussions / Will SFML support windowing for Vulkan?
« on: March 01, 2016, 04:09:10 pm »
Is it in the works, or no plans for it?

2
Graphics / Drawing SFML alongside opengl 3+ ?
« on: January 29, 2016, 10:20:33 am »
It works fine with ogl 2, but it doesnt draw in opengl 3, why is that?

      window.pushGLStates();

      window.draw(sf::RectangleShape(sf::Vector2f(100, 100)));

      window.popGLStates();

3
Graphics / What happened to Image.loadFromPixels?
« on: December 09, 2015, 01:40:57 pm »
Yes I do have sfml 2.3, Making a pixel array is much more efficient than image.setPixel, isn't it?

4
True, I forgot the second one. With a bit of thinking, I'm sure you'll find it out yourself :)
x is the value in [-180, 180[ that you want to map to [0, 360[.

By the way, you could have a look at Thor's Vectors module, it really simplifies operations on vectors and angles.

Hm, so x = std::fmod(0, 360)?

5
What is "fixing"? That's correct, as I said.

If you need a [0, 360[ range, use std::fmod(x + 360.f).

Doesn't fmod require 2 arguments? and is x supposed to be the rotation or the x specified in the code?

6
This is expected, you should read the documentation of standard library functions ;)

Also, correct C++ is std::atan2, not atan2.

gotcha. Ive given a toss at fixing that with no success. Any suggestions for fixing?

7
Sorry for the long title. Whenever the rotation of the object exceeds 180(degrees) when the rotation is supposed to be 350 its -10, 340 = -20, 330 = -30, and so on.

       const float PI = 3.14159265;

   int mx = sf::Mouse::getPosition(window).x;
   int my = sf::Mouse::getPosition(window).y;

   int tmp_rot = (atan2(my - y, mx - x)) * 180 / PI;

   rot = tmp_rot;

8
Network / Re: Should i use Tcp or Udp?
« on: September 22, 2015, 05:19:49 pm »
Are you trying to troll us?

http://en.sfml-dev.org/forums/index.php?topic=19021.msg137190#msg137190

Stop opening new forum posts. Do your research about TCP and UDP and come back when you have concrete SFML-related questions.

Can you delete this post? For some reason it doesn't let me.

9
Network / Re: Should i use Tcp or Udp?
« on: September 22, 2015, 05:18:25 pm »
Are you trying to troll us?

http://en.sfml-dev.org/forums/index.php?topic=19021.msg137190#msg137190

Stop opening new forum posts. Do your research about TCP and UDP and come back when you have concrete SFML-related questions.

No. (lol) but I just have a lot of questions.

10
General discussions / Re: Why do so many game take so much space?
« on: September 22, 2015, 05:17:47 pm »
Definitely the assets. I think the big Blizzard games are like 10GB each or so (at least SC2 was last I checked).

probably, considering I'm very used to procedural content.

11
Network / Should i use Tcp or Udp?
« on: September 22, 2015, 05:14:20 pm »
I am making a multiplayer top-down shooter, I am familiar with tcp but considering how fast udp is, is it worth it?

12
http://www.sfml-dev.org/tutorials/2.3/network-packet.php#packets
http://www.sfml-dev.org/documentation/2.3.2/classsf_1_1UdpSocket.php#a48969a62c80d40fd74293a740798e435

Really, if you know how to do it with TCP, or with UDP and raw data, this is really trivial to adapt... So just write the code and give it a try, instead of writing forum posts :P

Anyway, you probbaly won't get any help until you show us some code and get stuck on a something specific. We won't write the code for you.

welp, ill give it a toss and see how it goes. But one last question, does tcp's lag scale with how much data you send? and at what percentage?

13
So you haven't even tried anything with sf::UdpSocket yet? I'd say start something first, the documentation, tutorials and examples should be more than enough to get you started. And if you get stuck on a specific point, come back and we'll be glad to solve your problem.

*There is a decent amount of good stuff on the interwebs about tcp and PACKETS, but not udp and PACKETS.

Sorry for the confusion :)

14
Network / Re: SFML Server doesn't accept more than one client
« on: September 22, 2015, 02:08:07 pm »
That's how tcp works. you could use a socket selector though.

15
Do you even understand what UDP is and how it works?
UDP is an unreliable protocol. You don't get any guarantees regarding to packet ordering or even receiving.

I understand the differences, tcp is more reliable but slower, but udp spits everything out as fast as possible.
witch makes it better for games (as far as ive heard) and I need minimum delay/lag.
There is a decent amount of good stuff on the interwebs about tcp and sockets, but not udp and sockets.

Pages: [1] 2