Balders Unity Playtime

flash · 13780

Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
on: November 20, 2013, 09:54:23 pm
Well, I had a little play with Unity3d (using C# rather than Java)

Bit of an alien learning curve, more so for a 2d game, but still pretty sweet. I just imported a load of assets from Balders (my psion game) and created a little level. Not much there as yet, though input and animation is working.

« Last Edit: January 08, 2014, 08:43:54 pm by Flash »

Coding for the love of it!


Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #1 on: November 20, 2013, 09:58:22 pm
Ok, and a little physics 3d thing...

Coding for the love of it!


Offline Sokurah

  • RBP Member
  • Cray-1 Super Computer
  • *****
    • Posts: 724
    • Tardis Remakes
Reply #2 on: November 20, 2013, 11:09:37 pm
I just imported a load of assets from Balders (my psion game) and created a little level. Not much there as yet, though input and animation is working.
Looks lovely...but then I already love that retro look. ;)

A couple of years ago I imported one of the levels form Boulder Dash and wrote a program to move a character around it and make the boulders and diamonds fall, and after just a few tweaks I had everything falling and ending up in the same places as in the Spectrum version when I compared the results. I didn't work any furher on it though. Are you going to? ;)



Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #3 on: November 21, 2013, 01:41:04 pm
I doubt I will go any further with it? The main thing was just to get to grips with Unity in general.

There is so much to learn though. ie. how do you inject data to construct a playfield rather than building each level as a scene? How to you take control of elements in a tile map (falling boulders?), etc... The list is pretty endless.

But, will fiddle when I can.

Coding for the love of it!


Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #4 on: November 25, 2013, 08:40:44 pm
Well, the unity play of Balders now works... You can play a level and do stuff.. But.. everything is currently moving on a per tile basis. Not great, but it is a start... :)

Coding for the love of it!


Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #5 on: November 26, 2013, 09:21:16 pm
Just had a little play for an hour or so on Balders and managed to get all the elements in place from the original Psion version (anyone remember it or played it? https://retrobytesportal.gameex.com/index.php?topic=471.0 )

Anyway, now have a playable game in Unity and with less that 4 hours of work. :) You can run around, collect the jewels, get killed and clear the levels. Even managed to place the samples in there from the original (remember that? Deja vu?)...

Ok, so... the downside... apart from the main character, everything else moves the same as the original - char spaces. The main character moves pixels. BUT... I actually like the Boulderdash movement and though I liked the movement in Crystal Mines (amiga - or whatever that clone was called?) I kinda missed the 'oh shit' element that happens when something drops on you like that. Well, perhaps pixel movement is better, but... is it worth redoing it all for that?

Anyway.. Perhaps I will release a little demo soon?

« Last Edit: November 26, 2013, 09:22:46 pm by Flash »

Coding for the love of it!


Offline spacefractal

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 4138
Reply #6 on: November 29, 2013, 08:47:57 pm
video? Im should tryout unity, but have stick for glbasic for now. Im want that darm game finished (even its have been slowed, the game is still some Progress).

The Musician for the RetroBytes Portal Projects.


Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #7 on: December 10, 2013, 11:40:46 am
Just for fun, here is the first level of Boulderdash done in the Balders code. Use cursors to move and space to dig.

Everything is moving as tiles atm. Still looks and plays ok, but would be much nicer (if a little slower perhaps) if the boulders fell in pixels (or at the least - sub tiles).


Anyway, this is not a new project, but just a play in unity.

(not sure if the Win one works, or why it needs a data directory?)

(Downloads Deleted)
« Last Edit: January 01, 2014, 07:31:52 pm by Flash »

Coding for the love of it!


Offline headkaze

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 7838
Reply #8 on: December 10, 2013, 12:35:42 pm
Windows version works fine.

The only issue is that sometimes a tap doesn't register as input but I noticed that in the OSX version aswell.



Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #9 on: December 10, 2013, 12:44:39 pm
Yeah, it happens. It needs a buffer for tapping as the update only polls the state of the buttons once in an update (the update is not every frame for movement).

ps. Made it a little prettier?
« Last Edit: December 10, 2013, 02:49:09 pm by Flash »

Coding for the love of it!


Offline spacefractal

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 4138
Reply #10 on: December 11, 2013, 02:00:34 pm
Was balder a direct boulder dash clone? Or did you own levels as well? I'm did borrow few ideas for greedy mouse as well (like the expandable wall and a level named tut).

