Log In  

I discovered PICO-8 four days ago after reading a news in The Verge about the upcoming PocketCHIP. I purchased a license (the voxatron bundle) to see what it was about and since I can't stop playing with and the numerous games / demos.

I looked at some code, read some posts on the forum and thought it could be even more funny to code.

So I decided to start with a Lode Runner remake as my first program.
It might be a bit ambitious as it's been almost 15 years I haven't coded anything serious but I have some time and I'm decided to learn.

It's still at the very early stages, I managed to fit the first level into to 128x128 and draw the sprites set :

and I can display them together :

But that's it for now...

Part 2

Today, after a long weekend, I'm back to PICO-8 devellopement.
Lode Runner runs !

I had some trouble with transparency - looks like sprite 0 has to be blank (?) - not sure how flip() really works ... there must be a better way to refresh the screen than :

function _draw()
  rectfill (0,0,127,119,0) 
  map(0,0,0,0,16,16)
  spr(runner.sprite,runner.x,runner.y)  
end

Moving my main sprite has been a source of satisfaction. I still need to sync the speed but it already looks nice to me.

The most difficult has been with the colision detection. It works but I'm not happy with my code.
the actor's states are far more complex than I initially thought
I should have think a bit more before diving into the code and now I think it would be better to restart from scracth before going too far.

That's the way you learn ;-)

P#20504 2016-05-12 18:31 ( Edited 2017-08-26 15:42)

Looks real cute!

P#20508 2016-05-12 20:06 ( Edited 2016-05-13 00:06)

Nice! That's a good idea :-)

P#20525 2016-05-13 09:18 ( Edited 2016-05-13 13:18)

Looks really nice and I loved this game when I was a kid!
Hit me up if you want want assistance :P

P#20690 2016-05-17 10:25 ( Edited 2016-05-17 14:25)

Thanks guys for the comments.

P#20694 2016-05-17 10:58 ( Edited 2016-05-17 14:58)

instead of using rectfill to clear the screen, use cls()

P#20718 2016-05-17 16:32 ( Edited 2016-05-17 20:32)

Yay, Loderunner! This seems like a nice start.

A couple little notes:

  • There's nothing wrong with that _draw() routine you've got; that's pretty much bone-standard pico-8 screen drawing! Clear screen (you could also just use cls() if there's not a super specific reason you need to not redraw the bottom row of sprites), paint some map on, paint your sprites on. Everything else is just details.

  • If there's no art differences between your greenshirt guy and your redshirt guy other than the colors assigned to various regions (hair, skin, shirt, shoes?), you could easily save some spritesheet by just having one version of the sprite and then associating a series of palette swaps with each runner guy in your code. e.g. just keep the top row of sprites, but store for the redshirt guy the color code pairs of green->red, yellow->dark grey, beige->brown in a list. Then when you go to draw redshirt, you'd do a quick series of pal(col1,col2) calls to change up the colors, do your spr() call, and call pal() again with no args to reset to normal colors.
P#20723 2016-05-17 16:54 ( Edited 2016-05-17 20:54)

wonderful!! I love lode runner so much! <3

P#20744 2016-05-17 22:49 ( Edited 2016-05-18 02:49)

Aw yisss! That's one sexy gif. I want to play this!

P#20785 2016-05-18 12:55 ( Edited 2016-05-18 16:55)

Thank you all for the kind words and for your advices - much appreciated

I think I have enough code to share now - So here is my humble contribution :

Cart #20806 | 2016-05-18 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

I'm now looking for how I can hide the gold after running over it - ie replace the cell in the map by an empty one - same for the bricks which I need to temporary replace by sprite #34 when digging them with z/x ... any idea would be welcome.

P#20805 2016-05-18 17:10 ( Edited 2016-05-18 21:30)

I like lode runner very much. It was one of my first game on PC (around 1986).
This version looks very good!

P#20807 2016-05-18 17:32 ( Edited 2016-05-18 21:32)

hey Saccharine! This is looking sweet! =)

