User avatar
spsn
Posts: 72
Joined: Wed Nov 07, 2012 6:33 pm

Re: Not Minecraft, but Blocky

Wed Nov 14, 2012 7:34 pm

In case you still get permission errors, it is possible that the start scripts have lost their executable flag due to the extract being done from the PC side. In that case, add them back with these commands, run from within the "blocky" directory:

Code: Select all

chmod 755 blocky
chmod 755 blocky-jamvm
Then run the scripts to start Blocky.

User avatar
spsn
Posts: 72
Joined: Wed Nov 07, 2012 6:33 pm

Re: Not Minecraft, but Blocky

Wed Nov 14, 2012 8:56 pm

If you are trying to download from the github repository with a browser running on the RasPi then you may find that Midori does not download the files correctly. I have just tested with Netsurf, the files get downloaded intact and the contents can be extracted without problems. So you may use Netsurf as an alternative if you wish.

User avatar
jackjt8
Posts: 31
Joined: Wed Oct 17, 2012 5:16 pm

Re: Not Minecraft, but Blocky

Wed Nov 14, 2012 8:57 pm

It won't let me extract the file...
cd /home/pi tar -xzvf blocky-run-pi-armhf.tgz

doesn't work.... I've even tried different commands but nothing. (Yes, blocky-...hf.tgz is in /home/pi)
Beep Boop

User avatar
spsn
Posts: 72
Joined: Wed Nov 07, 2012 6:33 pm

Re: Not Minecraft, but Blocky

Wed Nov 14, 2012 9:00 pm

What is the error you are getting please?

User avatar
raspberrypiguy1
Posts: 379
Joined: Sun Sep 02, 2012 7:01 pm

Re: Not Minecraft, but Blocky

Wed Nov 14, 2012 9:02 pm

YEAHHHH...

It works my friends... IT WORKS!

I am so so so so impressed... The work you guys have done is amazing and I am going to make a tutorial straight away! Is this Ok?

Hope you keep updating Blocky because there is still quite a lot of stuff needed in order for the game to run smoothly and stop me seeing through blocks!

The Raspberry Pi Guy

P.S: I would pay for this game!
Matt, The Raspberry Pi Guy YouTube channel, author of Learn Robotics with Raspberry Pi, available now: http://mybook.to/raspirobots, Computer Science & Electronics Undergraduate at The University of Edinburgh

User avatar
spsn
Posts: 72
Joined: Wed Nov 07, 2012 6:33 pm

Re: Not Minecraft, but Blocky

Wed Nov 14, 2012 9:07 pm

I am glad you got it going. We try to work on Blocky a bit each day. Sometimes research, sometimes a bit of coding, and of course lots of playing around and trying things out.

The collision detection is not quite done yet as you have discovered. The player is only a single point currently, so can get close enough to blocks to see through them. When we replace that with a sliding bounding box it will work as expected.

User avatar
raspberrypiguy1
Posts: 379
Joined: Sun Sep 02, 2012 7:01 pm

Re: Not Minecraft, but Blocky

Wed Nov 14, 2012 9:15 pm

Anything I am missing?

What are the controls? Apart from the wasd keys and mouse buttons... Can I place down different blocks? What happens when I exit the game? Is the world saved?

Sorry, If I seem a bit eager considering this project is very much in its early stages!

The Raspberry Pi Guy
Matt, The Raspberry Pi Guy YouTube channel, author of Learn Robotics with Raspberry Pi, available now: http://mybook.to/raspirobots, Computer Science & Electronics Undergraduate at The University of Edinburgh

User avatar
ChrisSwan
Posts: 26
Joined: Thu Jun 07, 2012 3:01 pm

Re: Not Minecraft, but Blocky

Wed Nov 14, 2012 9:22 pm

Hi, just throwing in a couple of comments:

1, I also had problems with the archive files. Downloading them directly from the github root path gave me corrupted archives when I tried to extract (on Windows or Pi), but if I downloaded the blocky-master.zip then I could get the tar balls out of it and they extracted just fine. Not sure what that's about...

2, Anyway, it's running very well now and looking great! Huge congrats on such a fine job and for sharing it!

Right, I think I'll have to see if I can get it running on Windows now so that my 9 year old can have a tinker... Thanks again! :-)

User avatar
raspberrypiguy1
Posts: 379
Joined: Sun Sep 02, 2012 7:01 pm

Re: Not Minecraft, but Blocky

Wed Nov 14, 2012 9:23 pm

In the pictures you show nighttime and also a house made out of wood... How do you get these features?