The Musician for the RetroBytes Portal Projects.


Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #11 on: December 11, 2013, 07:05:42 pm
No, Balders was not a direct clone of Boulderdash, it was much more puzzle based. Also, Balders did not have any enemies in the game at all (more down to the limitations of the psion), though this meant that the levels (and objects within) were more honed to puzzle play.

The unity implementation is similar (and currently does not have any enemies), though I have added a few things. One of which is the amoeba (Blob in Balders) that grows and must be trapped to then turn into jewels.

In the current build of Balders Unity, there is a host of stuff. I just uploaded a demo of the first level of Boulderdash (with old graphics) as a way of showing that the code works. There is a lot of stuff not shown in that demo (download link is a few posts above) that is in the code, and yes, there is stuff in there that may also give you ideas for GG Mouse?

I will put a better demo together next week with a few levels and to show some of the other stuff... perhaps lol...
« Last Edit: December 11, 2013, 07:07:02 pm by Flash »

Coding for the love of it!


Offline spacefractal

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 4138
Reply #12 on: December 12, 2013, 10:09:28 pm
im which how the levels was looked like? Howover im not sure can add them to Greedy Mouse, just for fun, due stones etc does not fall realtime like boulderdash (as you know). But its nice to see you to do something again. Im look on the demo soon. That even its not a project, but just having fun testing (something just like Jungool started as a Nintendo DS project).

The Musician for the RetroBytes Portal Projects.


Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #13 on: December 31, 2013, 10:08:10 pm
Ok, had a little play at putting together some levels.

Use cursors to move and space to dig whilst, er, not moving...

There is no in game menu (too boring to implement) so if you get trapped.. quit and restart.. Sorry..

Hope you like? Well, have a little fun out of it.

Downloads under picture (not tested this build at all as a little 'pissed')

Ps. No idea why the Windoze (habit LOL) one is so much smaller? Perhaps I missed something... hic... lol

(Removed downloads for now)
« Last Edit: January 01, 2014, 04:11:43 pm by Flash »

Coding for the love of it!


Offline spacefractal

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 4138
Reply #14 on: January 03, 2014, 06:52:41 pm
im got it before removed. The graphics does look very stretch, so which resoultion does you uses? Im uses 1920x1080 (full hd) here. Look like its some sort of a format resoulution issue. The balder levels its self is actuelly nice and like that format rather using the bigger boulder dash one.

And yes the lives counter is going insane when you lost them.

Other than that, its a good start.

Howover Greedy Mouse does uses a different physcial elements than this one, even im could uses the same tiles really.

PS. Could been fun to uses gameboy sounds to that one, so go after a little gameboy style game.
« Last Edit: January 03, 2014, 06:54:38 pm by spacefractal »

The Musician for the RetroBytes Portal Projects.


Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #15 on: January 08, 2014, 08:41:57 pm
I had based everything on a 960x640 resolution (to match iOS and some android as much as possible). I have to work on the camera code to compensate for wider screens without stretching (or fix the ratio) as I want to keep a 1:1 pixel scale (or 1:.5)

Currently loads of stuff has changed in the game. Everything is smooth, control is better, dying works, esc kill you, there is music, more objects (just added bullets) and, well, assorts really.

This is still just a bit of fun. A way of learning unity. One thing I had to figure out was a game and state manager, and also touch controls (bloody awful atm lol).

Still, will upload another demo soon and perhaps an apt if I can get controls working ok?
« Last Edit: January 08, 2014, 08:44:29 pm by Flash »

Coding for the love of it!


Offline spacefractal

  • RBP Team Member
  • Blue Gene Super Computer
  • *****
    • Posts: 4138
Reply #16 on: January 09, 2014, 07:09:11 pm
You might need scaling at least on Android. Its cannot been avoid, due Androids 117 configurations out here. So you need to go comprimise about scaling in some sort.

Im did also comprimiese on my own games about scaling here of course (960x640 <-> 1280x720 uses no scaling, with none retina graphics on Karma Miwa).

But nice to see a new learning game project :-D
« Last Edit: January 09, 2014, 09:16:11 pm by spacefractal »