To remove objects, you can either use mset(x,y,0) to get rid of the object. Or when you load the map you can find all the treasure and make them "objects" instead (replace with 0 in the map) and draw them as sprites each frame on top of the map and remove the object when it is picked up.

For the digging you'd use mset(x,y,34) as well, to replace it, but you probably want to keep a list of timers that restore the block when it returns after it is dug.

P#20823 2016-05-18 21:31 ( Edited 2016-05-19 01:31)

Thank you impbox - exactly what I need :-)

P#21234 2016-05-24 06:46 ( Edited 2016-05-24 10:46)
1

It's been a long time I haven't played with PICO-8, busy with other tasks. I thought it would be good to give some update of my little progresses.

  • new welcome screen
  • the map has been populated with 6 levels
  • improved runner move
  • the runner can pick the gold and the score increases
  • when all gold has been collected, the ladder to the next level is shown
  • when runner reaches the exit, level #increases, one extra live is added - but that's it, I have now to manage to move to the next level
  • ...

Cart #22774 | 2016-06-12 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

The guards are not managed yet, nor digging.

The code is not commented, but I tried to use self explanatory variables names, and it should be easy to read.

Please comment, any advise would be most welcome

P#22775 2016-06-12 17:21 ( Edited 2016-06-12 21:21)

My main advice: continue the good work, looks very promising :)

P#22777 2016-06-12 18:12 ( Edited 2016-06-12 22:12)

Really nice work! Feels great to control.

I think you don't need much advice.

One small problem, you can still move when "digging" button is pressed.

Keep going!

P#22786 2016-06-12 19:41 ( Edited 2016-06-12 23:41)

Also, I don't think you're going to run out of sprite space, but you can shave off some of your left and right facing sprites by using the horizontal flip flag on the spr() function.

P#22845 2016-06-13 16:53 ( Edited 2016-06-13 20:53)

Hi HotSoup - yes and I'm already doing it in version .5 - Thanks

@matt - thanks, I didn't noticed - another challenge added to the TODO list

P#22848 2016-06-13 17:20 ( Edited 2016-06-13 21:20)

Looking great, can't wait till the digging is working =)

One thing I noticed, when you walk right off a ledge you fall slightly left of where you should. Need to lock it to the grid.

P#22864 2016-06-13 22:25 ( Edited 2016-06-14 02:25)

yep ! I read a good paper on this matter a couple of days ago and realized I need to extend the character mouvement so its always stopping at the center of a tile and 'ready' to dig the left or right, climb, etc.. : http://higherorderfun.com/blog/2012/05/20/the-guide-to-implementing-2d-platformers/

P#22866 2016-06-14 03:44 ( Edited 2016-06-14 07:44)

I love the original game, so good luck! \o/

P#23053 2016-06-17 06:55 ( Edited 2016-06-17 10:55)

This looks fantastic! Can't wait to see it evolve. It's inspiring me to make my own game.

P#25113 2016-07-11 16:59 ( Edited 2016-07-11 20:59)

Will it be X and O buttons to dig left or right? Or will it be x+arrows? (If it were only X then O could be used for ITEMS)

P#25127 2016-07-11 22:30 ( Edited 2016-07-12 02:30)

You could simply snap the character to the grid (or half grid) with the dig button by player.x=/4 (or 8).

I like where this is going, too. One of my down-the-road-a-long-ways project was kind of like a world-roaming version of this with some other factors. Kind of like LR meets Terraria? If I can make that work. I have a lot of dev learning to go before I get to that point, though.

P#25164 2016-07-12 12:39 ( Edited 2016-07-12 16:39)

Simply amazing! Really looking forward to seeing this game evolve!

P#26179 2016-07-30 18:56 ( Edited 2016-07-30 22:56)

What's the current status?

P#43641 2017-08-26 11:42 ( Edited 2017-08-26 15:42)

Saccharine, really nice job on the tiles. Are you ok if I use some of your artwork for my Lode Runner version?

P#85759 2020-12-25 04:17

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-28 08:46:47 | 0.021s | Q:58