Not Minecraft, but Blocky


172 posts   Page 5 of 7   1, 2, 3, 4, 5, 6, 7
by dan3008 » Fri Dec 14, 2012 5:03 pm
dan3008 wrote:Having a new error now. :/

Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at org.lwjgl.Sys$1.run(Sys.java:73)
at java.security.AccessController.doPrivileged(Native Method)
at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)
at org.lwjgl.Sys.loadLibrary(Sys.java:95)
at org.lwjgl.Sys.<clinit>(Sys.java:112)
at org.lwjgl.opengl.Display.<clinit>(Display.java:132)
at ge.framework.render.GLES20Renderer.createDisplay(GLES20Renderer.java:126)
at ge.demo.game.Blocky.start(Blocky.java:166)
at ge.demo.game.Blocky.main(Blocky.java:1680)


I have a good idea what it means, but I didnt change anything :/ Why would it stop working suddenly?


Scratch that, I've sorted it. I'd been Cleaning my downloads folder, and accidentally moved the native code files, thats all.
dan3008 wrote:Pays your money, takes your choice
Posts: 911
Joined: Wed Aug 15, 2012 1:05 pm
by Craig4 » Mon Dec 17, 2012 9:19 pm
works through av but hdmi wont let it play it loads till its about to play then crashes iv done everything twice with the same result both run and dev both work on av and same crash on hdmi im using standard wheezy any thoughts
Posts: 1
Joined: Mon Dec 17, 2012 8:43 pm
by dan3008 » Tue Dec 18, 2012 3:41 am
Please tell me you are going to put a stable release of blocky onto the pi shop? Just the playable version, not the dev version. People who want to do dev stuff are probably better with github :)
dan3008 wrote:Pays your money, takes your choice
Posts: 911
Joined: Wed Aug 15, 2012 1:05 pm
by magno23 » Thu Dec 20, 2012 6:37 pm
i'm trying to run this trough vnc server but when i try to start blocky i get this error
Code: Select all
root@raspberrypi:/home/pi# cd blocky
root@raspberrypi:/home/pi/blocky# ./blocky
Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/pi/blocky/lwjgl/native/linux/liblwjgl.so: /home/pi/blocky/lwjgl/native/linux/liblwjgl.so: cannot open shared object file: No such file or directory
   at java.lang.ClassLoader$NativeLibrary.load(Native Method)
   at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1935)
   at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1860)
   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1850)
   at java.lang.Runtime.loadLibrary0(Runtime.java:845)
   at java.lang.System.loadLibrary(System.java:1084)
   at org.lwjgl.Sys$1.run(Sys.java:73)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)
   at org.lwjgl.Sys.loadLibrary(Sys.java:95)
   at org.lwjgl.Sys.<clinit>(Sys.java:112)
   at org.lwjgl.opengl.Display.<clinit>(Display.java:132)
   at ge.framework.render.GLES20Renderer.createDisplay(GLES20Renderer.java:126)
   at ge.demo.game.Blocky.start(Blocky.java:166)
   at ge.demo.game.Blocky.main(Blocky.java:1680)

Posts: 133
Joined: Sun Aug 12, 2012 4:11 pm
Location: Penafiel, Portugal
by CHRIS962253 » Sun Dec 30, 2012 10:59 pm
hi im new to all this codings and every thing iv had my pi for about a week and read this form and wanted to try this game. im pretty sure i followed all the steps for it posted on page 2 i think and when i try runing the game with ./blocky i get this error
Code: Select all
root@raspberrypi:/home/pi/blocky# ./blocky
Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/pi/blocky/lwjgl/native/linux/liblwjgl.so: /home/pi/blocky/lwjgl/native/linux/liblwjgl.so: cannot open shared object file: No such file or directory
   at java.lang.ClassLoader$NativeLibrary.load(Native Method)
   at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1935)
   at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1860)
   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1850)
   at java.lang.Runtime.loadLibrary0(Runtime.java:845)
   at java.lang.System.loadLibrary(System.java:1084)
   at org.lwjgl.Sys$1.run(Sys.java:73)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)
   at org.lwjgl.Sys.loadLibrary(Sys.java:95)
   at org.lwjgl.Sys.<clinit>(Sys.java:112)
   at org.lwjgl.opengl.Display.<clinit>(Display.java:132)
   at ge.framework.render.GLES20Renderer.createDisplay(GLES20Renderer.java:126)
   at ge.demo.game.Blocky.start(Blocky.java:166)
   at ge.demo.game.Blocky.main(Blocky.java:1680)
