Discussion

Simple Fruit Drop Game

4

TheSailor 2023-01-18 11:07 (Edited)

Hey. I've been lurking around here while learning to use Lowres NX. I have been dabbling with making games for a few months now. I've messed with Pico8 and TIC80. LowRes NX is the only one I can use on my iPad while I'm out at sea working. So when the sea is too rough to dive I end up messing with what I can learn from you guys on here.

So I have created your basic Fruit Drop type of game. I started simple as the one demonstrated by Nerdy Teachers and their Pico8 version.

After I had the basics going I started to develop it further.

I created what I have here over a few days of sitting and playing.

This is merely a working demo and is far from finished.

1 - It needs sounds and music
2 - The life system isn't working yet because I'm struggling to implement the invincibility state after taking damage
3 - The code is loose and easy for me to understand.

But anyway would love to hear what you guys think...

The idea is about a character called CHIPPY that works in a single board computer factory. The factory doesn't have great safety regulations and you've been tasked to manually catch chips falling out of the transfer bins overhead. You also have to watch out for a runaway forklift.

I have some more ideas I want to play around with but for now this is what I have.

Chippy_v3.nx | Open in app
2023-01-18 14:29

TheSailor 2023-01-18 14:35

To put it also into perspective.... This was my starting point.

Fruitdrop_boat.nx | Open in app
2023-01-18 14:35

was8bit 2023-01-18 15:53

I fixed your invincibility issue ;)

Chippy_v3ouch.nx | Open in app
2023-01-18 15:53

TheSailor 2023-01-18 15:57

Haha... Thanks. I'll check it out how you did it.


was8bit 2023-01-18 16:00 (Edited)

The issue is... HIT is always checking your player Sprite, and your code keeps updating your player sprite...

The fix was to create a state that disables your player Sprite mode and enables your "im hit" mode... so I did this...

1) added an IOUCH index counter... if IOUCH=0 this means player isn't hit and can play as normal

2) if IOUCH>0 then this means that an "ouch" Sprite is now shown and the IOUCH index is counting down

The "I'm hit" mode is activated upon player being hit.... at this point I...
1) remove player Sprite
2) add "I'm hit" Sprite
3) set IOUCH=60

I tweaked your code (where it calls to update player) so it checks IOUCH .. if it's zero, it updates player as normal (your code automatically adds player Sprite if it was previously turned off)

If IOUCH>0, the tweaked code DEC IOUCH, and then checks if IOUCH=0, if so, it removes the IOUCH Sprite....


TheSailor 2023-01-18 16:02

I thought it might be something along those lines. I appreciate the help though! Definitely makes sense when you break it down like that. Thank you


was8bit 2023-01-18 16:04

No problem.... it can get abit tricky sometimes... :)


was8bit 2023-01-18 16:04

BTW, Cool game :) LOVE the graphics :D


TheSailor 2023-01-18 16:11

I just played your edit on my phone now and it works exactly like I wanted to! Thanks man. Tonight I'll look through your code.

Ah thanks man. Appreciate it. I know it's not your normal style for Lowres though haha


was8bit 2023-01-18 17:17

No problem.... you will probably want to edit the ouch graphic ;)

... if you wanted to animate the ouch graphic, you can add code where it DEC IOUCH, and simply add code to animate the ouch Sprite there ;)


GAMELEGEND 2023-01-18 19:52

Nice art!


TheSailor 2023-01-19 06:08

@was8bit
I'll upload the edit when I get a chance. Need to wrap my head around the sounds now

@gamelegend
Thanks!


Log in to reply.