Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - [Coding competition 2024] Land on my Base by willbritton

Reply to topic

Rate this entry!

1 (Terrible) 0% 0%
2 0% 0%
3 0% 0%
4 0% 0%
5 8% 8%
6 4% 4%
7 30% 30%
8 39% 39%
9 13% 13%
10 (Excellent) 4% 4%
This poll has expired.
Author Message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14745
  • Location: London
Reply with quote
[Coding competition 2024] Land on my Base by willbritton
Post Posted: Thu Mar 28, 2024 3:09 pm
Last edited by Maxim on Tue Apr 02, 2024 9:19 am; edited 1 time in total
https://www.smspower.org/Homebrew/LandOnMyBase-SMS



Quote
# Land on my base (and tell me that you love me)

A little homage to a number of classic video games including [Lunar Lander](https://en.wikipedia.org/wiki/Lunar_Lander_(video_game_genre)) and derivatives like _Marslander_ for the BBC Micro.

The idea is to land the craft safely on the landing pad, which is only just big enough to accept it.

The physics is mildly realistic, simulating a gravitional constant, and a cheeky "solar wind" which blows the craft off course to the left or right.

The controls are simple:
- Press either action button to apply thrust to the lander
- Use the left or right direction keys to change the thrust angle.

There is a small indicator next to the craft which shows the direction from which thrust will be applied. For example, when the indicator is directly underneath the craft, thrust will be applied vertically upwards, sending it away from the surface. Conversely, when the indicator is 90 degrees to the left of the craft, thrust will be applied entirely in a left to right direction.

Gravity and solar wind vary from level to level, and you can capture the level code at the start of each level to prove to your friends how much of an astronaut boss you are.

I made this game with the incredible [Devkitsms](https://github.com/sverx/devkitSMS) for the [2024 SMSPower! coding competition](https://www.smspower.org/forums/19973-Competitions2024) and I made it in a hurry.

Stuff I still want to add:

- A title screen
- Some music
- Some box art
- A more sophisticated HUD
- Simulated fuel levels
- A score which accumulates
- Automatic zooming in and out of terrain like in the [Lunar Lander](https://en.wikipedia.org/wiki/Lunar_Lander_(video_game_genre)) arcade game.
  View user's profile Send private message Visit poster's website
  • Joined: 06 Mar 2022
  • Posts: 671
  • Location: London, UK
Reply with quote
Post Posted: Thu Mar 28, 2024 3:29 pm
Thanks for the upload!

I'm just about to release an update with a couple of little tweaks, notably an option to invert controls - I only tested with an emulator and keyboard but now realise on real hardware it's more intuitive with reversed controls.

Also I'm going to add an option to control the difficulty as some levels are brutal.

(I think I have permission to upload revisions to homebrew already)
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14745
  • Location: London
Reply with quote
Post Posted: Thu Mar 28, 2024 3:34 pm
Please use version numbers so we can retain the older versions.
  View user's profile Send private message Visit poster's website
  • Joined: 28 Jan 2017
  • Posts: 556
  • Location: Málaga, Spain
Reply with quote
Post Posted: Thu Mar 28, 2024 4:47 pm
This game is VERY DIFFICULT Will ... Maybe an option to use the control pad to apply horizontal / vertical forces without the point???

But I find It interesting, with some music, some flying aliens (on deeper levels) and a title xD would be great!!!!!!!
  View user's profile Send private message
  • Joined: 09 Jun 2014
  • Posts: 378
Reply with quote
Post Posted: Thu Mar 28, 2024 6:14 pm
This game is rock hard, but very addicting!

One suggestion: can you show the level number in the status bar?
  View user's profile Send private message Visit poster's website
  • Joined: 06 Mar 2022
  • Posts: 671
  • Location: London, UK
Reply with quote
Post Posted: Thu Mar 28, 2024 6:43 pm
Not sure if you noticed, but v1.01 adds in a difficulty selection option, and I also made a small mistake so that normal difficulty is easier than it should be so you might find the whole thing a bit more generous...

Also if you're having trouble with the controls, do try the inverted directions option, it might help.

The higher gravities are especially challenging aren't they!

Regarding level number, the levels are just randomly generated in a fixed sequence so any numbering would be arbitrary, but I can certainly put a simple counter on the screen which might help to feel like there is progress being made. I'd like to add a score as well.
  View user's profile Send private message Visit poster's website
  • Joined: 23 Jan 2010
  • Posts: 439
Reply with quote
Post Posted: Thu Mar 28, 2024 7:11 pm
I found 1 bug using Fusion. If i dont use any direction and just press fire the Shuttle will up and keep up for eternity dont returning.
  View user's profile Send private message
  • Joined: 09 Jun 2014
  • Posts: 378
Reply with quote
Post Posted: Thu Mar 28, 2024 8:18 pm
Played v1.01 a little bit.
I did not mind the uninverted (nice word) controls, i got used to them very quickly, but i also played on a keyboard. But of course an option to change is always good!
Played it in normal difficulty. It is a lot easier than 1.00 for sure. I'd say it's more reasonable :).
Also played crushing difficulty. It is the same v1.00, right?
  View user's profile Send private message Visit poster's website
  • Joined: 06 Mar 2022
  • Posts: 671
  • Location: London, UK
Reply with quote
Post Posted: Thu Mar 28, 2024 8:35 pm
Actually due to aforementioned mistake I think even crushing is slightly easier than the first version!

Maybe I'll add one more level to get it back to the original - "insanity" perhaps...
  View user's profile Send private message Visit poster's website
  • Joined: 19 Aug 2006
  • Posts: 102
  • Location: Brazil
Reply with quote
Post Posted: Thu Mar 28, 2024 8:50 pm
While it's simple, I must say this has been my favorite implementation of the Lunar Lander concept in a Master System game so far. Also, the downgraded difficulty on the new version made it much more enjoyable for us mere mortals.
  View user's profile Send private message
  • Joined: 06 Mar 2022
  • Posts: 671
  • Location: London, UK
Reply with quote
Post Posted: Fri Mar 29, 2024 4:12 pm
mateusbond wrote
While it's simple, I must say this has been my favorite implementation of the Lunar Lander concept in a Master System game so far. Also, the downgraded difficulty on the new version made it much more enjoyable for us mere mortals.

Thanks @mateusbond!

segarule wrote
I found 1 bug using Fusion. If i dont use any direction and just press fire the Shuttle will up and keep up for eternity dont returning.

That's curious, I'm not sure why that should happen. Does it happen for you all the time, or only sometimes? If gravity is very light you mind find a sufficiently long thrust takes you off the screen for a very long time. Ideally I would like to automatically zoom in / zoom out to respond to the ship moving off screen or very close to terrain, but that's a whole other feature to add.
  View user's profile Send private message Visit poster's website
  • Joined: 23 Jan 2010
  • Posts: 439
Reply with quote
Post Posted: Fri Mar 29, 2024 6:33 pm
Quote
Does it happen for you all the time, or only sometimes?

Everytime. Tested with Emulicious too. It´s very simple. Just press the button to fly and not directionals so it stay off screen. Funny thing is that releasing the button the shuttle dont fall more and i can press the button again and i can hear the jet.
  View user's profile Send private message
  • Joined: 06 Mar 2022
  • Posts: 671
  • Location: London, UK
Reply with quote
Post Posted: Fri Mar 29, 2024 7:23 pm
Er, okay weird. What level - the first one? Have you got the level code?

EDIT: and are you *sure* it's not just way offscreen? If you only tap the thrust very lightly can you get it to move offscreen and then fall back onscreen again?
  View user's profile Send private message Visit poster's website
  • Joined: 06 Mar 2022
  • Posts: 671
  • Location: London, UK
Reply with quote
Post Posted: Sat Mar 30, 2024 12:43 am
Just updated with v1.02:

- Added a fuel consumption system. If you run out of fuel, you fall out of the sky
- Shifted the difficulty back towards more difficult again as it was just ridiculously easy in v1.01. Normal is still pretty doable but crushing is now a serious challenge, especially with the added complexity of managing fuel in high gravity situations!

I've got some more little gameplay elements in mind to spice it up even more...
  View user's profile Send private message Visit poster's website
  • Joined: 19 Aug 2006
  • Posts: 102
  • Location: Brazil
Reply with quote
Post Posted: Sat Mar 30, 2024 1:12 am
willbritton wrote
- Shifted the difficulty back towards more difficult again as it was just ridiculously easy in v1.01. Normal is still pretty doable but crushing is now a serious challenge, especially with the added complexity of managing fuel in high gravity situations!


I think the difficulty is perfect now. Challenging, but not maddening.
  View user's profile Send private message
  • Joined: 27 Feb 2023
  • Posts: 136
  • Location: France
Reply with quote
Post Posted: Sun Mar 31, 2024 9:06 am
I can't find version 1.02 ? Is it on the page of the game ?

I tried in Crushing difficulty and it was already very difficult. You have to land with close to zero speed haha.
  View user's profile Send private message
  • Joined: 06 Mar 2022
  • Posts: 671
  • Location: London, UK
Reply with quote
Post Posted: Sun Mar 31, 2024 10:20 am
cireza wrote
I can't find version 1.02 ? Is it on the page of the game ?

Yes, first link here: https://www.smspower.org/Homebrew/LandOnMyBase-SMS, or direct link.

cireza wrote
I tried in Crushing difficulty and it was already very difficult. You have to land with close to zero speed haha.

That's right, the difficulty level affects three things:
1. The safe landing speed
2. The tolerance around positioning on the landing pad (i.e. left / right error)
3. From v1.02 the speed at which fuel is consumed.
  View user's profile Send private message Visit poster's website
  • Joined: 01 Feb 2014
  • Posts: 878
Reply with quote
Post Posted: Sun Mar 31, 2024 4:25 pm
This is way too difficult for me, but s very polished entry nevertheless. It looks nice and controls flawlessly.
  View user's profile Send private message
  • Joined: 27 Feb 2023
  • Posts: 136
  • Location: France
Reply with quote
Post Posted: Sun Mar 31, 2024 6:14 pm
willbritton wrote
Yes, first link here

Thanks, didn't see the link above.

As a player, you try to work at a pixel-perfect level, but you can clearly see that calculations are happening with a much higher granularity, with maths going on. That's pretty neat and reminds me of Sub Terrania's physics.
  View user's profile Send private message
  • Joined: 06 Mar 2022
  • Posts: 671
  • Location: London, UK
Reply with quote
Post Posted: Sun Mar 31, 2024 7:32 pm
Last edited by willbritton on Sun Mar 31, 2024 7:34 pm; edited 1 time in total
Kagesan wrote
This is way too difficult for me, but s very polished entry nevertheless. It looks nice and controls flawlessly.

Thanks @Kagesan!

cireza wrote
As a player, you try to work at a pixel-perfect level, but you can clearly see that calculations are happening with a much higher granularity, with maths going on. That's pretty neat and reminds me of Sub Terrania's physics.

Thanks, and yes that's right, most quantities are higher resolution than 8 bit, but all fixed point arithmetic. Here's the ship's struct for indicative purposes:


typedef struct
{
  uint32_t x;
  uint32_t y;
  int32_t vx;
  int32_t vy;
  uint16_t angle;
  bool oob;
  uint8_t thrust;
  int16_t angle_x;
  int16_t angle_y;
  bool safe_to_land;
  uint16_t fuel;
} ship_t;


The trig is based off a simple 91 entry 16-bit lut for a single quadrant.

I do seem to gravitate (!) towards games which use mechanics, I just find the maths quite satisfying and it generally makes for an interesting gaming experience one way or another!
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 14745
  • Location: London
Reply with quote
Post Posted: Sun Mar 31, 2024 7:32 pm
Very many games with smooth motion use sub-pixel maths for movement, for example the Sonic games. It’s actually quite easy to implement 8.8 fixed-point maths on Z80.
  View user's profile Send private message Visit poster's website
  • Joined: 14 Apr 2019
  • Posts: 20
Reply with quote
Post Posted: Mon Apr 01, 2024 6:23 pm
I had fun. The game is minimalist but the concept is so addictive... I must have played it for almost 30 minutes without realizing it.
Good job !!!
  View user's profile Send private message
  • Joined: 25 Jul 2007
  • Posts: 732
  • Location: Melbourne, Australia
Reply with quote
Post Posted: Wed Apr 03, 2024 11:12 am
The tape loader screen made me LOL, solid Moon Lander clone, I too am a fan of physics-based games, been on my list to try and make a Scorched Earth clone for a while. Once I got used to the handling of the rocket it was pretty easy to hit the pad most the the time.
  View user's profile Send private message
  • Joined: 18 Jul 2020
  • Posts: 378
Reply with quote
Post Posted: Wed Apr 03, 2024 6:49 pm
I spent the most time playing this game out of all of the entries. Pretty addictive.
  View user's profile Send private message
  • Joined: 06 Mar 2022
  • Posts: 671
  • Location: London, UK
Reply with quote
Post Posted: Thu Apr 04, 2024 7:35 am
Thanks for the nice comments!

v1.05 now has a little music track on the menu screen.
  View user's profile Send private message Visit poster's website
  • Joined: 19 Aug 2006
  • Posts: 102
  • Location: Brazil
Reply with quote
Post Posted: Thu Apr 04, 2024 9:29 pm
How can you make these simple games become so addictive? First Gorillas, now this. Why can't I stop playing these old-timers? Is it the very cohesive visual flair you give them? The ultra-fine-tuned gameplay? The MasterSystemdardization you gift them with? I don't know, but I'm already waiting for what you'll give us in the 2025 Competitions.
  View user's profile Send private message
  • Joined: 06 Mar 2022
  • Posts: 671
  • Location: London, UK
Reply with quote
Post Posted: Fri Apr 05, 2024 9:18 am
mateusbond wrote
How can you make these simple games become so addictive? First Gorillas, now this. Why can't I stop playing these old-timers? Is it the very cohesive visual flair you give them? The ultra-fine-tuned gameplay? The MasterSystemdardization you gift them with? I don't know, but I'm already waiting for what you'll give us in the 2025 Competitions.

Aw, thanks @mateusbond! I guess at the end of the day I'm just taking games that other people have invented and reimplementing them so kind of not surprised they are pretty playable! One day maybe I'll take the time to create something completely original!

(P.S. MasterSystemdardization should go into the dictionary ;) )
  View user's profile Send private message Visit poster's website
  • Joined: 12 Oct 2015
  • Posts: 194
  • Location: Ireland
Reply with quote
Another nice entry
Post Posted: Fri Apr 05, 2024 8:20 pm
Hi willbritton - when I first saw this entry I thought it may have been a Sega Master System port of City Lander originally coded for the Sega SC-3000 which was extremely difficult - not so but I still found Land on my Base pretty tough also lol
Nice job! BTW: I think I played an earlier version in which as I was falling I was able to wrap around from the left to the right side of the screen and I crashed into the middle of the mountain - not sure if this was noticed and/or fixed - congrats on the entry all the same!
  View user's profile Send private message Visit poster's website
  • Joined: 19 Aug 2006
  • Posts: 102
  • Location: Brazil
Reply with quote
Post Posted: Sat Apr 06, 2024 1:56 pm
willbritton wrote
(P.S. MasterSystemdardization should go into the dictionary ;) )


