GLBasic forum

Main forum => Announcements => Topic started by: erico on 2016-Oct-02

Title: [GBJam 5] MRU:LV-426
Post by: erico on 2016-Oct-02
MRU:LV-426 Escape from Hadley´s Hope

LATEST EDIT: uploaded final version here too (

Here a follow up on the more complex parts for me to face while coding:

_Creates a random 25 sized MAP containing first and last(7) checkpoints plus 5 distributed checkpoints. Fill the rest of the blocks with plains, slopes or bridges.
_Creates a random 1000 by 10 TRACK based on MAP at a 1x40 ratio.
_Creates a random
_Use a 44 by 10 marker on the TRACK corresponding to the position the game is happening for the real time terrain movement, interaction and transformations (reality bubble).
_Convert between TRACK and normal XY sprite coordinates to check collisions tank/ground, bomb/ground, explosion/ground.
_Explosion is nerfed, it creates a 3 by 3 area around the bomb hit and shots 4 random cells.
_Check  ground/ground gravity and destroy cells accordingly. Cells can only be if there is something under it. Bridges must be connected to a knot at least 3 cells away sideways.
_Bomb/tank collision happens normally similar to box2d.
_At TRACK 1000, it all gets copied till 2000 but flipped, same with 3000. It makes a 75 sized MAP corresponding to a 3000x10 TRACK.
_The 75 MAP are divided into some 15 groups that contains information on how many aliens should randomly appear and shoot. This draws a difficulty line.

The coords between TRACK and normal objects was a bit monstrous to make.
Now I know better. :)
Latest map generator beta is appended to this post, control with:
_Arrows to move cursor.
_+shift to scroll terrain.
_z /x/ c to fire guns going from single to wider shot.
_enter to generate new game.
Jam Logcat:
Jam info:
Title: Re: [GBAJam 5] MRU:LV-426 Patrol
Post by: erico on 2016-Oct-03
Made a final game layout, lot´s had to change unfortunately. :(
I thought to keeps the gfx but it becomes too small and drawing bigger stuff start to require more time.
The extra color also brings newer composition habilities since the 3 colors we had before has either to work out contrast or there will be a plenty of borders ;p

Anyway, some stuff is already redone at least to get some code flowing.
The world is the very first thing that needs to be done since it messes a lot with the main playability.
Here a vid of it in action and I shall upload a version later today so we can check it out.

edit: no more tube embend on the forum?
Title: Re: [GBAJam 5] MRU:LV-426 Patrol
Post by: spacefractal on 2016-Oct-03
Gameboy did only have 4 colors (edit: im wasent are we only used 3 colors, but its was still b&w style).

Yes the resolution is now 160px x 144px instead of 64x64. But we also dont need to full the picture area either, which means we can move the text outside the picture, so we no longer have text into the picture. Then we property need to redraw or rescale to 128x128, and then rest can been (press start to play) and such, without clutter the picture than before.

Im also property we can reuse all ingame elements, eventuelly add a extra status, due resolution change. We can also add some more floors, but can also act as its was before.

Then we can focus on more variered air attack, due more screen area to them. Ufos could eventuelly attacks in random heights.

We do not need to change the sprites, if you ask me. Its small, but im like them as they are.

PS. And yes, we have short in time. Also im did a another tune, which eventuelt can been included. Im will email you that.
Title: Re: [GBAJam 5] MRU:LV-426 Patrol
Post by: erico on 2016-Oct-03
I´m not worrying for the time, I just hope something is done and playable for the compo.
I really want to change this into a featured game, probably try to sell the release version into the many formats.

I like the small gfx too, but it doesn´t blend ok with the resolution if on a phone. So all will change.
I will see to release a compo version only on its screen size and the rest on my own size.
This is going to have 4 colors but I will leave the gfx part for later.

I have a very extended design messy docs here, Ian once saw it and understood nothing :D I´m pretty bad with words. :-[

But I will try to follow that up.

The map generator is more or less done.
I will add the enemy wave control to it (layer 0 of the track array), destructible capacity and it should be complete.

Here a bridgy area and you can also download to give a try.
Arrow to scroll map, shift+arrows to move cursor.

edit: exe link on first post.
Title: Re: [GBAJam 5] MRU:LV-426 Patrol
Post by: spacefractal on 2016-Oct-04
Remember AS gameboy did have a quite blurry screen.

On mobile, you would upscale to fit screen anyway and should not have a issue.
Title: Re: [GBAJam 5] MRU:LV-426 Patrol
Post by: erico on 2016-Oct-04
Yep, just like the avocado game, that is why the proportion is similar. I can use the scaling code you fixed just perfectly.

Here the final testing for the terrain. All is fine as it seems, can advance to the game itself and player now.
Have a play with it:

No anomalies should happen on the terrain it doesn´t matter how you destroy it.
It has a very interesting realtime gravity behaviour.
Apart from the standard easing of borders and killing of single ground towers, the bridges have a very special way to colapse.
A bridge ground will fall apart if disconnected at one side to a bridge knot at least 3 blocks away. :)
Very indiana jony!

What do you guys think?

edit: will put the exe link on top post, check it out.
Title: Re: [GBAJam 5] MRU:LV-426 Patrol
Post by: spacefractal on 2016-Oct-04
gave Ian you the original code? or did you start from begining. Its was very much playable and liked it. Yes a demo for the combo is fine. But dont forgot your long time project :-).
Title: Re: [GBAJam 5] MRU:LV-426 Patrol
Post by: erico on 2016-Oct-04
Oh no, won´t forget the other projects, they are going on.
It is just that I want to code on my free time instead of drawing and the avocado needs only drawing at this point. :D
The is redone, I haven´t seen Ian´s latest build, just exes.
Title: Re: [GBAJam 5] MRU:LV-426 Patrol
Post by: erico on 2016-Oct-05
Here a latest video about the track.
I can´t seem to add youtube videos anymore, did something change?
The you tube button is missing.