Thanks

The Raspberry Pi Guy
Matt, The Raspberry Pi Guy YouTube channel, author of Learn Robotics with Raspberry Pi, available now: http://mybook.to/raspirobots, Computer Science & Electronics Undergraduate at The University of Edinburgh

User avatar
spsn
Posts: 72
Joined: Wed Nov 07, 2012 6:33 pm

Re: Not Minecraft, but Blocky

Wed Nov 14, 2012 10:54 pm

Yes, there are a number of blocks you can place, including the wood blocks I used to construct the little hut that features in one of the screen shots. We have only done a few common blocks so that we can play around. In the bottom left corner of the screen is the block selector, keys "1" and "2" let you cycle through them.

It is not difficult to add new blocks to the code. Have a look at my previous post titled

Code: Select all

Things to do #7: add a new kind of block
You can grab the -dev- archive from the github repository and add the blocks you would like, if you don't want to wait for us to add them in later.

There is no facility yet to save the world. I hope to have something simple in a few days just to save and load the current world so changes do not get lost.

In my previous post

Code: Select all

Things to do #3: set the (mood of the) environment
I gave some information of switching between day time, night time and a gloomy, rainy mood. Those are the 3 moods we have played with to see what it looks like. The only way to do this currently is by changing the code. Maybe I can add a simple toggle key just to make it easier to play with? We have not figured out how to do menus yet.

My son just suggested using keys 3, 4, 5 for the different moods, so we will include that in the next update.

User avatar
spsn
Posts: 72
Joined: Wed Nov 07, 2012 6:33 pm

Re: Not Minecraft, but Blocky

Wed Nov 14, 2012 11:01 pm

At least one of the forum members has successfully installed the dev version of Blocky for PC in Eclipse on Windows so they can edit and run Blocky on Windows.

Here is the github repository again:

Code: Select all

https://github.com/spsn/blocky-pc
Just get the .zip of the repository, extract into a folder and import the 3 projects into Eclipse. If you have current drivers for at least OpenGL 2.0, Blocky will run right away. Just find and run the Blocky.java file from in Eclipse.

aguirrech
Posts: 22
Joined: Sun Sep 02, 2012 11:51 am

Re: Not Minecraft, but Blocky

Wed Nov 14, 2012 11:27 pm

The second one, installed and running succesfully blocky user version. :D

Awesome! Great work!!

emcsquirreled
Posts: 90
Joined: Sat Aug 18, 2012 1:26 am
Location: Portland, OR USA
Contact: Website

Re: Not Minecraft, but Blocky

Thu Nov 15, 2012 2:02 am

The install went perfectly. I pulled down the openjdk package and the jamvm package, pulled the armhf tarball from Github (I am on Raspbian), and extracted all the files. I then launch the game with either ./blocky or ./blocky-jamvm, and the game loads.

This is where the issue is. As soon as I spawn in the world, I fall towards the ground, seeing some trees along the way (and the world looks beautiful!). As soon as my guy hits the ground, however, my Pi immediately reboots. What am I missing?

Good work so far, and hopefully I will be able to try it a little more fully soon!
Linux -- The operating system with a CLUE (Command Line User Environment)
--
FTC Team 4508
E=MC Squirreled
emcsquirreled.github.com

User avatar
jackjt8
Posts: 31
Joined: Wed Oct 17, 2012 5:16 pm

Re: Not Minecraft, but Blocky

Thu Nov 15, 2012 8:00 am

spsn wrote:What is the error you are getting please?
I'm not even getting an error. It just isn't doing anything once I enter the commands.
I've followed the install steps in getting Java, I downloaded it for debian. (Standard, not dev) put it in the stated directory.
And it just doesn't do anything once I enter the command to extract in.
Beep Boop

User avatar
malakai
Posts: 1382
Joined: Sat Sep 15, 2012 10:35 am
Contact: Website

Re: Not Minecraft, but Blocky

Thu Nov 15, 2012 8:03 am

tar -xzvf blocky-run-pi-armhf.tgz

that should return something either an extraction error or file not found.
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
jackjt8
Posts: 31
Joined: Wed Oct 17, 2012 5:16 pm

Re: Not Minecraft, but Blocky

Thu Nov 15, 2012 4:09 pm

malakai wrote:tar -xzvf blocky-run-pi-armhf.tgz

that should return something either an extraction error or file not found.
Ok, I used it and this time I got an extraction error.

Code: Select all

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
I have tried using- cd /home/pi then the code, but not luck.
Beep Boop

