Log In  
Follow
Nenga
[ :: Read More :: ]

____ SPACE ROGUE! ____

UPDATE 1.2:

-- increased bullet starting speed & slightly decreased amount of cooldown per upgrade
-- slightly decreased starting bomb cooldown
-- decreased XP gems movement

Small little tweaks to the game play to make it more engaging & a bit more fast paced. Hope you guys enjoy!!!!

Embark on a mission to destroy the enemy aliens!!!!!

Upgrade your ships weapons as you power up in this Space Invader/Roguelike mash-up!

How many enemies can you defeat before re-upgrading your ship?

Cart #spacerogue_2324-3 | 2024-04-23 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
8

P#146180 2024-04-09 17:07 ( Edited 2024-04-24 16:34)

[ :: Read More :: ]

So I've created this code to make walking animations:

if plr.walking then
  if time()-plr.anim>.1 then
   plr.anim=time()
   plr.sp+=1
   if plr.sp>5 then
    plr.sp=2

also added this for idle sprite:

if not plr.walking then
 plr.sp=1

However I can't figure out a way to change the sprite to the upward/downward movement sprites (spr 6-9, sprite 10-13) without having the code overwirte the plr.sp eachframe

if plr.upmove then
 plr.sp=6
 #Do anim function

as far as I've gotten is making the sprite change to the correct movement sprite and then have it iterate back to the idle animation or animate to the very next frame and revert back to the first forward sprite

P#106452 2022-02-06 19:10

[ :: Read More :: ]

Hello!
I've started learning how to do some programming with Pico-8 and am following a youtube tutorial (https://www.youtube.com/watch?v=T9z6RPvyypE)

I've been typing the same code more or less and have encountered a problem with wall collision.

It seems that my player character will move through certain tiles I've flagged as walls and there are also invisible walls on tiles that are not flagged at all.

code for collision:

function is_tile(tile_type,x,y)
tile=mget(x,y)
has_flag=fget(tile,tile_type)
return has_flag
end

function can_move(x,y)
return not is_tile(wall,x,y)
end

and the code for player movement/wall detection:

function move_player()
newx=plr.x
newy=plr.y

if (btnp(⬅️)) newx-=1
if (btnp(➡️)) newx+=1
if (btnp(⬆️)) newy-=1
if (btnp(⬇️)) newy+=1

if (can_move(newx,newy)) then
    plr.x=mid(0,newx,127)
    plr.y=mid(0,newy,63)
else
    sfx(0)
end

end

not sure this happens, the youtubers character is able to move and hit the proper tiles and I haven't changed much in my code compared to his.

P#105924 2022-01-29 21:03