Log In  


Cart #53000 | 2018-05-25 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
15

The insidious rulers of Al-Sarmalabim have wronged you, and now it's time to get revenge!

Press Z to jump, press it again to smash into the ground, but careful not to fall or it's game over.
Press X to slice away at your enemies. Kill the blinking red one, but be sure to grab any loot you might find first, or you're not going to afford upgrades between levels.

Little game i made after messing with some casual dungeon random generation. No sound at all, sorry!

UPDATE: I've optimized the code enough to add a few suggestions from the comments!

15


Maaaybe a bit difficult but the gameplay really works.

Is the cover art original?
(btw, would be nice to have the ingame palette more closely match the cover art)


Agree with freds72 on the color palette.

Not immediately obvious which sprite is the player, even when you learn what the player's sprite looks like. Very easy to die before even moving. Perhaps have a visual effect on the player at startup? Even a quick shrinking or flashing circle would do. Or flash the player briefly.


I agree with Felice and freds72.


@freds72 I worried a bit about difficulty, i made it a bit harder than it should be, due to running out of tokens for an endgame, but i can tweak it if people have trouble with level 1! And yes, i drew that splash pic;

I went through a whole bunch of palettes until i got to this one, picked the grey surfaces to contrast better with the colored enemies, and the yellow buildings so they exude a kind of arabic feel, but i might mess around with it and incorporate some blues/purples. My only concern is having it read (i already think it's a bit too cluttered/hard to read)

@Felice
I agree, i ended up adding an outline to the enemies, but skipped adding it to the player due to running out of tokens. I hoped the white was enough to make it pop, but apparently not, i might optimize a bit and add that. Same goes for showing the player, but i think that's more easily doable with a bit of work!

Thanks for the feedback!


You can easily get a bunch of tokens back if you make an irnd() function to replace all the flr(rnd()) calls.

Also remember that rnd(5) can be replaced by rnd"5" because of Lua's syntactic sugars. Saves the token for the parens.


rnd’5’??? before going into these last resort solution ;) you can recover gazillions of tokens:

  • create local variables for all your loops
for i=1,#items fo
 local item=items[i]
 dosomething(item.x,item.y,...)
 — not:
 — dosomething(items[i].x,items[i].y,...)
end
...
  • create table for all your direction checks:
local corners={{-1,0},{0,0},...}
for _,c in pairs(corners) do
 check(pos.x+c[1],pos.y+c[2])
end
  • some ssget/ssget code looks like it can be factored into memset (not sure - I am on mobile right now)

Thanks for the tips! I'll definitely put a bit more time into this, now that i know how i can win back a few tokens!


Bump.


Hey! I found some time to optimize the code as per suggestions (managed to get back about 400 tokens pretty easily), and i've added the player outline and player/enemy indicator before each round!

I'm still planning to add some sound eventually. If you have a bit of time, let me know if this is an improvement!


@danmakesgame Are you sure you published an updated version?
The code is still full of duplicate lookups like:

sspr(sprites[i].x,sprites[i].y,sprites[i].length, sprites[i].height, sprites[i].posx, sprites[i].posy)

(my inner token optimizer is crying a little bit just by looking at this line :) )

Note: why can't we kill enemies when returning bullets? That would make the game a lot less brutal.


@freds72: it's definitely updated, but there's still room for improvement :D are you saying i should make a function that i'd call with something like spritedraw(sprites,i) for the occasions where i'm trying to sspr from an array of objects, or am i misunderstanding? Thanks for the feedback!

I thought i'd keep the arrows from hurting the enemies since that'd make the game too easy (encouraging the player to stay out of conflict and deflect until everything is dead), but on second thought it doesn't really make sense to have them bounce back and not do damage at all (deceiving the player); might be nice to have an upgrade available for increasing the damage of bounced projectiles, too! I'll add it to the next update for sure.


Nah, single use functions should be avoided (token wise). Simply declare a local variable instead of derefencing the array.
Ex:

for i=1,#sprites do
 — stores table elt
 local s=sprites[i]
 sspr(s.x,s.y,s.length,s.height, s.posx, s.posy)
end

Does the chameleon ring do anything?


Hey @GodFlowey, the chameleon ring shortens the range at which enemies will start firing arrows at you! Should probably make that clearer, thanks!


Would you mind if I add this to me website?


@RadioactivePizza no problem, go for it, but keep in mind i'll end up updating this some more eventually!


1

I'm catching up on PICO-8 games this week, I ran into this and it's so neat! The first couple of plays were weird, but now that I got the hang of it, it's super awesome - well done!

Questions:

  • Do power-ups stack up? Meaning, if I get two Chameleon rings or two swords, will it have an even bigger effect?
  • Does the game have an ending, or is it just like an endless high-score run?

Just asking. Thanks!


woah that title art is amazing

why do the sprites look like amoogus


@pjft they do stack up, quite a lot in fact! Sadly there's no ending, just increasing difficulty, and i never got the chance to actually make music for it; Cheers for playing!

@SandwichBlam Funnily enough i posted this game a month before among us original release date, so Battleman Towerkill is clearly the real OG; thanks for playing!


@danmakesgame yes, I ended up finding out they stack, and that it's never ending :D

It's still such an awesome game. Thank you for this!



[Please log in to post a comment]