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

Pages: [1]
Window / Touch.hpp missing
« on: May 15, 2017, 12:43:21 pm »
Trying to build a gui for a Raspberry Pi project but I can't seem to find Touch.hpp. Compiling a program containing

#include <Touch.hpp>

throws the usual not found error, and looking in the SFML/Window folder reveals that Touch.hpp is not there. If I copy the header off the GitHub repo, what source files do I need and where do they need to go?

Original install was on ubuntu 14.04 via apt-get.

SFML projects / Re: TGUI: GUI library for SFML
« on: July 19, 2016, 12:57:48 pm »

Just started using tgui for a project and run into a problem. I keep being told that tgui-s-d.lib is too large to push to GitHub! It is reported by git as 105.59MB, whilst the limit is 100MB. I can't quite believe that I'm the first person to run into this, so is there a solution?

System / Re: How to do something every x milliseconds
« on: June 30, 2016, 01:27:07 pm »
Ah, I was doing 'if (time % 100)', so your way will give me the tolerance I need. I do have to be quite regular when spawning sprites, but a few ms out is certainly better than having sprites missing!

Thanks for your input!

Just in case anyone else finds this thread and wants to do the same thing, another way is to put the thread to sleep for the time interval, and loop over the sleep period and the action you want to perform regularly

I didn't think of this before I designed my data structures, but it might help someone further down the line.

System / How to do something every x milliseconds
« on: June 30, 2016, 10:01:30 am »

I'm working on a project with SFML and am having a problem.

As the title suggests, I need to spawn a sprite every x milliseconds, where x is at least 100ms but variable (set at compile time) up to about 500ms. I'm using an if-else block, as I will sometimes (usually) need to delete an old sprite when a new one is created. My problem is that occasionally, the sprite won't be created. Some debug messaging confirms that the if branch has not been taken. I should note that by occasionally, I have determined about 1 missing sprite in every 500 or so. There is no obvious pattern to when one is missing.

My initial thought is that the problem is to do with the OS process scheduling and that the process might not always be running at the right time to trigger the branch. Performing an action at regular intervals can't be an uncommon problem though, so is there a better way of doing this?

I should mention that this if-else block is running in a separate thread, which loops over the block (for the moment) from the end of the initialisation routine in main() until the program exits.

I'd be grateful for any advice.

SFML website / Re: Add a bookmark icon
« on: June 11, 2016, 02:58:06 am »
Would you mind sharing the solution with us?

Sorry not to reply before now. Apple has an article about how to do this here. The PR is right about the icon but adding the HTML to the specific pages adds flexibility if further down the line there were to be different icons for, say, the tutorials, documentation and forum...

I don't know that this can actually be tested without pushing the icon to the live site. Maybe if the website were zipped and sent to an iOS device but that seems like a disproportionately huge undertaking to test such a small feature.

Thanks for your efforts looking into this.

SFML website / Add a bookmark icon
« on: June 06, 2016, 01:09:33 am »

I've just started using SFML for a project and I'm finding my iPad a really useful tool for reading the documentation whilst I'm working. The problem is that adding the website to my home screen is causing a really ugly snapshot of the page to be used as an icon, when the SFML logo almost seems designed for a square icon. Since this could be done with a couple of lines of HTML and an image, could an icon please be added to the documentation home page for those of us who like to work in this way.

Thanks in advance!

Pages: [1]