User avatar
malakai
Posts: 1382
Joined: Sat Sep 15, 2012 10:35 am
Contact: Website

Re: Not Minecraft, but Blocky

Thu Nov 15, 2012 4:15 pm

I have the same issue possibly try

rm blocky-run-pi-armhf.tgz
to delete the file you have then

wget https://github.com/spsn/blocky/archive/master.zip
unzip master.zip

Then try

tar -xzvf blocky-run-pi-armhf.tgz

This should work on all the tgz files

I have an article on how to get started using the windows files on my site it's the current article if anyone is interested on playing in Windows
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
malakai
Posts: 1382
Joined: Sat Sep 15, 2012 10:35 am
Contact: Website

Re: Not Minecraft, but Blocky

Thu Nov 15, 2012 5:17 pm

Not sure why tar isn't working on these but this is what I did and got it working an example is the bocky-run-pi-armhf.tgz but should work if you modify on the other tgz files as well.

Code: Select all

wget https://github.com/spsn/blocky/archive/master.zip
unzip master.zip
gzip -d blocky-run-pi-armhf.tgz
cd ge.demo/
cd src
cd ge
cd demo
cd game
chmod +x Blocky.java
sudo ./Blocky.java
When I run it I get:

./Blocky.java: 1: ./Blocky.java: package: not found
./Blocky.java: 2: ./Blocky.java: import: not found

Not sure what is happening there either?

Testing this worked

tar xvfz blocky-dev-pi-armhf.tgz
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
spsn
Posts: 72
Joined: Wed Nov 07, 2012 6:33 pm

Re: Not Minecraft, but Blocky

Thu Nov 15, 2012 5:53 pm

When you download the master.zip from the repository and unzip it, you get everything. The 4 pre-made -run- and -dev- setups and also the raw sourse code folders. The raw source code folders are there for those who wish to set up their own development environment in their own way instead of using the pre-made setups. This is what the ge.framework and ge.demo folders are for.

When you extract the contents of one of the pre-made -run- setups, it creates a "blocky" directory for you with everything set up inside, including execute permissions on the scripts. All you need to do is:

Code: Select all

cd blocky
./blocky
Or if you have JamVM:

Code: Select all

cd blocky
./blocky-jamvm
Remember to have X running and 128MB allocated to the GPU.

texy
Forum Moderator
Forum Moderator
Posts: 5161
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Not Minecraft, but Blocky

Thu Nov 15, 2012 6:36 pm

spsn wrote:In case you still get permission errors, it is possible that the start scripts have lost their executable flag due to the extract being done from the PC side. In that case, add them back with these commands, run from within the "blocky" directory:

Code: Select all

chmod 755 blocky
chmod 755 blocky-jamvm
Then run the scripts to start Blocky.
This is what fixed my problem - many thanks ;)

Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

texy
Forum Moderator
Forum Moderator
Posts: 5161
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: Not Minecraft, but Blocky

Thu Nov 15, 2012 9:41 pm

Incidentally, the box bottom left is only just visible on my tv.
Getting the load/save world feature us important if course. No one is going to spend too much time designing if it can't GE saved afterwards ;-)

Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

User avatar
jackjt8
Posts: 31
Joined: Wed Oct 17, 2012 5:16 pm

Re: Not Minecraft, but Blocky

Thu Nov 15, 2012 10:21 pm

Hmmm... I still can't get it to do anything with .tgz ...I tried the dev version as well and no luck... Not even an error -_- I might have to get the source and run it that way...
malakai wrote:Not sure why tar isn't working on these but this is what I did and got it working an example is the bocky-run-pi-armhf.tgz but should work if you modify on the other tgz files as well.

Code: Select all

wget https://github.com/spsn/blocky/archive/master.zip
unzip master.zip
gzip -d blocky-run-pi-armhf.tgz
cd ge.demo/
cd src
cd ge
cd demo
cd game
chmod +x Blocky.java
sudo ./Blocky.java
When I run it I get:

./Blocky.java: 1: ./Blocky.java: package: not found
./Blocky.java: 2: ./Blocky.java: import: not found

Not sure what is happening there either?

Testing this worked

tar xvfz blocky-dev-pi-armhf.tgz
Beep Boop

User avatar
spsn
Posts: 72
Joined: Wed Nov 07, 2012 6:33 pm

Re: Not Minecraft, but Blocky

Wed Nov 21, 2012 12:57 am