Haha, that's my word for a game having scenery that avoids straight lines and 90º angles, chibi-like character designs, high-contrast coloring, thick fonts on the lettering, narrative-driven level progression, hummable soundtracks and arcade accessibility (plug-and-play action, few menus, few button combinations, low need to pause, short to medium duration).
  View user's profile Send private message
  • Joined: 07 Mar 2021
  • Posts: 62
Reply with quote
Post Posted: Sun Apr 07, 2024 8:49 am
A lander! And this one is very cool.
The minimalist side serves the game and makes you want to play it again. Beautiful physics management, and the interface is well thought out.
Well done !
  View user's profile Send private message
  • Joined: 01 Feb 2014
  • Posts: 878
Reply with quote
Post Posted: Sun Apr 07, 2024 5:40 pm
When voting starts, I’m totally giving this one extra point for the Monty Python reference in the title. (It does refer to the song I’m thinking of, doesn’t it?)
  View user's profile Send private message
  • Joined: 06 Mar 2022
  • Posts: 671
  • Location: London, UK
Reply with quote
Post Posted: Sun Apr 07, 2024 7:14 pm
Any similarities between songs actual or imagined are purely coincidental.

Fun fact: the tune is actually a really old one called "Sing as We Go" (so I'm all good on copyright violation, which is nice as I leaned extremely heavily on some sheet music I found :-p)
  View user's profile Send private message Visit poster's website
  • Joined: 28 Mar 2022
  • Posts: 37
  • Location: UK
Reply with quote
Post Posted: Mon Apr 08, 2024 10:08 am
Kagesan wrote
When voting starts, I’m totally giving this one extra point for the Monty Python reference in the title. (It does refer to the song I’m thinking of, doesn’t it?)


I very, very nearly put a brief clip of that in the video after I said the title :D
  View user's profile Send private message Visit poster's website
  • Joined: 05 Sep 2013
  • Posts: 3828
  • Location: Stockholm, Sweden
Reply with quote
Post Posted: Thu Apr 18, 2024 11:23 am
So I finally gave this a proper run. I suck at it, just like any other videogame. But it's fun - thanks for the 'pointless' difficulty level, at least I have succeeded in landing once, after 15 minutes.

I think you should keep the fuel indicator on screen when the ship is out of view, probably you could simply make it that it still follows the ship but doesn't ever go above the top screen border and left/right of the horizontal borders so, in some way, you'll still have an idea of where your ship is even when you can't see it.

Nice music and simple art, to the point. Congrats! :)
  View user's profile Send private message Visit poster's website
  • Joined: 06 Mar 2022
  • Posts: 671
  • Location: London, UK
Reply with quote
Post Posted: Thu Apr 18, 2024 12:44 pm
Cheers @sverx!

sverx wrote
I think you should keep the fuel indicator on screen when the ship is out of view, probably you could simply make it that it still follows the ship but doesn't ever go above the top screen border and left/right of the horizontal borders so, in some way, you'll still have an idea of where your ship is even when you can't see it.

Ah that's a really good idea. I had been thinking about a simple chevron indicator (like eruiz uses in Bombjack), but that idea about the fuel gauge is kind of interesting and would take even less time to implement :-)
  View user's profile Send private message Visit poster's website
Reply to topic



Back to the top of this page

Back to SMS Power!