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

Pages: 1 [2] 3 4
16
Graphics / Re: LNK2001 unresolved external symbol
« on: November 24, 2018, 07:56:45 pm »
Linker errors (LNK) are generally caused by poor project settings (e.g. in your IDE) or because it could not find a file needed (because you did not specify its location properly).

I would suggest starting over the installation process with the tutorial, and doing it very slowly -making sure you read everything.

https://www.sfml-dev.org/tutorials/2.5/#getting-started

17
Graphics / Re: Rendering n frames ahead
« on: November 24, 2018, 07:50:13 pm »
Yes, it's possible.

See https://www.sfml-dev.org/tutorials/2.5/window-opengl.php#rendering-from-threads

And with mutexes on top.
I think this is a pretty silly solution though -one separate thread should load the data for sure, but:

If the problem is the loading, why buffer the textures as well? I'm assuming it takes almost no time for you to draw those files into the window (once they are loaded).

And now I speculate (might be 100% wrong):
Additionally, I suspect you may run into video ram issues with several render textures, where those too would be stored in memory if you run out of memory in your gpu (thus taking time to load back as well).

18
Graphics / Re: Rotation of a sprite
« on: November 24, 2018, 07:43:34 pm »
A rotation does not change the position (coordinates) of a sprite's center of rotation (which is what you actually "move"), so I don't know what you mean.

19
Graphics / Re: Moving sprite using certain path
« on: November 24, 2018, 07:42:31 pm »
Move your sprite from A to B, and then from B to C.

I'd do it by adding a variable "last point reached", with the index in the vector of the point you started at (e.g. you start at A (0), go to B(1), then C(2)...)

20
Audio / Re: Latency when starting recording
« on: November 24, 2018, 07:35:45 pm »
Quite late of a reply, but: you could start the device earlier than you need and discard the first few seconds of values.

21
Audio / Streaming a custom format
« on: November 24, 2018, 07:34:19 pm »
I've got real time data coming into a buffer, and I'd like to stream said buffer (think voIP).

I've tried to make a class inherit from sf::InputStream for sf::Music to be able to stream it, but I wasn't succesful.

Is an example of an sf::InputStream with a vector of sf::Int16 (sound data) provided anywhere so I could use it? Or is this not possible, since sf::Music seems to automatically detect a stream's sample rate?

22
Feature requests / Add "setSmooth" option to font or font texture
« on: December 30, 2017, 03:29:45 pm »
https://www.sfml-dev.org/documentation/2.4.2/classsf_1_1Font.php

To achieve "pixel-art" fonts, the texture needs to not be smoothed out -however, by default, it is.

Currently I'm doing:
sf::Texture& texture = const_cast<sf::Texture&>(font.getTexture(size));
texture.setSmooth(false);

But it would be better to have "setSmooth(bool)" on the font or "setSmooth(bool, size)" to only un-smooth a particular size.

23
Feature requests / Re: small sf::rect suggestion
« on: May 03, 2017, 01:36:24 pm »
bottom and right can already be easily calculated using top+height and left+width.

Yeah but if you store bottom and right you can also easily calculate height and width. It's a matter of what you prefer. I personally also find bottom and right more useful, I use them more often than height and width, thus doing more calculations.

As for touching, I am not sure what would be the use case. Do you have a use case to present for this because this sound oddly specific to your situtation?

Touching doesn't make much sense if it returns false even when they do intersect.
However, it is useful to know if 2 objects are right next to eachother, in some cases like checking if a point is on the edges of the rectangle and other similar operations.

24
Feature requests / Re: Issue with overlay blending modes
« on: April 27, 2017, 02:09:19 pm »

25
Feature requests / Re: Vulkan Support
« on: April 27, 2017, 02:06:55 pm »
Vulkan is future in applications when efficiency is really crucial. In case of SFML it's not. Same goes for CAD–like programs, simple GUI apps (aka file manager etc.) and pretty much anything that works in 2D.