Title: Re: [GBAJam 5] MRU:LV-426 Patrol
Post by: erico on 2016-Oct-07
Here the player in action. It works fine but I really should  remake the collision checks between objects (player) and the terrain array.
The player and terrain movement are the more important parts to get right on this game (and any I guess).

What do you guys think so far?
Title: Re: [GBAJam 5] MRU:LV-426 Patrol
Post by: UBERmonkeybot on 2016-Oct-07
Looks really nice Erico.
Title: Re: [GBAJam 5] MRU:LV-426 Patrol
Post by: spacefractal on 2016-Oct-08
look and fell different than that version ian came with (which was near finished). Actully look like its more or less using that way Karma Miwa used terrain checks (which here im only used few pixels).

Also rather to do a moon patrol game, you could change the game to being something like "The Incident" (with no shooting), but in the Moon Patrol style (hence the landscape is good).

Also property you could do around 20 sections and such, and let game reuse that.
Title: Re: [GBAJam 5] MRU:LV-426 Patrol
Post by: erico on 2016-Oct-08
Yep, time is short.
I´m going to wrap a runner game on the same ´universe` and use it as an alpha or zero version. :D

I don´t know incident, will check.

Here it will be only the tank (maybe more players).
.No shooting.
.enemies destroy terrain.
.you have to reach the end of the track, get back and go again.
.the terrain remains destroyed.
.you can sustain lots of hits before death.
.fall off screen and instant death.
.extra jump jets ,energy and enemy repulser as powerups on the checkpoints.

Something like this.
I made a 10 step plan here, it should be doable if I speed up! :D

Title: Re: [GBAJam 5] MRU:LV-426 Patrol
Post by: Ian Price on 2016-Oct-08
Looking good :)
Title: Re: [GBAJam 5] MRU:LV-426 Patrol
Post by: erico on 2016-Oct-10
Done, uploaded a while ago. I hope it is fun enough. :enc:
Version is up for playing and voting, check:

Here my attempt at the fresh release version...didn´t go much far. :P
Title: Re: [GBAJam 5] MRU:LV-426 Patrol
Post by: spacefractal on 2016-Oct-10
Only thing you have missed is scoring how far you came, when you died... other, pretty nice game.
Title: Re: [GBAJam 5] MRU:LV-426 Patrol
Post by: erico on 2016-Oct-10
Yep, there are some numbers I could use to form  score and show stats, some of mind:
_total pixel traversed is about 18.000 (full game takes a fixed 10min. top duration).
_24 max final hull energy
_5 max extra jumps
_ amount of preserved/destroyed terrain
_ amount of jumps and jets made
_ longest jumps made
_number of alien bombs launched or detonated

Let´s say I preferred this more complex method here:    =D :D
Code: (glbasic) [Select]

edit:and to spoil it all, this game features the infamous single-effect-line-game-ending that plagued many great games of the past(some didn´t even have an extra screen shot, how dare!?).
But you will have to get there to be specifically enlit... I haven´t made to it yet, but I´m close and it is possible (just did!!).
Title: Re: [GBAJam 5] MRU:LV-426 Patrol
Post by: Ian Price on 2016-Oct-10
Title: Re: [GBAJam 5] MRU:LV-426 Patrol
Post by: bigsofty on 2016-Oct-11
Looks great so far Erico!  :good:

All the Alien references are great BTW!  ;) 
Title: Re: [GBJam 5] MRU:LV-426
Post by: erico on 2016-Oct-11
Thanks! Go play it, tell me what you think. A 3 players bumping each other here could be deal no?
I also updated the first post with some of the subjects that took most of my time of the 6.5 days used.

Tell you what, the very best feeling I got from making this game had to come from the point where I created a bunch of pre-set generators that rendered a nicely balanced result in game pretty much on the first go out of my mind. That was probably luck though, but for me, to create a generator is harder than a designed thing since the former needs time and testing to achieve an statistic balance. (don´t know if I made sense).

Title: Re: [GBJam 5] MRU:LV-426
Post by: matchy on 2016-Oct-27
I just watched your demo video and that looks really good.  :good:
Title: Re: [GBJam 5] MRU:LV-426
Post by: erico on 2016-Oct-27
Thanks Matchy, the thing is a real mess codewise but I learned a lot about what I wanted, the terrain array.
Title: Re: [GBJam 5] MRU:LV-426
Post by: erico on 2016-Nov-03
...a few weeks after coding, I can´t understand jack sh*t of what I did, but I made it fit pandora screen and added joy support.
Hopefully this should do to have the compo version playable on the pandora.

Here a zip.
Title: Re: [GBJam 5] MRU:LV-426
Post by: Ian Price on 2016-Nov-03
Feedback sent via PM. It's not working properly :(
Title: Re: [GBJam 5] MRU:LV-426
Post by: spacefractal on 2016-Nov-03
Pandora, did virtual screen works? joy support on Pandora is keys, which im added for GameInput API (and hope they are correct).
Title: Re: [GBJam 5] MRU:LV-426
Post by: Ian Price on 2016-Nov-03
did virtual screen works?
Doesn't look like it

joy support on Pandora is keys
I'm not sure that worked. There appeared to be no keyboard/joystick control. What keys did you establish as replacements?
Title: Re: [GBJam 5] MRU:LV-426
Post by: erico on 2016-Nov-03
The virtual screen I´m using is like this (no grabscreen):

SETSCREEN 480,432,0               (to set screen 0 for the final output 3x original size)
CREATESCREEN 1,100,232,160 (create screen/texture with the real resolution the game runs on)

I do the game on the screen 1 and before drawscreen, I do a:

ZOOMSPRITE 100,121,120,3,3

Responding to the feedback msg you sent me earlier, the reason nothing is showing on titles is probably related to a drawrect I was using to help position the screen.
From your screenshot, I see that the created screen 1 is showing but not scaled with zoomsprite, which is very strange since if I remove the zoomsprite command, nothing is shown on PC.

I used joystate command to read a joypad for the pandora expecting its pad and buttons to work with it.
Now as you clarified, I should be using the arrow keys, which is what I originally had, so I will just revert to that and it should work.

Do you happen to know which exact version 10 of GLB will work? I recall one version also worked with OSx and I have been hunting it for a while without success.
Thanks a lot for testing and reporting back.

I´d really wish those virtual screens would work fine as I rely a lot on them to save coding time and to make things less complex.
I recall a couple versions before the current one had some problem displaying the created screen on the caanoo, probably something similar to what it happening. Istead of zoomsprite, I´m using drawsprite to position it a bit to the right and that doesn´t work either, the original screen is displayed similar to the pandora, on the top left part of the screen and it won´t let me position it it doesn´t matter the x/y coordinates I use.

edit: sorry for the tea...I will make a special one for you if you happen to visit brazil. :)

edit2: another question, if the dpad are the arrow keys, what is used for the pandora joy buttons? other keys maybe?

edit3: maybe the problem is with usescreen.
Title: Re: [GBJam 5] MRU:LV-426
Post by: Ian Price on 2016-Nov-03
Virtual screen is definitely working in GLB Version 10.057. That's what's on my desktop anyway (and V14.xx) - I use them both.

1 - I'd fly over specially for a good cup of tea... but my arms would likely get tired half way :D :P

2- I've never used the joypad commands on the Pandora, so I don't know off hand.

3 - I haven't investigated too much (and not at all recently due to lack of time). I just compile with a lower version for the Pandora and not worry about it.

No worries about testing. Just send any updates as you do them and I'll see what's what.
Title: Re: [GBJam 5] MRU:LV-426
Post by: erico on 2016-Nov-03
Ok, thanks, but you don´t happen to know which key() the buttons (a/b/x/y) on the pandora respond to, do you?
As I´m going to use arrow keys for the dpad, it is best that the jump button is not up as with the keyboard but button A instead.

I will try that GLB version. Hopefully it is the one with the MAC virtual screen also working.

You could try to hop into some oceanic winds to easy up the deal :D
oh heck...I just had a flashback about pirates on the one could hardly navigate north but south was always speedy. ;p
Title: Re: [GBJam 5] MRU:LV-426
Post by: Ian Price on 2016-Nov-03
The buttons on Pandora are -

 A - 199
 Y - 201
 X - 209
 B - 207


START - 56

Title: Re: [GBJam 5] MRU:LV-426
Post by: erico on 2016-Nov-03
Got it, also took the chance to use my original resolution so to use more horizontal screen and ended up re fine tuning some stuff, so it is an xd version :D

Using GLB 10.057, I get the following console output:
*** Configuration: PANDORA ***
GPC - GLBasic Precompiler V.8.013 SN:889e9163 - 3D, NET
Wordcount:1594 commands
Please copy the dir: D:\JOB\MRU_LV-426 Patrol\MRU_LV426\MRU_LV\PandoraMake
on an SD card and run "" on the Pandora. Your bin is SD/ then
put that in your .app directory and you're done.
Optionally pack the .app to a .pnd
*** Finished ***
Elapsed: 7.0 sec. Time: 18:14
Build: 1 succeeded.

Is that normal? Then a file called pandora-exe.pnd is created along side the pc executable and the file that the console refers to.
I zipped it with the media folder, is that how it works?
Title: Re: [GBJam 5] MRU:LV-426
Post by: Ian Price on 2016-Nov-03
I've never see that output text before! I've never had to run any file either. Strange. :S

Anyway, I'll have a look at that in a mo and report back.

[EDIT] OK. Gave it a try and... perfect. Full screen and running smoothly.

The only thing is that "A" is not the best choice for jumping. I can feel the "X" button under my thumb when pressing. "X" or "B" would be better choices. Although you could easily make all of them jump.
Title: Re: [GBJam 5] MRU:LV-426
Post by: erico on 2016-Nov-03
Great! I have just updated the version on the pandora forum for testing.
Will add the buttons suggestion on next version for sure.

One thing I noticed on this GLBasic version is that the volume on the PLAYSOUND command is not playing anything if it is below 1, like .5 for example.
Fixed by changing the volumes on the samples just sucks a bit to mix all sounds as it gets time consuming and not immediate.

So the nubs on the pandora respond as 2 separate mouses? Maybe I could add another player and make both bump on each other, each car controlled by each nub so to support a local multiplayer (here moving up would jump) but I´m not sure I should dwell with this code much longer other than to set it for a future recode...but I sure would like to add a few bits to make it a nicer experience.

Thanks a lot for testing Ian! This one version is supposed to be superior than the compo one and is using a resolution more close to what I planned in first place (ye, not the compo res).

edit: If I haven´t pestered you enough already...could you point me towards where I could figure out how to do a pnd? Anytime you can. :)
Title: Re: [GBJam 5] MRU:LV-426
Post by: Ian Price on 2016-Nov-03
No; the nubs act as one mouse - the left nub is movement, the right nub acts as the buttons (up is LMB, down is RMB). They can be reconfigured, but that's standard. Not sure if they can act as two individual mouses/mice/meeces though. They probably can, but I've had no reason to try.

I'll email you the .PND details tomorrow - I've just finished my night shifts and I'm totally knackered. Going to have an early night.
Title: Re: [GBJam 5] MRU:LV-426
Post by: erico on 2016-Nov-03
All fine Ian, super thanks for all the help, take your time, no hurry.
Hopefully this GLB version also exports to the caanoo all fine.
Have a nice rest. (don´t dream of teas!)
Title: Re: [GBJam 5] MRU:LV-426
Post by: Ian Price on 2016-Nov-04
I've now had a good night's sleep and a fair few cups of tea. Time to get started!

I've attached a file with all you need in there to help get a proper, working, distributable .PND file for the Pandora.

There is a little bit of work involved, but not too much. It can take a few attempts to get a working .PND though...

The attached file contains two directories -
- The first file is PNDTools.

- The second is all the files you need to make a working .PND. These are actual working scripts etc., created by me. You will need to edit these as follows for your own use.

Firstly you need to adapt the file ( and PXML.xml file to your own needs. You will have to edit these files manually (I use Wordpad or Notepad); wherever the name "pandora" appears , change the name to your own game name (including in the name of the .sh script). These all have to match EXACTLY. You might want to change the email address too, as that's my email address and use your own name. Save your changes and you're ready to

Change the ReadMe file to reflect your app. You can put anything in here, but it should be instructions, keys, copyright info etc.

Add three screenshots to the previews folder (named 01.PNG, 02.PNG and 03.PNG)

Once all the above is done, run the PNDTools.exe. This is a GUI tool that you use to put it into a PROPER .PND that can be distributed on the Repo. It's fairly obvious what needs to go where and it's mainly drag and drop. Grab and drop your "Media" directory, ReadMe.txt, "previews" directoryand "scripts" directory in the top part. These will now be listed and you can look inside the directories to ensure all is correct.

Now you need to add your pandora.exe.pnd - grab and drop that in the top part too - a dialogue box will appear. Click "No" - the .pnd should now be seen in the files list.

Click the "Load icon" button and select your icon (.PNG format 64x64 or less - transparency accepted) - make sure that the icon name is the same as used in the .xml file

Click the "LOAD PXML" button and add your PXML.xml (**NOT** the GLB .XML file).

Finally click the "CREATE PND..." button. Name your file (ensure you add ".pnd" to the file name).

You should now have a working .PND file. Run it on a Pandora to test. If the icon shows up and the game runs then you can now distribute it on the Repo.

Hope this helps AND works. Any questions, just shout (very, very loudly as I may not be able to hear you all the way from Brazil!) :P
Title: Re: [GBJam 5] MRU:LV-426
Post by: erico on 2016-Nov-04
Nice! This should work out and surely helps.
Will let you know how it goes. :good:
Title: Re: [GBJam 5] MRU:LV-426
Post by: erico on 2016-Nov-05
Fixed a bunch of stuff, made bridges longer and pillars able to be more distanced between each other.
Made a better background as well as 24 scrolling midgrounds (taken from another game of mine :D)
The game´s track uses only a random unique set of 4 of those, so every game you get more or less a different midground.

I should not be too far away from a release I guess.
For android, it is going to suck to find out a good control method.

I will be adding some fchanges and then release it here for a final testing section.
If someone wants to try the ongoing versions, let me know.

Title: Re: [GBJam 5] MRU:LV-426
Post by: Ian Price on 2016-Nov-05
Looks great :)
Title: Re: [GBJam 5] MRU:LV-426
Post by: Kitty Hello on 2016-Nov-05
Looks good. For Android use single button control? (Might have to tweak the way the bombs fall, then)
Title: Re: [GBJam 5] MRU:LV-426
Post by: erico on 2016-Nov-06
Single button control may work, but how can I do a jump with it?
Yep, if the bombings change to an easier set, it could definitely work.

I was thinking about using the black side borders as left border for movement and the right one for jumping.
I guess I will have to try that out to see if it works.

Anyways, here is the latest beta.
Let me know what you guys think of it.
I guess I will change some cosmetic stuff and add music and be done with it.

Title: Re: [GBJam 5] MRU:LV-426
Post by: spacefractal on 2016-Nov-06
It's a 3 input game. So single button does not work, but it's can still been a one finger game (tank will move to the finger). If the finger is over, it's will jump and eventuelly move to the finger position as well.
Title: Re: [GBJam 5] MRU:LV-426
Post by: erico on 2016-Nov-25
As the game is now, it won´t work with a single button.
But I fell Kitty is somehow right to say so and make the game more accessible, more people could have fun playing it.

I added a time bullet power and sand storm (with thunders of course!), also trying a score system and a few other bits.
I saw a few posts here about internet global scores, I might look at that later.

Anyways, here is a latest video bit:

I will upload a test version here soon.

Title: Re: [GBJam 5] MRU:LV-426
Post by: UBERmonkeybot on 2016-Nov-25
Looking good Erico.
Title: Re: [GBJam 5] MRU:LV-426
Post by: erico on 2017-Jul-21
This took a while, but the itchio page is updated to the last version.

Will also update the very first post here with the latest version for posterity.
This sure needs a recode with some shooting :)
Title: Re: [GBJam 5] MRU:LV-426
Post by: spacefractal on 2017-Jul-29
look like fun!

Mightbeen, should use the MUSICIANS\H\Hubbard_Rob\Food_Feud.sid tune?
Title: Re: [GBJam 5] MRU:LV-426
Post by: erico on 2017-Jul-30
Yep, some music sure would help this one up.
I thought more about just background music...will probably re write to add shooting at some point.
Title: Re: [GBJam 5] MRU:LV-426
Post by: spacefractal on 2017-Jul-31
Actually it's was meant for your burger time game Hehe. Not sure it's was happens here.
Title: Re: [GBJam 5] MRU:LV-426
Post by: dreamerman on 2017-Aug-04
I really like this art style, visuals are great, music also.
Small game but gives fun, would be great on mobile phone with good touch controls, much better than most 'runner' type games.
Shooting also would be nice, and maybe different enemies..
Title: Re: [GBJam 5] MRU:LV-426
Post by: erico on 2017-Aug-10
Thanks Dreamerman, ya moon patrol was quite the side runner of the 80s.
Will get back to this in the future, but hopefully, what is up now is well playable. :)
Title: Re: [GBJam 5] MRU:LV-426
Post by: erico on 2020-Jan-11
Because a friend requested to see this game´s source code, I think it is fare I share it amongst us.
I´m digging its souce now and shouls have it posted here soon.
Title: Re: [GBJam 5] MRU:LV-426
Post by: hardyx on 2020-Jan-14
Very cool game and funny Erico, I like the palette you selected and the GB style.
Title: Re: [GBJam 5] MRU:LV-426
Post by: erico on 2020-Sep-04
Oh Damn! I forgot to upload! My statement is from many months ago! :O
Anyways, here is the project files and the medias.

It was a jam, so everything is stitched to no end and I´m using assets from other games of mine :)
The MENU.gbas file has a hidden world generator tool, but the documentation in game is half in portuguese half in english :D

Let me know what you guys think of it.
Title: Re: [GBJam 5] MRU:LV-426
Post by: Marmor on 2020-Sep-05
thx erico  <3 <3 :good: :good: