I am looking to hopefully animate the title of my title screen. Are there any good tutorials that you recommend? I really love the sparkles in TRASEVOL_DOG's Mushroom Délicieux, as well as how the title moves up and down. I attempted to isolate the code for it, but I can't seem to figure all of it out. I tried referencing the 'hello' demo to animate the motion of my title too. :-/ Any help is appreciated.
Coding is in an entirely different realm than what I am used to. That being said, attempting to create a pickup item has been a bit of a nuisance. I am trying to avoid collisions and utilize tiles/sprites instead. With what I currently have, how can I impliment mget/mset to make an item disappear or even be replaced with another sprite when the player interacts with it? I have tried to mimic the 'solid_tile' format used with each btn and tried to figure out @morningtoast's method...
I am a baby learning to crawl when it comes to PICO-8. So far I have created a pickup by using a tile flag. I figure I need to add an if statement to my gameupdate(), but I can't seem to figure out how to get the sprite to disappear when the player touches it. I was also hoping to add the death sparkle particle used in Jelpi. Does anybody have the isolated code? Are there any good tutorials that can show me how to create proper collision boxes based on the sprite and not the entire tile? Thank you!
I am trying to figure out how to isolate the randomized butterfly particle that Happy Little Island uses. It is activated when the player interacts with a flagged tile. In my prototype, the flagged tile is the grass (spr(32)) and the butterfly/particle is spr(34,35). I am clearly missing something, but I can't seem to problem-solve my way through it.
Hi. I am hoping to add animated water to my game by just using a few tiles that loop. I can't seem to find any good resources for animated background elements though. I mostly just find animations for characters or interactive objects.
EDIT: I greatly appreciate all of these responses. I guess what I'm asking is how do I animate an object? Most of what I find is how to animate a player so it's generally based off of "if btn(0) then..." But I just want a standalone animated object that's constantly in loop throughout the game.
I have been tinkering with Zep's "Wall Collision Example", but I can't seem to get it to work. How can I make boundaries/walls (represented by the four pixels arranged in a square)?
UPDATE: If you are brand spankin' new to PICO-8 and need a tutorial to build walls and boundaries around your map, I highly recommend Uncle Matt on Youtube. ;-) Start here.
Okay. I have created randomly generated flashes. However, how can I make the flashes themselves into a randomly generated event? (I am trying to achieve a thunderstorm effect that roles through at random points in the gameplay.)
flash = false timer = 0 function _draw() cls() if flash then rectfill (0,0,127,127,7) end function _update() timer -= 1 if timer <= 0 then timer = 120 end if flr(rnd(100)) <= 10 then flash = true else flash = false end end end |
I am attempting to make the screen flash and shake. However, I would like it to be randomly generated. I vaguely researched the use of srand/rnd, but I ultimately do not know how to implement the proper code into what I currently have.
Warning: I have no idea what I'm doing.
player = {} player.x = 60 player.y = 60 player.sprite = 0 player.speed = 1 player.moving = false player.timer = 1 music(0) cam_x = 0 cam_y = 0 fliph = false flipv = false shake = 0 function _rand function _draw() cls() camera (cam_x,cam_y) cam_x = player.x-60 cam_y = player.y-60 map(0,0,0,0,16*8,16*2,0) --map(0,0,0,0,16,8) --map(0,0,0,64,16,8) spr (player.sprite, player.x, player.y,1,1,player.fliph,player.flipv) end function movex() player.moving = true player.sprite += 1 if player.sprite > 3 then player.sprite = 2 end end function movey() player.moving = true player.sprite += 1 if player.sprite > 5 then player.sprite = 4 end end function _update() player.moving = false if btn(0) then player.x -= player.speed movex() player.fliph = true elseif btn(1) then player.x += player.speed movex() player.fliph = false elseif btn(2) then player.y -= player.speed movey() player.flipv = true elseif btn(3) then player.y += player.speed movey() player.flipv = false end -- if not player.moving then --player.sprite = 0 -- end if not player.moving then player.timer = player.timer+1 end if player.timer >=30 then player.sprite = 1 end if player.timer >=60 then player.sprite = 0 player.timer = 0 end if player.moving then player.timer = 0 end end |
Okay. So, I am brand spankin' new to coding. I am not quite sure what the proper lingo is.
I am attempting to create a sandbox game, but I have no idea how to make it so that when players reach the edge of the playable screen, they can then continue on into a new screen. "Space Delivery!" and "Carmina's World" accomplishes this.
Please let me know if I am not articulating this properly. Any help is appreciated.
This is all of the code I currently have:
player = {} player.x = 60 player.y = 60 player.sprite = 0 player.speed = 1 player.moving = false player.timer = 1 function movex() player.moving = true player.sprite += 1 if player.sprite > 2 then player.sprite = 0 end end function movey() player.moving = true player.sprite += 1 if player.sprite > 18 then player.sprite = 16 end end function _update() player.moving = false if btn(0) then player.x -= player.speed movex() elseif btn(1) then player.x += player.speed movex() elseif btn(2) then player.y -= player.speed movey() elseif btn(3) then player.y += player.speed movey() end if not player.moving then player.sprite = 16 end if not player.moving then player.timer = player.timer+1 end if player.timer >=30 then player.sprite = 3 end if player.timer >=60 then player.sprite = 16 player.timer = 0 end if player.moving then player.timer = 0 end end function _draw() map(0,0,0,0,16,8) map(0,0,0,64,16,8) spr (player.sprite, player.x, player.y) end |
Okay. So, I am brand spankin' new to coding. I am not quite sure what the proper lingo is.
I am attempting to create a sandbox game, but I have no idea how to make it so that when players reach the edge of the playable screen, they can then continue on into a new screen. "Space Delivery!" and "Carmina's World" accomplishes this.
Please let me know if I am not articulating this properly. Any help is appreciated.