root@raspberrypi:/home/pi/blocky# ^C
root@raspberrypi:/home/pi/blocky#

i also tryed doing ./blocky-jvrm or some thing like that for the other java version and i get this error
Code: Select all
root@raspberrypi:/home/pi# cd blocky
root@raspberrypi:/home/pi/blocky# ./blocky-jamvm
Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1856)
   at java.lang.Runtime.loadLibrary0(Runtime.java:845)
   at java.lang.System.loadLibrary(System.java:1084)
   at org.lwjgl.Sys$1.run(Sys.java:73)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)
   at org.lwjgl.Sys.loadLibrary(Sys.java:95)
   at org.lwjgl.Sys.<clinit>(Sys.java:112)
   at org.lwjgl.opengl.Display.<clinit>(Display.java:132)
   at ge.framework.render.GLES20Renderer.createDisplay(GLES20Renderer.java:126)
   at ge.demo.game.Blocky.start(Blocky.java:166)
   at ge.demo.game.Blocky.main(Blocky.java:1680)
root@raspberrypi:/home/pi/blocky#

dose any one have any idea of why it wont work and why i get these errors
Posts: 2
Joined: Sun Dec 30, 2012 10:16 pm
by spsn » Mon Dec 31, 2012 11:13 am
Have you started X with the 'startx' command? Blocky needs X to be running. If you have done a 'startx' but not from the boot console, then the DISPLAY environment variable will not have been set.
Code: Select all
export DISPLAY=:0.0
And lastly, if you are using hard float 'Raspbian' then you need the 'armhf' version of Blocky and if you are using soft float 'Wheezy' then you need the 'armel' version of Blocky.
User avatar
Posts: 68
Joined: Wed Nov 07, 2012 6:33 pm
by malakai » Tue Jan 01, 2013 7:10 am
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)
User avatar
Posts: 1383
Joined: Sat Sep 15, 2012 10:35 am
by Raspiberry » Thu Jan 03, 2013 9:39 pm
Awesome! I got it working!
At first, it would crash (on the jamvm version) at Generating Meshes, and wouldn't start at all on the Zero java version.

But, I didn't use a 128 mb spiit :oops:

It's working fine now, although I run it at usually 40-50 fps (60 if I just stare at a direction).
It sometimes drops to 30-40 if I do some intensive stuff (break a few blocks, view a large area).

Is that supposed to happen? I'm using a 900 MHZ overclocked pi, 250 MHZ GPU Core, 450 MHZ RAM.

It's pretty good! Nice work!
If only my school used the Raspberry Pi...
User avatar
Posts: 20
Joined: Sun Dec 16, 2012 9:56 pm
by TinkerMom » Sat Jan 05, 2013 9:04 pm
Can someone help me on specifics with running X and getting the proper java to work? I am having similar problems/errors coming up that people have already mentioned, and I can't tell if it has to do with X or something else. I am fairly new to using the terminal (I've used it on a Mac but only for specific tasks and with a set of instructions). I am pretty clueless about X and have finally kind of figured out what you were talking about when you mentioned it, but now that I have entered the command "startx", it has screwed up my startup and now I can't get on the Pi at all- it goes to the login screen and won't take the default login and password (pi and raspberry). The drop-down is on Default Xsession- does that need to be changed? How can I get this back to booting up and going right to the desktop screen?

Once that part is fixed, I need to know more specifics about EXACTLY what to do- do I open terminal and just type startx, sudo startx, do I need to be in a specific directory (or just /home/pi). Now, once the startx command has been entered, do I stay in that same terminal window- do I need to be using different terminals/consoles? I think I had the right info for getting to the right blocky commands, but it may have been a screwup in doing the X that led to the other issues. I may also have issues with the display I am using because I can't do anything with the settings in config (it can't find any info). All I can do is set the aspect ratio with the display's buttons. I am using a 7" TFT monitor that is composite (I also haven't been able to get any audio at all with the pi yet- not from the board and not through the monitor).

I'm using the newest Pi with wheezy, have changed it to 128, downloaded the icedtea java previously mentioned in another post (also tried the slower one, but want to try this first), first tried the zipped version of blocky but had too many problems with it, so I got the raw tgz from github and thought I was getting somewhere until the X issues.

