Screen fade and time question

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
User avatar
Asimov
Posts: 814
Joined: May 19th, 2012, 11:38 pm

Screen fade and time question

Post by Asimov » June 4th, 2012, 11:51 am

Hi all,

I am still rendering my background screen into putpixel commands, it takes an age. It would have finsihed by now but the computer blue screened on me last night, but I had an idea for doing fancy screen shows and fades.

rather than loading the pixels straight into putpixel, load them into an array first

eg Background [480000][5]; // for an 800 * 600 screen

That way you can load them onto the screen in any order.

Say you wanted an effect like the screen coming on in stripes you know the first pixel is at 0 and the next pixel down will be at 801.

The possibilites are endless.

The only problem is the timing. You want the screen to fade on or do your fancy effect the same speed on all computers, but at present there is nothing to keep everything in time.

I have two questions. One is there a better way of doing this?

Will we eventually be able to make our games run the same speed on all computers?

At present if I took my game on my computer which is 1.2Ghz and played it on say a 2Ghz computer it would run at almost twice the speed.

Asimov
----> Asimov
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Screen fade and time question

Post by chili » June 4th, 2012, 3:10 pm

Taking your game to a faster computer will not make it run faster. I mentioned this before, but the game's framerate is locked to the monitor refresh rate (which is 60 Hz for most people with LCD monitors).
Chili

User avatar
Asimov
Posts: 814
Joined: May 19th, 2012, 11:38 pm

Re: Screen fade and time question

Post by Asimov » June 4th, 2012, 4:34 pm

Hi Chilli,

Ok cool. I am a bit dense at times.

It is taking me ages to turn my background graphic into putpixels LOL, hope the computer don't crash befiore the end.

It will make my game look much better once it is in.

Just making small steps at the moment.

Asimov
----> Asimov
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk

Post Reply