spaceinvaders in xCode 3

Started by lobsterman, May 15, 2008, 11:06:24

Previous topic - Next topic

lobsterman

yo,

using the setup detailed in the xCode 3, mac installation thread i began digging into spaceinvaders

my class extends org.lwjgl.examples.spaceinvaders.Game and simply calls it with super(false);

a black window opens but it then stops executing with

"Xcode could not locate source file: org/lwjgl/examples/spaceinvaders/SoundManager.java (line: 157)"

suggestions anyone? i will post a summary on everything i figure out ...

thanks,

lobsterman

yo,

an update on not getting a bare-bones SpaceInvaders project to work in xCode Apple MacOSX 10.5.2 ...

my install is ok, running SpaceInvaders from the terminal works like a peach:

java -cp .:res:jar/lwjgl.jar:jar/lwjgl_test.jar:jar/lwjgl_util.jar:jar/jinput.jar: -Djava.library.path=native/macosx org.lwjgl.examples.spaceinvaders.Game -fullscreen

i am using

java version "1.5.0_13"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05-237)
Java HotSpot(TM) Client VM (build 1.5.0_13-119, mixed mode, sharing)

i start a Web Start Template in xCode, link in the lwjgl jars, place the macosx libs into the Java/Extensions folder

in the build.xml file i change source and target to 1.5

    <target name="compile" depends="init" description="Compile code">
        <javac srcdir="${src}" destdir="${bin}"
            source="1.5" target="1.5"
            includeAntRuntime="no"
            classpathref="lib.path"
            debug="${compile.debug}">
        </javac>
    </target>

My class does nothing other than call up and initialize the subclass spaceinvaders.Game

//
//  SpaceInvaders.java
//  SpaceInvaders
//
//  Created by WebProgramming on 5/18/08.
//  Copyright (c) 2008, Robert Huber. All rights reserved.
//
//  A simple Web Start application
//
import javax.jnlp.*;
import org.lwjgl.examples.spaceinvaders.Game;
public class SpaceInvaders extends Game {
   public SpaceInvaders(boolean fullscreen) { super(fullscreen); }
   public static void main(String args[]) { new SpaceInvaders(false); }
}

When I run this app, Web Start hangs with the console message:

5/20/08 11:01:57 AM [0x0-0x343343].com.apple.JavaWebStart[7205] SystemFlippers: didn't consume all data for long ID 0 (pBase = 0x100104d30, p = 0x100104d34, pEnd = 0x100104d38)

does anybody see what i am doing wrong?

thanks, ciao,

lobsterman

i guess there isn't much help available in this forum :(.

in any case i have placed the xCode project for the spaceinvaders demo as far as i got in 2.4 compatible format on my server if anybody else wants to pick it up from where i got stuck ... it can be found here http://caspar.bgsu.edu/%7esoftware/Java/Projects_xCode.html

i am moving onto jMonkeyEngine ...

Matzon

I think we have very few xcode users. Most use eclipse or netbeans - or idea

lobsterman

hi,

that was exactly the point why i was willing to develop, contribute, and make available a working xCode project - the spaceinvaders was an obvious choice. most mac programmers are familiar with xCode over any other ide and if they develop an interest to move towards java and openGL graphics then having at least a basic, bare-bones project available to start with would be of great help - heck, i would have been tickled pink to have something like that to get me started. sure a switch to eclipse is the likely long-term outcome if one sticks with this, but a chance to figure out what the library is about without having to spend a lot of setting up and learning a new ide would be a boon. i think the bits that are still missing for compiling and running spaceinvaders in xCode are rather trivial but i cant get much further without your help. i have struggled for a week with a few hits and a lot of misses and i concluded that my time will be better spent elsewhere ...

lobsterman

i have uploaded two bare-bones spaceinvaders projects for xCode to my server at <http://caspar.bgsu.edu/~software/Java/Projects_xCode/> in the hope that folks with an interest to learn more about the lwjgl don't have to struggle quite as hard to get some basic things working. i never managed to get much out of eclipse which is too different from my normal tool xCode. so, i have made and uploaded version 2.4 compatible xCode 3 projects for both a normal java application and a webstart application of spaceinvaders. It has a few hiccups in the parts that i don't get, but it is a start ...

i do not yet understand how a webstart application knows what native libs to run. to run it on my mac i can place the native mac libs into my Library/Java/Extensions folder, or i can use the VM argument -Djava.library.path=native/macosx, but how does the downloaded webstart app know what native libs to run. any comments, improvements, or corrections are greatly appreciated.