Log In  

Cart #rtype-2 | 2021-11-12 | Code ▽ | Embed ▽ | No License
59

After months of hard work, here is the NEW release (1.2) of Irem’s R-Type* pico-8 port, featuring the 4 stages in a 32kb cart! (Similar to the PC-Engine port, with 4 in a 256kb hu-card.)

In addition, there are:

  • 30 enemies with most attack patterns and weapon replicated (albeit simplified)
  • 4 HUGE bosses
  • 3 force types with 2 levels of power
  • 60 fps action with arcade-style graphics
  • Awesome 5 tracks soundtrack by the great @dhostin (YouryKiki) based on Masato Ishizaki's original score, you can listen to the OST on SoundCloud

Hope you enjoy it and please, give me some feedback on performance, especially on lower-end machines.

TheRoboZ

Instructions:

🅾️ button to shoot, hold to charge the beam
❎ to detach/recall the force sphere. (hold to auto-fire. after a while auto-firing will detach the force so be careful!) The force can be positioned in front and behind, has 3 powers up levels and can be used defensively too, absorbing the small enemy bullets.

(I strongly suggest to play with keyboard or pad as on the phone it might be a bit harder)

Version 1.2 Released, changes:

  • stage 4 (2 new enemies and 1 new boss)
  • NOTE: stage 4 boss cannot be damaged with normal bullets, you need to use the beam or a force weapon

  • soundtrack available on https://soundcloud.com/youry-kiki/sets/r-type-pico8
  • swapped fire buttons

  • increased special weapon damage
  • added different explosion for missiles
  • fix autofire too fast with force weapons
  • fix autofire firing force while holding button down
  • fixed circle beam/missiles gfx
  • fixed missiles explosion drawn twice
  • missiles only seeks forward as in arcade
  • misc. fixes/improvements to better match arcade version

STAGE 1
STAGE 2
STAGE 3
STAGE 4 (Originally the last stage in the arcade version)

Version 1.1 Released, changes:

  • auto-fire if you hold down (❎), see instructions. thanks @dw817
  • fixed shooting/sounds after death, thanks @Felice
  • fixed problems with music cues/checkpoint restarting and enemy removal(stage 3 mainly) after player death
  • fixed missiles not resetting after player death, thanks to @extar and his awesome let's play
  • fixed excessive beam damage due to being stuck in some situation where a bg tile was behind an enemy (first and third bosses as seen in @extar 's video

What’s missing compared to the arcade (mainly down to token limit):

  • "Option bits" power up (little spheres flying above and/below the ship)
  • continue screen/high scores table
  • The pow-capsule enemy doesn't land/walk
  • No 1-up

Development Notes:

The idea for this came as a way to expand and improve the background graphic system of my previous Masters of the Universe game with scrolling, meanwhile implementing more functionality in picodraw as explained here.
I am pretty satisfied with the technical results and picodraw now evolved a lot with the addition of cloning groups and sprite support. Programming the game was a fun “old times” experience since I had no idea how the original worked and had to keep playing on M.a.M.E. trying to understand enemies patterns, but got a bit tedious at time, while fighting token limits to implement them, specially near the end.

Thank you

The following contributions taught me some incredible techniques that allowed me to complete the game

@sparr/ @Felice for their fillp extension that allows object coordinates fill patters, without this I wouldn’t even have tried as the jittering was really annoying,

@freds72/ @paranoidcactus for their Journey to poom article
showing me the invaluable “properties factory” function that I adapted to my needs and saved me at least 3 times when I overshot token limits. Freds72 also contributed some last minute optimization tricks that will probably allow me an additional update.

@ElGregos for his snake tweetcart, showing me a simple way to implement a more complex movement for the second boss

Without the above, the game would have been way more limited

*R-Type is a side-scrolling shoot'em up game, and the first game in the series. It was originally released in July 1987 by Irem for the Arcades, with ports to home consoles and computers in the following years.

P#98070 2021-10-01 02:28 ( Edited 2021-11-13 01:27)

:: dw817

I remember when you started and posted your demo 6-months ago from today, I was suitably impressed then. Even more so now that you have completed it.

Obviously gold star work. Unfortunately it is a painful reminder to show me just how far my gaming reflexes have fallen in this day and time.

If maybe there was an option for auto-fire - I think there was a 3rd button in the original arcade game that did so. Maybe make it optional in the beginning game menu to have auto-fire for those who have played and never plan to use the standard power-up shot for anything.

[ ] Standard shooting, powers up when held
[ ] Auto-fire, rapidfire when held

P#98071 2021-10-01 02:48

I think I can add an auto-fire option in a future update (already planned after the next release of pico8 because I saw new stuff in the release notes that could help reclaim some tokens)

P#98076 2021-10-01 08:19
:: phil

Absolutely incredible! Amazing piece of coding. Have a star - I wish I could give more.

P#98077 2021-10-01 08:29

Awesome! 👾

P#98079 2021-10-01 11:53

This is great! Very nice Pico 8 - Port!

P#98081 2021-10-01 12:27
:: Felice

Nice port!

Not sure if it's something you had to overlook because of tokens, but I notice after I die I can still keep firing and hearing "pew pew pew" even though nothing happens.

P#98085 2021-10-01 14:11 ( Edited 2021-10-01 14:11)

Excellent work (and very good job with the music!)

Happy to have indirectly contributed :]

