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

Pages: 1 ... 3 4 [5]
61
General discussions / [Announcement] New support for joysticks
« on: July 23, 2011, 09:32:59 pm »
Haven't forgotten about this... just finishing some other bits off on my arcade game engine first.

Not had any problems getting my code to work on Mac & PC. Just a few minor niggles with subtle C++ compiler differences.

62
Graphics / Bitmap Fonts
« on: July 17, 2011, 11:07:12 am »
Thanks Laurent.

I suspected there wasn't an easy answer but thought I would ask.

The library is excellent by the way. Very elegant and clean. I had something working on PC and Mac very quickly, even though my Mac experience is very limited.

63
Graphics / Recursive Dimensional Clustering
« on: July 17, 2011, 11:03:13 am »
When I profiled my first game (Gravity Core) I found that a major CPU drain was collision checking.

The game was checking every game entity against every other which is an exponential growth problem.

i.e.
Checking 5 objects against 4 (excl self) = 20 checks
Checking 10 objects against 9 = 90 checks
Checking 100 objects against 99 = 9900 checks!!

To help with this, I implemented a heuristic algorythm that clusters together entities so that only relevant groups need to be checked.

It was based on an excellent article in Game Programming Gems 2. (These are great books - just not cheap!)
http://www.amazon.co.uk/Game-Programming-Gems-Vol-CD/dp/1584500549/ref=sr_1_1?ie=UTF8&s=books&qid=1310893296&sr=8-1

If you shop around, there are some reasonably priced second hand ones knocking around (e.g. Amazon resellers on Amazon.COM).

It's well worth investigating.

If anyone's interested I can try to dig out some sourcecode, though it will need some rework as it's tied into my sprite interface.

64
Graphics / Bitmap Fonts
« on: July 17, 2011, 10:34:51 am »
Is it possible to create a font bitmap from a TTF (via Font::LoadFromFile), export the bitmap, modify it then recreate the font from the updated bitmap?

Ideally I would like to save off the bitmap then reload the font from the bitmap without the TTF being present. This would allow me to use fonts that are royalty free but can't be redistributed as a TTF.

I can see that there's an option to get the bitmap image from a font (via GetImage) but I can't see a way to load a font from bitmap data.

I appreciate this might not be possible, if the font metadata isn't included in the bitmap.

(Hope this makes sense!)

Thanks,
Gary

65
General discussions / [Announcement] New support for joysticks
« on: July 10, 2011, 10:17:56 pm »
Nice one. Thanks a lot.

I'll give them a shot.

Need to figure out how to install a gamepad on Mac first (assuming it doesn't magically download a driver - I can hope!)

66
General discussions / [Announcement] New support for joysticks
« on: July 10, 2011, 06:11:51 pm »
Yes, you're right - the joystick code in 1.6 is only for PC.

I wondered if I could easily integrate the Mac joystick code from 2.0 into the 1.6 codebase myself, as I want to build my game against the 1.6 (final) build initially.

Sounds like it has changed quite a lot, though. I'll take a look.

Great job with the SFML library by the way.

I've been working with it for a few weeks now. It is very neat and enabled me to get something working on the Mac very quickly (I have minimal Mac experience).

Is there a what's new list somewhere for 2.0?

Thanks.

67
General discussions / [Announcement] New support for joysticks
« on: July 10, 2011, 11:53:54 am »
I have a few different USB gamepads knocking around. I thought I had a Microsoft Flightstick somewhere but maybe it was binned off when I downsized my office.

I'll try to have a play at some point. I'm building against 1.6 at the moment.

Is the 2.0 joystick interface very similar to the 1.6 version?

I'm wondering if it might be easy to put the new joystick code into the 1.6 codebase.

Pages: 1 ... 3 4 [5]