If the option isn't there, and the program requires efficiency, SFML wouldn't be an option.
My game requires an insane amount of efficiency to run bigger levels, as there is no direct limit to entities, level size...
So that efficiency would be nice, assuming the fact that I could code it (I don't know if I could do multithreading well -but assuming I could, it would be amazing).

26
Feature requests / Sound/Music equalizer
« on: April 13, 2017, 11:08:09 pm »
What the title says. I think it would be a great feature to have -it would enable music to have a "muffled" effect when airborne/underwater or boost the bass during intense moments.

It may sound like very little but the effect music has in games is extremely underrated.

27
Feature requests / Re: UPnP
« on: April 13, 2017, 11:04:51 pm »
After a bunch of thinking and looking around -you seem to be right, in that it's not worth to implement this feature: UPnP is disabled on most routers by default due to security issues, which kinda defeats the purpose of "practicality" that I was going for.

28
Feature requests / Re: UPnP
« on: March 30, 2017, 10:13:48 pm »
- There probably exist some UPnP standalone libraries out-there (you mentioned at least one). Can they be used easily with SFML at this point? I mean, since I know nothing of the protocol, can a UPnP setup be made independently of SFML sockets? Similarly, would a UPnP API in SFML impact sf::Socket*.
Yes, a library can be used independently afaik. I'm not really sure if it would interfere with sockets... miniupnp has a forum where you could ask, though.

- You said: "I don't want to use "hole-puching" to reach them since I don't have a server." How do you handle the discovery of peers from a given peer? Are there some server-less protocol for discovery of peers across the Internet?
I will give them my router's IP with the forwarded port, which will then give me their IP (even if they're behind a NAT) which I can then use to make a P2P connection (the forwarded port doesn't need to be used anymore and can be deleted).

Well, yeah, normally UDP works for P2P but the problem is that NAT boxes (routers with several devices under 1 IP) make you unreachable unless you contact the person you're trying to be reached by first.

- Are there some serious drawback, beside needing a server, to hole punching? Any other alternative we should know about too?
No, hole punching just consists in having a server that relays the IP to other clients. It has a scary name but is harmless.
Any port mapping/forwarding method works, and there's a few other workarounds I believe, but I don't know enough to talk about.

- UPnP seems to be a relatively big protocol. Don't we want something simpler in SFML, that would be more tailored to configuring NAT traversal and leave out many module of UPnP? Something like the Internet Gateway Device Protocol (which is use by UPnP I think), maybe?
Well, I don't know how big UPnP is, and I'm not sure if you have to integrate ALL of it into SFML to make it work.

All I need is "AddAnyPortMapping()" and maybe "DeletePortMapping()" and I'll be able to relay everyone's real NAT IP so that P2P connections can be made.

29
Feature requests / Re: UPnP
« on: March 28, 2017, 10:03:13 pm »
Well I need this feature to bypass my NAT box- the users I'm trying to contact might (really likely) be sitting behind a NAT box, which makes it impossible for me to send anything to their IP unless they sent me something themselves first, which would "allocate" a port on the router that would redirect traffic to them.
Also, I don't want to use "hole-puching" to reach them since I don't have a server.

So forwarding my port so that my router knows to redirect stuff to me would be the solution I need.
As for other use cases:
SFML could be used to create a "router manager" program that allows you to map/unmap/view port mappings.
On top of that, I'm pretty sure UPnP allows you to know router information (name, manufacturer) so it could give a lot of debug information (more specifically, this network information could be used to fine-tailor the netcode of a client's game).

Most importantly, it would encourage players to make multiplayer servers since you wouldn't have to tell them "figure out how to open this port". Risk of rain had this issue where most people didn't know how to do so, and as a result the fantastic multiplayer mode was used less frequently than it should've (IMO).

30
Feature requests / UPnP
« on: March 28, 2017, 09:54:16 pm »
I need to forward a port in my code, and UPnP seemed the only option to do so in code. After looking around for way too long, I've found no way to use the windows UPnP stuff ( https://msdn.microsoft.com/en-us/library/windows/desktop/aa382303(v=vs.85).aspx ) and was pointed to libraries such as miniupnp ( https://github.com/miniupnp ).

I haven't tested the libraries yet, and I'm sure they'll work, but I thought it would be great if SFML had this feature, so yeah. Hi.

Pages: 1 [2] 3 4