We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
2 Problems (Read 1100 times)
2 Problems
Dec 26th, 2009, 12:42pm
 
I wrote this engine for a game. It works in Processing, but when I export it, it just displays a grey screen (as applet or native app). When I check the OSX console afterwards, the console app freezes. I thought that it wasn't finding the files, but they were all inside the jar file. Any suggestions?

Also, with the same program, the processor time used is enormous. It gives me like 30% load on all cores of a desktop Core i7 920, and still has framerate issues. I'm using all SVG vector graphics (in 2D), and the Video library for cutscenes and Minim for audio.
Re: 2 Problems
Reply #1 - Dec 26th, 2009, 4:17pm
 
I'd try to add a few progression statements to identify where in your code it's stopping.

javax.swing.JOptionPane.showMessageDialog(null, "I got to this point.")

Then you can reply with a more specific issue.  I'm not sure your providing enough information for anyone to answer it without huge guesses on how your program behaves.  Some files can be loaded from the jar and some can't... for example, I can't load my textures from within the jar.  I have to create a new directory in the exported app and load them from there.  However, PImages work just fine loading from the jar.

As for the load, I would really look to make sure your not running something in the draw that should only be run once.  Minimize what you have to draw each cycle.  For example, doing a loadFont or createFont in your draw cycle will kill your processor.
Re: 2 Problems
Reply #2 - Jan 3rd, 2010, 8:38am
 
On the applet, it crashes while playing the music. The music starts, but the function doesn't end. On the application, it crashes while loading the first cutscene.
Re: 2 Problems
Reply #3 - Jan 3rd, 2010, 11:21am
 
If your using minim, I've found that you need to put a try {} catch {} around the sound trigger for it to work properly.
Page Index Toggle Pages: 1