The kinds of errors I got after typing in ./blocky-jamvm were these (pardon any mistakes, this monitor is so small it's almost impossible to read anything in the terminal):
Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: usr/lib/jvn/java-7-openjdk-armhfl/jre/lib/arm/[???t]/librset.sd[?]
at java.lang... (9 different ones)
at sun.security.action... (2 lines)
at java.security... (1 line)
at java.art[?].toolkit... (2 lines)
at crg.lwjgl[?]... (4 lines)
at ge.fra[?]... (1 line- framework??)
at ge.demo.game.Blocky (2 lines)

The brackets are mine and where I couldn't read what it said. All of this happens within the blocky directory, after typing ./blocky-jamvm

Please help me start off by getting rid of the danged log-in screen! Thanks!
MoonPi over Chattanooga...
Posts: 6
Joined: Sat Jan 05, 2013 8:32 pm
by malakai » Sat Jan 05, 2013 10:57 pm
I would probably start by re flashing your SD Card and begin again it would probably be faster than trying to go back and fix anything that is broken.

If you choose that option it should bring up the raspi-confg
Expand your partition, do not reboot yet
Change memory to 128 (Should be fine at that setting but you choose)
Enable ssh
Choose the option to go straight to desktop again if that is how you want it
If you do reboot run the command sudo raspi-config to get back to it at any time.

Never run sudo startx it could be how things got messed up.

I have tried to make a tutorial to help try and follow this and post any errors but people are telling me it works as is

http://www.raspians.com/knowledgebase/games/blocky/blocky-not-minecraft-for-the-raspberry-pi-setup/
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)
User avatar
Posts: 1383
Joined: Sat Sep 15, 2012 10:35 am
by TinkerMom » Sun Jan 06, 2013 4:08 am
Okay, I have cleaned everything up and flashed the card and started over. I reconfigured everything again, installed icedtea-7-jre-jamvm, and this time I downloaded the raw from github of blocky-run-pi-armhf.tgz

Then I typed:
cd /home/pi
tar -xzvf blocky-run-pi-armhf.tgz

After that I changed the directory (did I not need to do that?), then typed startx. After that, it went back to the desktop and gave me an error window that said "GD Bus Error .org.freedesktop.Policy [??] .Error.Failed: An authentication agent already exists for the given subject" (it's hard to read the screen).

Is this an error with startx? Will a restart fix that? I went back into terminal and typed:
cd blocky
./blocky-jamvm

I get the same kind of error I got before about the Exception at "main" about it being unable to load the library and then the same string of errors after that that I listed before. Should I just use the Zero version instead of the JamVM version? Is that what might be causing this library error? I will go try a restart and will also check out those tutorials for Blocky at Raspians and see if I can't pinpoint the problems.

Any other suggestions?
MoonPi over Chattanooga...
Posts: 6
Joined: Sat Jan 05, 2013 8:32 pm
by malakai » Sun Jan 06, 2013 4:19 am
After that I changed the directory (did I not need to do that?), then typed startx. After that, it went back to the desktop and gave me an error window that said "GD Bus Error .org.freedesktop.Policy [??] .Error.Failed: An authentication agent already exists for the given subject" (it's hard to read the screen).


That is some kind of issue with startx not sure how to fix that.

Changing directory should be fine

when you get to the desktop can you try ./blocky

To run ./blocky-jamvm
You would need JavaVM installed lets get blocky running before you try and edit it :)
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)
User avatar
Posts: 1383
Joined: Sat Sep 15, 2012 10:35 am
by TinkerMom » Sun Jan 06, 2013 5:01 am
Found a solution!

If you boot up so it goes right to the desktop, and you have installed openjdk (not the icedtea version mentioned before), then download the raw file for the "hardfloat" version of Blocky at github (Raspbian wheezy is hardfloat according to the downloads page). Once openjdk is installed and you have done the tar command for the blocky file, just to be safe- go ahead and sudo halt and do a restart.

Now- this time I skipped the whole "startx" thing. Once the Pi started back up and was on the desktop, I opened terminal and all I typed was:

cd blocky
./blocky

Taa dah! It worked!

So for newbies like me out there who need some basics, if you can get the Pi set up to be configured on the config screen and so it will boot right to the desktop, try skipping the whole "startx" thing that you may read about here. First install the openjdk by opening terminal from the desktop, then type:
sudo apt-get install openjdk-7-jre

