*blog... kind of... *rss
Inspire08 demo log, day 30 13.05.2008 | |
Status: -2 days left until Inspire08 Back to the system code
... Ok, porting this to LWJGL ended up being a waste of time. The main porting was very quick, like, in 30min I had it done and working. Doing the applet version took more time, about 4 hours or so. And in the end there were some weird bugs with the timer, and after all the time spent trying to understand how to do the Applet version is the last thing I wanted to see. So, back to JOGL.
I also spent more time again on getting the position of the tune. I managed to get something this time. SourceDataLine.getFramePosition() return the amount of samples played, but they numbers aren't as smooth as a normal Timer, like the same number may repeat 5 times, which means that the animation is jumping. I had to do a crap fix for that:
public static long getPosition()
{
/*
* For some reason the SourceDataLine.getFramePosition()
* doesn't give back smooth sequence of numbers, here it's
* a crap fix for it.
*/
if (lastSampleInfo != tune.getPosition())
{
lastSampleInfo = tune.getPosition();
lastTimerInfo = System.currentTimeMillis();
}
return lastSampleInfo + (System.currentTimeMillis() - lastTimerInfo);
}
Am I the only one that thinks that it's weird that I have to do this? Still, it kind of works, but sometimes jumps back a tiny bit, I may come back to this code in a few days to try other things, but at least it uses the audio timer (somehow).
I was now starting doing the font system, it will take a bit still as I need to find the best/most dynamic approach.
I felt that closing the previews was a bad idea, so as soon as I have some text on top of the screen working I'll put a new version online so you can see where the thing is going. | | posted by trace at 01:20 | | 0 comment written so far |
SORRY! Is not that I don't care about what you have to say, of course I do, but they are speaking louder and I lost my patience :(
|
|
*profile

traditional id: Ricardo Cabello Miguel
based in: London, UK
serving to: Hi-ReS!
contact me: click here
*latest posts
* How-to unlock your Vodafone UK mobile ... (02.07.2008) * escena.org DVD #1 / 2008 released (wit... (12.06.2008) * New Neave.com (12.06.2008) * Speaking @ Pixel Attack (Valencia, Spa... (10.06.2008) * That's enough. (10.06.2008) * Roxik's The Eco Zoo (05.06.2008) * FlexBuilder3 + Eclipse + Ubuntu = More... (21.05.2008) * Inspire08 demo log, day 36 (18.05.2008) * Inspire08 demo log, day 35 (17.05.2008) * Temps Réel - Breakpoint 08 (14.05.2008) * Diverter (13.05.2008) * Inspire08 demo log, day 30 (13.05.2008) * Inspire08 demo log, day 29 (11.05.2008) * Inspire08 demo log, day 27 and 28 (10.05.2008) * Inspire08 demo log, day 26 (part 2) (08.05.2008)
*latest comments
* C++, SDL Coding? Maybe.. ;) (Preview) (trace) * C++, SDL Coding? Maybe.. ;) (Preview) (Joey) * La picaresca (spt) * Mr. Slip Up (ricardo) * La picaresca (ricardo) * La picaresca (spt) * La picaresca (sole) * Demoscene @ Cirsa (sml) * La picaresca (humphr3y) * La picaresca (alfio) * fiver2's new baby: debris (Jcl) * Barcelona = full of shit(s) (Soli) * Demoscene @ Cirsa (Scener) * Rar & unrar with Ubuntu (SethPlate) * Mindcandy 2 (Jcl)
|