The Musician for the RetroBytes Portal Projects.


Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #17 on: February 15, 2014, 05:51:04 pm
I did have a little play on this again today... Had the brainwave of adding all the original boulder dash levels into the balders code.. lol

Actually, it was bloody easy... here is the code to describe the entire map for the 'GREED' level (picture of the original below). This 'binary' actually defines the 5 difficulty levels as well.

Code: [Select]
name = "GREED";
magicWall = 0x14; // also used for ameoba
diamondValue = 0x05;
diamondExtraValue = 0x0a;
randSeed = new int[] { 0x64, 0x89, 0x8c, 0xfb, 0x33 };
diamondsNeeded = new int[] { 0x4b, 0x4b, 0x50, 0x55, 0x5a };
caveTime = new int[] { 0x96, 0x96, 0x82, 0x82, 0x78 };
randItems = new int[] { 0x10, 0x14 };
randProb = new int[] { 0xf0, 0x78 };
objects = new short[,]
{
{ 0x82, 0x05, 0x0a, 0x0d, 0x0d, 0x00 },
{ 0x01, 0x0c, 0x0a, 0x00, 0x00, 0x00 },
{ 0x82, 0x19, 0x0a, 0x0d, 0x0d, 0x00 },
{ 0x01, 0x1f, 0x0a, 0x00, 0x00, 0x00 },
{ 0x42, 0x11, 0x12, 0x09, 0x02, 0x00 },
{ 0x40, 0x11, 0x13, 0x09, 0x02, 0x00 },
{ 0x25, 0x07, 0x0c, 0x00, 0x00, 0x00 },
{ 0x04, 0x08, 0x0c, 0x00, 0x00, 0x00 },
};

This is the binary stored in the original C64 code (though have omitted the palette data as it is not needed). The c64 used a pseudo random number generator that was fed a seed based on the difficulty and constructed the levels from that, here is the original c64 code :-

Code: [Select]
           7085 NextRandom.00  LDA RandSeed1
            7087                ROR
            7088                ROR
            7089                AND #$80
            708B                STA TempRand1
            708E                LDA RandSeed2
            7090                ROR
            7091                AND #$7F
            7093                STA TempRand2
            7096                LDA RandSeed2
            7098                ROR
            7099                ROR
            709A                AND #$80
            709C                CLC
            709D                ADC RandSeed2
            709F                ADC #$13
            70A1                STA RandSeed2
            70A3                LDA RandSeed1
            70A5                ADC TempRand1
            70A8                ADC TempRand2
            70AB                STA RandSeed1
            70AD                RTS

Cool huh...!

Anyway... so, now Balders is running all levels (along with the Balders ones) and all that needs to be done is to match the algorithm to boulder dash so that the fireflies and stuff all moves the same (they are a little off atm). The Ameoba is working fully as is the magic wall and, well, everything from BD and Balders for the most part.. all with per-pixel movement.

So, who know's when I will work further on this, but I will post a demo at some point I am sure..
« Last Edit: February 15, 2014, 05:53:10 pm by Flash »

Coding for the love of it!


Offline Sokurah

  • RBP Member
  • Cray-1 Super Computer
  • *****
    • Posts: 724
    • Tardis Remakes
Reply #18 on: February 15, 2014, 09:45:59 pm
Yikes, trying to understand that 6510 code and it just doesn't make any sense. Perhaps I'm just too old to learn new stuff. :)
...still, I want to learn 6809 (at some point) so I hope I can learn anyway. ;)

Ahh, I love Room I from Boulder Dash. There's just something cool (and super recognizable) about it.  :-*

So...looking good. When do we get a chance to try it out? ;)



Offline flash

  • Administrator
  • Blue Gene Super Computer
  • **********
    • Posts: 13180
Reply #19 on: March 13, 2014, 01:16:57 pm
I will release a demo in a while.

Not sure what is holding me back? Graphics, audio, er...

Anyway....

At the moment,

All 50 Balders levels are in,
All the Boulderdash 1 levels (and all 5 difficulty settings)
All the Boulderdash 2 levels (and all 5 difficulty settings)
And a small handful of Balders Redux levels to show the new elements.

Has been pretty fun and have certainly learnt some useful stuff.

So, will post a demo at some point.

ps. I could just add the BD3 level set for completion?
« Last Edit: March 13, 2014, 01:17:42 pm by Flash »

Coding for the love of it!