P#98090 2021-10-01 15:33

@Felice yeah this is one of the rough shortcuts I had to take for token reasons, but I might clean it up in a future update

P#98116 2021-10-02 07:27

Version 1.1 Released, changes:

  • auto-fire if you hold down (🅾️), see instructions. thanks @dw817
  • fixed shooting/sounds after death, thanks @Felice
  • fixed problems with music cues/checkpoint restarting and enemy removal(stage 3 mainly) after player death
  • fixed missiles not resetting after player death, thanks to @extar and his awesome let's play
  • fixed excessive beam damage due to being stuck in some situation where a bg tile was behind an enemy (first and third bosses as seen in @extar 's video
P#98414 2021-10-09 02:38 ( Edited 2021-10-09 02:39)
:: dw817

Auto-fire. Delicious. I noticed that when you hold (O) however the indestructible ball is also launched every time. If there was a way to have it held until two conditions take place.

  1. (O) is not held or touched.
  2. (O) is tapped or held.

Then launch the ball and do not launch it if just caught and (O) is held down.

P#98416 2021-10-09 02:56
1

@dw817 for now there aren't enough tokens to change it. I think I can fix it when the new pico version will be out.

P#98417 2021-10-09 03:02 ( Edited 2021-10-09 03:02)
1

Version 1.2 Released, changes:

  • stage 4 (2 new enemies and 1 new boss)
  • NOTE: stage 4 boss cannot be damaged with normal bullets, you need to use the beam or a force weapon

  • soundtrack available on https://soundcloud.com/youry-kiki/sets/r-type-pico8
  • swapped fire buttons

  • increased special weapon damage
  • added different explosion for missiles
  • fix autofire too fast with force weapons
  • fix autofire firing force while holding button down
  • fixed circle beam/missiles gfx
  • fixed missiles explosion drawn twice
  • missiles only seeks forward as in arcade
  • misc. fixes/improvements to better match arcade version
P#99961 2021-11-12 03:22

even more impressive packing!
minor code/perf comments:

  • saves 1 token
local e=add(explos,{})
  • Felice fillp uses slow band/shr/.., suggest to replace by operators (+save tokens)
  • min/max(0,x) == min/max(x)
  • round function can be made faster/smaller:
function round(n)
 return (n+0.5)\1
 -- return n%1 < .5 and n\1 or ceil(n)
end
  • use @/% faster/smaller peek/peek2 equivalents
  • memset(24336,0,16) is 1 token less than poke4(unpack(split"24336,0,0,0,0"))
  • you can regain some compression ratio (around 95%) by stripping out trailing blanks (I use this Python script to minify my games):
# read infile and write minified version to outfile
def minify_file(infile, outfile):
    # minifying main
    main_code = ""
    with open(infile, "r", encoding='utf-8') as f:
      main_code = f.read()
    # rules
    minify_rules=[
      (re.compile('---',re.MULTILINE),'==='),
      (re.compile('--\\[\\[.*?\\]\\]',re.DOTALL),''),
      (re.compile('--[ ]*.*$',re.MULTILINE),''),
      (re.compile('^[ \t]*',re.MULTILINE),''),
      (re.compile('[ \t]*$',re.MULTILINE),''),
      (re.compile('\n\s*\n*',re.MULTILINE),'\n'),
      (re.compile('===',re.MULTILINE),'---')
    ]
    for rule in minify_rules:
      main_code = rule[0].sub(rule[1],main_code)
    with open(outfile, "w", encoding='utf-8') as f:
      f.write(main_code)
P#99971 2021-11-12 12:11 ( Edited 2021-11-12 12:18)

Thank you @freds72, this is like a Hail Mary at the last second and gives me enough tokens (~25 wich is massive considering how much I struggled to get even 2/3 more in this release) to either fix any bug that pops up in this release or implementing one or two entries in my refinement list (which I plan to do with next pico-8 release).
I suggest @zep to add the min/max optional 0 in the manual, as I was using it several times. Also the add trick is appreciated, I had the feeling there should be a more elegant way to do it but forgot add() returns the added item. For minimization now it's not that urgent since I think I am done with picodraw stuff. I am using Visual Studio Code automatic trailing space removal (which I didn't know of when writing previous carts...) but I also find indentation space eating a lot of compression so I remove most in simple functions but I like to keep code as readable as possible.

P#100018 2021-11-13 01:26
:: dw817

You've come a long way on this, @TheRoboZ.

Just wanted to give you one more bit of applause for having the cheat option. I am really bad at action games and wouldn't last more than a minute on the real arcade thing.

Here I can play your game and explore it to conclusion. Thanks so much !

P#100027 2021-11-13 04:20

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2021-11-24 02:26:10 | 0.184s | Q:46