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.

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.

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

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.tgzhttps://github.com/spsn/blocky/blob/master/blocky-run-pi-armhf.tgzIf you need armel versions of Blocky, let me know.