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.
Status: -1 days left until Inspire08 Back to the system code
As now I have more time (lol) to finish this, I'm now taking a look to lwgl as an alternative for jogl. On Friday I was amazed of how easy was to have something compatible for main OS and browser and I wondered why no other sceners used it for avoiding shit time compiling stuff. Then I realised that there were more people on the scene doing demos with Java, at least Pandur did. So I mailed him and after a couple of mails he explained he used lwgl instead. After spending almost all the evening today I still don't know what are the benefits on using jogl or lwjgl, but I think, after testing it a bit, and specially after having been answered nicely all my questions by the people on #LWJGL I think I'll use this one instead. Also the applets seem to be a bit more robust than Jogl ones. Don't take me seriously here, I have no idea what I'm talking about ;) It's just what I feel is the best.
I did some more tweaks on the font, so tomorrow I'll try quickly port the code (shouldn't be too hard) to lwgl and create the font in 3D and.
Status: -1(0) days left until Inspire08 Content, sync
So, yeah... unfortunately I didn't make it in the end. Well, as 50% of the prods that sceners work on anyway. However, the good thing is that yesterday night I started to have something going on which was very interesting visually and could develop very well. I don't think I'll put more WIP versions available now until I finish it, it has nothing to do with what I showed before and if I showed it it would spoil some effects :P But if you really want to see how it is going, let me know and I'll send you the .zip
Anyway... I'll keep working on it daily and keep logging it until I finish, it doesn't go at all with D/// topic, which is a shame, I don't know if I should change the name/purpose of the demo at this point. Maybe I should and do the next one, for Euskal (which btw, I got the tickets already :D) with the appropriate topic and leave this one as the experimental/test one. Yeah, that makes sense.
Anyway, yesterday night I implemented some Triangle/Vertex/Vect3D classes to the "engine", and today I managed to do very lightweight Tweener-like library/wrapper. It uses Robert Penner Tween equations, which, if you have used some before, you can't live without anymore. This is how the implementation looks like:
As I seem to be a bit stuck on how to evolve the effect on the demo (although I have 3/4 of the demo with content already), I guess it's a good time to start thinking about the font. I haven't had a chance to see how to load images yet, but I think I won't do that in the end for this one. So, I will be doing the definition of the font with lines. First I'm designing the font with inkscape:
Doing that was about 5min job. I'll spend a bit of time tweaking the font now tho and then I'll go character by character reproducing it with GL_LINES in a nice class :) While doing the font I tested it on top of a screenshot of the demo, and it more or less fits by now. Man it's starting to look like a global war game or something :D
Well.. tomorrow more.
PS: Some of the prods released at Inspire are already on pouet! Check them out!
Status: 0(1) days left until Inspire08 Executable demo
Well, after sleeping about 10 hours in 3 days, I better sleep a bit more today as I think tomorrow (friday) will be a kind of party coding day/night (sponsored by red bull). Now that I think about it... it may be the first time I actually do coding when doing partycoding :P
The demo system now works everywhere: Windows / MacOS / Linux...
Status: 0(1) days left until Inspire08 Executable demo
I guess the organisers are expecting executable demos instead of a link on a browser. This is something I had no idea of how to do. But while checking Ne-He's Outline font tutorial, this time the JoGL example had a .bat with a command line that execute the thing on a window. This may sound totally normal to you, but it was exciting to me O:) So I quickly analysed it and extracted the logic and managed to make my demo.jar run directly on Windows!
After tweaking a bit the folders so it looked a bit nicer (I put all the libs (even linux/mac universal inside a /libs folder) the command looks like this:
... I'll do the launchers for Mac/Linux later on. uhm... Windows/Mac/Linux/Online, I like how that sounds :P And with all the libraries there ready to run on all the OS the filesize is 5Mb zipped (including the 4Mb OGG), sounds good to me too.
Here we go with some effects... dots and HypnoRays. The demo is not supposed to look like this btw, I'm just adding effects on top of each other by now.
Pasarte medio año escribiendo comentarios fake tan estupidos como estos para animar tu concurso, no tiene precio ;)
Y quiero pensar que son fake y que la gente no es asi en realidad...
"ESTOY CONTENTA CON ESTE CONCURSO,Y ESPERO GANARLO,PORQUE ES UNA MARCA MUY BUENA…"
"wei peña komo va el freskito??
a ver os deso muxa suerte a todo el munso xo necesito ese caxarrito jajaja
weno bss y suerte"
"ESTO SEGURO QUE NO VOY A GANAR, EL PRODUCTO ES MY NOBEDOSO MUY BUENO PORQUE ES APPLE Y ES LA TECNOLOGIA PUESTO EN TUS MANOSY PENSAR QUE LAS PRIMERAS COMPUTADORAS ERRA COMO UNA HABITACIO DE GRANDES Y AHORA LAS PODES YEBAR EN EL BOLSILLO, QUIEN LO UVIERA DICHO. ¡LO QUE ES LA CIENCIA!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
"Bueno la musica no es lo mio pero mi hijo no puede vivir sin ella y segun el como el ipod nada de nada, asi que aqui me e apuntado para darle la sorpresa si lo gano, un saludo a todos y suerte."
"Hola a tod@s. Ante todo agradecer a los administradores de esta web el iPod que me ha tocado. Primera semana y gano el premio, mejor imposible. Animaros a tod@s a seguir participando, porque aunque todavia seamos pocos, podemos hacer de esta web, una página importante para tomar decisiones en cuanto a la adquisición de productos. Como profesional de la informática, me comprometo a seguir colaborando semanalmente en todo lo que pueda, y me ofrezco para ayudaros en lo que necesiteis. No se si puedo hacerlo, pero dejo por aqui mi msn para cualquier duda o consulta. obi_medina (arroba) hotmail (punto) com.
Un saludo!!!"
Status: 2(3) days left until Inspire08 Timeline, ColorFades, Flashes!!
Well, if you re-checked my previous log you know that I found a quick way to put together the whole demo. There is still hope! :D
I did a quick test of having 100 effects checking if they had to be rendered or not per frame and the performance was really good, like 60fps. So, as I don't think I'll get 100 effects on the timeline I guess it's good enough to use this way for this prod. God bless Eclipse and it's refactoring/rename tool, because I've renamed the SceneManager class a couple of times... It's now called Timeline and it looks like this:
import javax.media.opengl.GL;
import java.util.ArrayList;
import effects.*;
public class Timeline
{
private ArrayList effects;
public Timeline(GL gl)
{
effects = new ArrayList();
effects.add( new EffectRandomPolys(gl, 0, 27700) );
effects.add( new EffectColourFade(gl, 0, 10000, 1.0f, 0.0f, new float[] {0.0f,0.0f,0.0f}) );
effects.add( new EffectFlash(gl, 14450, 2000, 0.5f, 0.0f, new float[] {0.0f,0.0f,1.0f}) );
effects.add( new EffectRandomPolys(gl, 27700, 30000) );
effects.add( new EffectFlash(gl, 27700, 2000, 1.0f, 0.0f, new float[] {1.0f,1.0f,1.0f}) );
effects.add( new DebugInfo(gl, 0, 0) );
effects.add( new DebugLogger(gl, 0, 0) );
}
public void init()
{
for (int i = 0; i < effects.size(); i++)
((Effect)effects.get(i)).init();
}
public void render()
{
for (int i = 0; i < effects.size(); i++)
((Effect)effects.get(i)).render();
}
}
Yep! I have ColourFades and also Flashes :D (The diference is that one is on additive blending ant the other isn't).
Not much there yet, but it's a base. Now, it's really about time to do more effects, learn how to load/display images and find out how to jump to a middle part in the tune.