(I hope I typed that right, I don't have it in front of me- don't use the icedtea one until you know this one works). I believe that this will run for a moment and then you will get a question line that asks "Do you want to continue? y/n?" so type y and hit return/enter and let it finish.

After that's done, get online with the Pi (I'd recommend not using Midori for this), and go to github.com/spsn/blocky

You want to download the blocky-run-pi-armhf.tgz file, so click on that and then click on the "Raw" option on the next screen. It will tell you when it's done downloading which shouldn't take very long. Then you can close the browser.

After that download is finished, open terminal again and type:
cd /home/pi
tar -xzvf blocky-run-pi-armhf.tgz

That's two separate lines- cd /home/pi to change the directory over to pi, then the next line to get blocky opened and where it needs to be.

To play it safe, you might want to restart (sudo halt, etc.), but you might also want to just check to see if it will work just by typing:
cd blocky
./blocky

and see what happens!

So, does that mean there is a conflict in using the startx command when the desktop is utilized? And is there a problem with the library (and other things?) in the JamVM (icedtea) install?

Phew, a few speedbumps, but it's working! Now it's time to tinker!
MoonPi over Chattanooga...
Posts: 6
Joined: Sat Jan 05, 2013 8:32 pm
by malakai » Sun Jan 06, 2013 5:52 am
So, does that mean there is a conflict in using the startx command when the desktop is utilized? And is there a problem with the library (and other things?) in the JamVM (icedtea) install?


Sorry I missed that startx is how to get to the desktop if you don't have it set to start automatically

and Java is a language i barely know at all. This is one project I was hoping to help get some experience with. I am not sure if there is an error or problem with it. In theory now you should be able to run the javavm version now but I haven't done a whole lot with this hoping my sons will help pick up some of my slack.

This site has some info on Java for the Pi there are so many variations it is hard for me to understand them all http://www.savagehomeautomation.com/pi-slices/
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)
User avatar
Posts: 1383
Joined: Sat Sep 15, 2012 10:35 am
by jackjt8 » Fri Jan 25, 2013 11:06 pm
Still having problems "tar -xzvf blocky-run-pi-armhf.tgz" just doesn't work, and I mean it just doesn't do anything with it. No errors or anything.
Posts: 22
Joined: Wed Oct 17, 2012 5:16 pm
by krishnak » Mon Feb 04, 2013 2:33 am
malakai wrote:Ok so I got home the issue is ssh and x it runs looks fantastic.

Are there more commands? This could easily be the answer to everyone who wants a minecraft if it gets more development.


Malakai - I am running ssh to Pi and when I try to run the blocky - I get the same bluescreen as you mentioned.

Did you manage to get it working over ssh? or do you need a monitor to be connected
Posts: 17
Joined: Mon Feb 04, 2013 2:28 am
by ghans » Mon Feb 04, 2013 8:00 am
AFAIK there is no way to remote display anything drawn via
OpenMAX or OpenGL ES (which blocky uses).


ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
Posts: 4611
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany
by krishnak » Tue Feb 05, 2013 2:47 pm
I connected a monitor to the PI and started blocky. I get the splash screen saying BLOCKY and it tries to load/configure meshes etc.

But it gets stuck there for ever. I have tried several times, the result is the same.

The status bar at the middle of the screen flickers at the end when it gets stuck.

I downloaded the file from Github. My PI is having only 256MB memory.

blocky-run-pi-armhf.tar.gz

Any thoughts
Posts: 17
Joined: Mon Feb 04, 2013 2:28 am
by spsn » Tue Feb 05, 2013 6:07 pm
The flickering is due to the GPU running out of memory. Please allocate at least 128MB of memory to the GPU.
User avatar
Posts: 68
Joined: Wed Nov 07, 2012 6:33 pm
by krishnak » Wed Feb 06, 2013 5:10 pm
Just to confirm - after updating the memory allocation for GPU in /boot/config.txt gpu_mem=128

The program starts up and works as intended.
Posts: 17
Joined: Mon Feb 04, 2013 2:28 am
by Jens1970 » Wed Feb 06, 2013 5:31 pm
May I asked where you learned this? The coding? I am really interested in coding, but haven't got any time to dive into it or to find any good tutorial.
Posts: 1
Joined: Wed Feb 06, 2013 5:25 pm
by krishnak » Thu Feb 07, 2013 12:32 pm
spsn wrote:The GPU needs 128MB ram and you need to start X first for Blocky to run. I have not yet been able to make a version of LWJGL that runs without X.



