Crystal Towers 2 - Flash demo
Jul. 2nd, 2011 11:59 pmYes, I said that it wasn't over yet. But today, I spent my time finally cutting down the first level of Crystal Towers 2 to make it suitable for uploading as a Flash demo as an advert for the full game. That meant replacing the music system (which handled MODs), anything that ever accessed the hard drive (which was everything), and a couple of graphical extensions which don't have Flash equivalents (which I'd happened to use extensively).
It just shows the first level and the types of challenges that you can expect later in the game, along with hopefully directing some traffic back to the full game - you can now play it on Newgrounds.
Tomorrow I am not going to work on anything at all.
It just shows the first level and the types of challenges that you can expect later in the game, along with hopefully directing some traffic back to the full game - you can now play it on Newgrounds.
Tomorrow I am not going to work on anything at all.
no subject
Date: 2011-07-03 05:15 am (UTC)It should be easy enough just to loop over your game logic a number of times corresponding to the clock difference since the last enterframe, though.
no subject
Date: 2011-07-03 05:25 am (UTC)The way I spelled it out in the previous comment, it would sound like the solution is
gap = currenttime - previoustime
while (gap > 1000/60) {
doLogic();
gap -= 1000/60;
}
which would be fine if you were consistently getting 30 or 15 fps instead of 60...
but in the case of something where you're consistently getting 45 fps, it would do very little to actually help the problem, since you're never actually falling a full frame behind...
what I do is this:
theoreticalFrames = currenttime - gamestarttime;
while (framesThisGameHasHad < theoreticalFrames) {
doLogic();
framesThisGameHasHad++;
}
so that the overflow can actually build up over two or three frames before a skip kicks in to right you, like a leap year.
It's less noticeable than it sounds (and it's EASILY less noticeable than running at 75% speed, making this easily the lesser of the two evils.)
Actually I left one important thing out of that previous example for the sake of readability, but you'll probably want
theoreticalFrames = currenttime - gamestarttime;
// this part
if (theoreticalFrames - framesThisGameHasHad > 5) {
framesThisGameHasHad = theoreticalFrames - 5;
}
//
while (framesThisGameHasHad < theoreticalFrames) {
doLogic();
framesThisGameHasHad++;
}
just so it never skips TOO many frames, like if the hard drive suddenly gets busy with itself you'd rather have the game freeze for a second than jump forward a second without you... not to mention, if someone really does have an abysmal computer, slow motion WOULD be preferrable to frameskip in their case (but maybe call up a "hey the binary's much faster so maybe try that" message)
no subject
Date: 2011-07-03 05:28 am (UTC)theoreticalFrames = (currenttime - gamestarttime) / (1000/60)
:P
and incase it wasn't obvious from context, framesThisGameHasHad is global, i.e. is initialized at program start and sticks around
no subject
Date: 2011-07-03 06:25 am (UTC)Then I remembered: My controls on the full game are setup completely different from the defaults. XP
Buttons
Date: 2011-07-03 08:50 am (UTC)Re: Buttons
Date: 2011-07-03 02:26 pm (UTC)no subject
Date: 2011-07-03 02:28 pm (UTC)no subject
Date: 2011-07-03 02:29 pm (UTC)But yeah, at the very least, it would probably be easy enough for THEM to implement as a configurable option somewhere :)
no subject
Date: 2011-07-03 06:34 pm (UTC)Pretty excessive, for a flash game. I was surprised that it went beyond the "get to the end of the first level" challenge. That's already longer than most games made in flash : P
Might want to note the controls in game, though. I was sort of smashing buttons until I found one that made the character jump.
no subject
Date: 2011-07-03 07:18 pm (UTC)no subject
Date: 2011-07-03 07:28 pm (UTC)no subject
Date: 2011-07-03 07:46 pm (UTC)(Interesting comments; "I'll fix the rest tomorrow", you marvellous bastard..)
no subject
Date: 2011-07-03 09:04 pm (UTC)My change was simply to tell some objects (the enemies and their related detectors) to deactivate themselves if they were far away from the window, rather than running all the time no matter how far away from the player they are.
no subject
Date: 2011-07-04 04:02 am (UTC)And I doubt you can adjust this, but I noticed that it has that odd "holding X down allows Bernard to keep jumping" versus the actual game where he doesn't continually make jumps if you held the key down.
I've had that exact song stuck in my head ever since I read this earlier today, somehow replacing the Raccoons theme song (https://www.youtube.com/watch?v=80CD_Ez4jXc) which got caught in my head the day prior. Your music's quite catchy!
(Sorry for us making you work on this the following day of saying "I'm not doing anything tomorrow".)