A little update. Blocky now saves all the changes you make to the world while you build and dig around. The saving is quite light and is done in a background thread so that it does not impact the player actions. By default Blocky writes the world data to a file called "world.blocky", but you may provide Blocky with a different file name on the command line, like this:

Code: Select all

./blocky-jamvm world=my.world1
This also means that you may have multiple files with world data and can choose which one to play in.

If you do not like the default textures that Blocky uses, then you may tell Blocky to use a different texture file, like this:

Code: Select all

./blocky-jamvm texture=res/myterrain.png
The mood, or feel, of the environment may be set to "day", "night" or "gloomy" (like you might see on a rainy, foggy day), like this:

Code: Select all

./blocky-jamvm mood=gloomy
The default terrain generator is called "hills", but you may also use "ponds" to get more rounded hills and more ponds, or "flat" if you prefer a totally flat world, like a grass land for instance, like this:

Code: Select all

./blocky-jamvm terrain=flat
The "terrain" command line parameter only has an effect when a new world is generated, i.e. when you use a world data file that does not exist yet.

To get a world without any vegetation, add ",noveg" to the end of the "terrain" value, like this:

Code: Select all

./blocky-jamvm terrain=flat,noveg
Blocky now provides 4 different behaviors that may be chosen from for the right mouse button click: "place" to get the traditional block placement behavior, "move" to have the placed blocks scuttle around the world like little critters, "fly" to have the placed blocks fly around the world, and "play" which I will get to in just a bit.

When "move" is selected with:

Code: Select all

./blocky-jamvm block=move
You get something like this when placing blocks (here we used some pumpkin blocks):

Image

And when "fly" is selected with:

Code: Select all

./blocky-jamvm block=fly
You can get something like this:

Image

Any of the command line parameters may of course be used together to get a combined effect.

Now, when the "play" behavior is selected with:

Code: Select all

./blocky-jamvm block=play
Then the following other command line parameters become active that define the movement of placed blocks:

Code: Select all

xmov defines the speed of linear movement along the x axis (left/right), normal value = 0.01
ymov defines the speed of linear movement along the y axis (up/down), normal value = 0.01
zmov defines the speed of linear movement along the z axis (forward/backward), normal value = 0.01
xrot defines the speed of rotation around the x axis, normal value = 1.0
yrot defines the speed of rotation around the y axis, normal value = 1.0
zrot defines the speed of rotation around the z axis, normal value = 1.0
xsin defines the speed of traversal through a sine wave along the x axis, normal value = 1.0
ysin defines the speed of traversal through a sine wave along the y axis, normal value = 1.0
zsin defines the speed of traversal through a sine wave along the z axis, normal value = 1.0
xamp defines the amplitude (size) of the sine wave along the x axis, normal value = 0.5
yamp defines the amplitude (size) of the sine wave along the y axis, normal value = 0.5
zamp defines the amplitude (size) of the sine wave along the z axis, normal value = 0.5
Bigger values cause faster movement, smaller values cause slower movement. And combining the parameters together can cause all kinds of fun effects.

For instance, using the following:

Code: Select all

./blocky-jamvm block=play xmov=0.01 xrot=2.0 ysin=1.0 yamp=0.5 zsin=1.0 zamp=1.0
Then selecting the torch block and clicking rapidly many times while pointing towards the ground, makes this twirly worm critter appear:

Image

Using really big values, like kids are bound to try, can make the blocks spin at crazy speeds, or make them shoot out into the distance like they have been shot from a cannot.

We laughed so much while playing with the "play" values, our faces hurt.

As you may have guessed from all this moving block stuff, we have started exploring the ground work for actors (animals, mobs, etc) and multiplayer.

Here is the first actor we are going to try to get going. The "Purploid" in rest position (the wooden box is just a platform for him to stand on):

Image

And with leg fully extended when jumping:

Image

My son found the modeling tool and designed the "Purploid" all by himself. I don't know about you, but every day I discover more things that the kids can do that we can't do. Amazing.

User avatar
spsn
Posts: 72
Joined: Wed Nov 07, 2012 6:33 pm

Re: Not Minecraft, but Blocky

Wed Nov 21, 2012 1:00 am

Oh, yes. I have made new -run- and -dev- packages of Blocky for both armel (soft float) and armhf (hard float). They are in the github repository for Blocky if you would like to have a try. :D

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Not Minecraft, but Blocky

Wed Nov 21, 2012 1:32 pm

Could this made into a package ? Just imagine typing

Code: Select all

sudo apt-get install blocky-beta
I must get my Pi runnnnning .... *out*


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

Return to “Gaming”