Can you give me a pointer as what is needed to get LWJGL compile with out X? I can give it a try.

Jogamp code can run with out X on the Pi
Posts: 17
Joined: Mon Feb 04, 2013 2:28 am
by masvea » Fri Feb 08, 2013 9:31 am
Am a beginner...but I successfully ran blocky-run-pi-armhf.tgz based on your excellent instructions.

However, I noticed it's 3 months old and the ge.x folders have awesome comments like "Multi-Player Support".

Is that the "dev" branch that I need to compile? How often do you regenerate "blocky-run-pi-armhf.tgz"? If I compile the ge.x branch, do I get awesome Multi-Player support etc?

Thanks.
Posts: 2
Joined: Fri Feb 08, 2013 9:26 am
by spsn » Fri Feb 08, 2013 3:42 pm
@masvea Well spotted. I was busy preparing an update.
User avatar
Posts: 68
Joined: Wed Nov 07, 2012 6:33 pm
by spsn » Fri Feb 08, 2013 4:44 pm
My son thought it would be more fun to have some multi-player elements than to have a Purploid jumping around, so we have been concentrating on getting s start with multi-player.

In multi-player mode one of the Blocky instances acts as the host and runs the server, while other Blocky instances are the clients.

To start Blocky as the host, use the following:
Code: Select all
./blocky-jamvm server=local
The server listens on port 50000.

To start Blocky as a client, use the following (just replace the IP address with the one from your server):
Code: Select all
./blocky-jamvm server=10.0.0.17
Here are some screen shots.
Image Image Image
The server is rather light weight. It only tracks (and saves) the world data and acts as a message hub for player position messages and block change messages between all the players.

With the jamvm JVM the host can support up to 4 players comfortably (i.e. the host itself plus 3 other players). The Oracle JVM (JDK7 or JDK8 EA) gives a nice boost and the number of players can be upped to 7 or 8.

The RasPi version of Blocky and the PC version of Blocky are compatible, so players on RasPi and PC can player together in the same multi-player game. When a PC acts as the host then Blocky can support many more players, depending on how powerful the PC is of course (we had 32 players on a dual core Intel G840 one time as a test). Just remember that the default world size for the PC version is larger than the RasPi can handle (not enough memory), so you will have to explicitly set a world size of 128 and use a different world file when starting the host on the PC.

The default player skin is in the file "res/BlockyGuyPic.png". This is the first player skin my son designed for us. We tried out a few others too, you can find them in the "res" folder.

Part of the fun is to design your own skin for the players. To use a different skin for the players, use the following for example:
Code: Select all
./blocky-jamvm server=local skin=res/BlockyAlien.png
./blocky-jamvm server=10.0.0.17 skin=res/BlockyAlien.png

The player characters are not animated yet, except for the body that rotates and the head that can swivel up and down. We still have to figure out the whole skeletal animation thing. But this was already enough for us to have fun with. We played hide-and-seek and tag for many hours and laughed so much our faces hurt (again), especially when once player tries to box the other in by building blocks around him, and the other player keeps on finding creative ways to escape. I got boxed in a lot. My son is much better at this than I am. :lol:

We have added floating platforms blocks, poles, a variety of wedge blocks and some colored glass to play with. Here are some screen shots:
Image Image Image Image Image Image Image Image Image Image Image

To try our hand at writing code that affects changes to the world other than those made by the players themselves, we added 2 block types that spread and grow through the world by themselves once placed. Place a block type 49 (an infection core) (use the block type indicator above the material selector) and it will start infecting other block around it, like a virus. Place a block type 51 (a mutant plant seed) and it will grow tall mutant "plants" that almost look like giant bean stalks. My son designed the textures for these too.

Lastly, a few display setting command line parameters to fiddle with. To set the field of view (in degrees):
Code: Select all
fov=60

To set the view/render distance (in blocks):
Code: Select all
viewdist=64

To turn off vsync and see how many FPS Blocky can actually do (especially with overclock):
Code: Select all
vsync=no

GitHub has been updated with new armhf versions of the blocky-dev-pi and blocky-run-pi archives:
https://github.com/spsn/blocky/blob/master/blocky-dev-pi-armhf.tgz
https://github.com/spsn/blocky/blob/master/blocky-run-pi-armhf.tgz

If you need armel versions of Blocky, let me know.
User avatar
Posts: 68
Joined: Wed Nov 07, 2012 6:33 pm