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.


Topics - Aster

Pages: 1 [2]
16
General discussions / Communication between threads
« on: December 11, 2012, 05:58:14 pm »
Hi y'all!
I've been writing a game for a while, and I figured it'd be time to switch to multithreading, and maybe improve the overall FPS of the game.. However, in my long session of thought, I got stuck on one thing:

How do you "communicate", or pass information, between threads?

I know that if a variable is accessed by two threads at once, then the program crashes, and I've been told to use mutexes. But don't mutexes destroy the idea of speed? Don't they just make the program slower?

How do you guys work around this?

Cheers, and thanks in advance;
Aster

EDIT: Before I get told to post this stuff in the sf::System forum; I'm not having a problem with sf::Threads, this is more or less a general question.

17
Graphics / SFML and Box2D.. Shaping polygons?
« on: September 22, 2012, 10:35:20 am »
Hello everyone, first post on these forums for me..

Anyways, I'm developing a game, and I'll be using Box2D in it. My original master plan was to let users add content with a simple configuration file and textures and whatnot. However, to accomplish this, I'll need to shape the Box2D polygons to the shape of the non-transparent part of each texture.. Has anyone ever done this? I'm not sure it would be the most efficient of all things, but it would be really useful to know if it's possible, and to get some tips..

Thanks in advance!
Aster

P.S: I have absolutely no idea where to post this, so I posted it in the place that seemed like the most vague of the all to me.

Pages: 1 [2]