Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Jakez

Member Since 17 Jun 2010
Offline Last Active Feb 07 2012 08:13 AM

Topics I've Started

Xcode 4 on Lion and SDL 1.2.15

30 January 2012 - 02:44 AM

Hello everyone.

I just got my first macbook pro, and installed Xcode from mac app store.

I am trying to setup SDL 1.2.15 which was released a few weeks ago. The release explicit says it supports OSX Lion.
I just have a hard time getting it to setup.

I noticed that with 1.2.14, there were templates you could install with xcode. But those seems to be gone with sdl 1.2.15.

I have been scouting the net since its release for information on how other did it, but only found posts were people just said they got it to work and not how.

So I hope for some love from you guys, that someone of you have a template that works with the newest xcode and lion or if someone of you knows a guide how to set it up by creating an empty project.

best regards
Jakez

[SDL] cpu usage

01 December 2011 - 02:18 PM

Hello guys.

I have been trying to figure out if I should cap the max. number of frames there bust be each second in my SDL game. All my animations is moves according to delta, and is not effected by the number of frames each second.

I would cap the FPS with SDL_Delay, I tested by looking at the windows 7 task manager how much CPU my game would use under different circumstances:

I first tested to see if indeed SDL_Delay also spared the CPU, by setting it to SDL_Delay(20000), and the CPU under "Processes" showed: 01.

With a cap on 60 FPS, the CPU showed around: 25.

With no cap the CPU showed around: 50.

I wonder if it is important to cap FPS. Gamers around the world brag about how many FPS there games play with, so I guess there isn't a CAP on those games.

So would you cap it? or let it run as many times as you would like?

a little extra curiosity question:
I noticed a game I made in SDL used 250.000K memory when running under winXP32bit, but when I switched to win7 it used 150.000k. I had a lot of images. But anyone know why the different on the to OS?

[SDL] Array of Mix_Chunk and Mix_Music

01 March 2011 - 09:57 AM

Hey Guys

So far I have a list of Mix_Chunk declared on one line each like:

Mix_Chunk *one = NULL;
Mix_Chunk *two = NULL;
etc

This makes using them, for example a random of them, a bit weird.

Isnt there a way to declare them in a array. so that I can just use them with for example: miscsounds[i]? or a vector?

I have already looked it up in the documentation and searched for it, but couldn't find anything.

I tried different ways of doing which one seem logic for me, but that only gave my errors. So my next try, would be to make an "wrapper object" where I would just play a chunk thru a method like play_chunk(i).
Only I dont really know how tomake an object like that work dynamic. Maybe not even static without having it to be some "poor" level of coding.

I hope you understand what it is im trying to do.

Maybe there is a good way im overlooking you guys know of? Or should I give that wrapper a try?

Thanks in advance!
- Jakez

[SDL] loading image or sprite sheets

13 July 2010 - 07:32 AM

Hey everyone.

note: have looked for the answer myself, but couldn't really find what I wanted to know.

I finished lazo foo lessons some time ago, and have made a few games.

My questien is: Does it matter if I don't load all the pictures at the beginning, or should I merge them into one and have sprite sheets?

My logic says that it ofc uses the computers resourses if it once in a while have to load a picture, but it is that big a deal?

But I guees its best to use spirte sheets, since the other can turn into a bad programmering habit? Am I on the right track here? :)

PARTNERS