Log In  
Follow
andylatham82
SHOW MORE

Pico-8 on Linux is having problems in full screen mode. When launching full screen, 3 out of 4 times the screen flashes and the programs sits in the background, but can't be accessed and has to be killed. The same thing happens when switching from windowed to full screen mode. Everything works fine in windowed mode.

It seems like this was a problem back in 2016, but was reported fixed. However I am experiencing this in 2021 on Ubuntu with the Xfce desktop environment.

P#86801 2021-01-26 11:08

SHOW MORE

Cart #blackdeath-1 | 2019-10-17 | Code ▽ | Embed ▽ | No License
13

Hello!

I'd like to present a little game I made called Black Death. It's an action game in which you play as The Plague. You have infected a rat and your goal is to kill all of the villagers with your putrid bite.

However your rat only has limited health. You must maintain your ability to infect the villagers by transferring yourself to other rats.

Beware the attacks of the villagers. They will try to kill you. Use the rat holes if you must.

Watch out for The Doctor. Though he will not harm you, his goal is to heal infected villagers. Ensure that he cannot reach them before the infection has had time to kill them.

Control your rat with the arrow keys. Bite by touching a villager or rat with your nose. If a villager touches you on any other side then you will be hit.

I hope you enjoy the game!

P#68925 2019-10-16 07:42 ( Edited 2019-10-17 07:11)

SHOW MORE

Cart #bouncingballs-0 | 2019-09-23 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

Not really anything special, just an old physics experiment.

P#68022 2019-09-23 06:49

SHOW MORE

Cart #bezierball-3 | 2019-03-22 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
5

Edit: Above is a new version with better collision. Many thanks to @bridgs

Original below:

Cart #bezierball-0 | 2019-03-22 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
5

Hello! I recently created a [bezier curve.] https://www.lexaloffle.com/bbs/?pid=62928#p

I decided to see if I could make a ball interact with it, and it turns out I can! It's not perfect - it's possible for the ball to move through the curve in certain circumstances. I think my collision detection needs to be more robust.

P#62950 2019-03-22 09:12 ( Edited 2019-03-22 14:34)

SHOW MORE

Cart #bezier-0 | 2019-03-21 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3

Hello! I knocked this up in a few hours and I hope it's useful to someone. It draws a bezier curve based on the positions of four points: a start and end point, and two bezier handles.

The user can move any of the four points around by using Z to cycle between them and the arrow keys to move.

I have wrapped up the bezier into a single object so hopefully it should be easy to re-purpose.

P#62928 2019-03-21 08:32 ( Edited 2019-03-21 08:32)

SHOW MORE

Hi,

I'd like to create a top-down adventure game with a map that will exceed the dimensions of the map editor, so I'd need to create and store the map by other methods. The problem is that I'm a bit clueless about how to best go about this and wondered if anyone could send me down the right path.

I'm guessing that I'd basically have to store the map in an array (well a table). Does anyone have any experience with doing this kind of thing?

Thanks!

P#26367 2016-08-03 06:32 ( Edited 2016-08-03 16:48)

SHOW MORE

Cart #26324 | 2016-08-02 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Hi!

I'm trying to make a reusable platform game engine in the style of Super Mario Bros or Sonic the Hedgehog etc. I've just finished putting something together and I'd love to get any opinions on how it feels or ways to make it better. The graphics are extremely basic because I'm just focusing on the mechanics for now.

My biggest problem with it is in making jumping through platforms feel nice. Currently if the bottom of the player is intersecting a floor tile, the player is moved above it to stand on it. However this results in the player being put up on a platform when it doesn't feel like he should be. I'd like to make it so that a platform is only detected when the player's feet just slightly intersect it by up to half a tile.

Controls:
Arrow keys to move
"Z" key to jump

Features:
-Horizontal and vertical acceleration
-Friction
-Gravity
-Capped speeds
-Floor detection
-Variable jump height based on length of time button is held
-Variable jump height based on horizontal speed of player at time of jump

It seems to run slower in a browser than in Pico-8. My code isn't currently very efficient, perhaps that's the reason.

P#26325 2016-08-02 11:01 ( Edited 2016-08-19 10:51)

SHOW MORE

Hi,

I'm trying to put together the physics of a classic platform game in Pico-8. I want to achieve something that behaves like Super Mario Bros.

I have coded a jump system where when the player presses jump, the character rises by a set number of pixels each frame, with that number decreasing every frame, so the character slows down as he gets to the top of his jump. This works well, but I run into problems when I try to implement a variable jump. Like Mario, I'd like my character's jump height to depend on how long the jump button is held down. I did achieve this simply by cancelling the vertical climb when the button is released, but this means that the jump doesn't slow to a halt unless the button is held long enough to see the full jump.

I suspect I'm going about the whole thing in the wrong way and wondered if someone can tell me how the guys at Nintendo did it with Mario. I'm sure there are lots of ways of achieving something similar, but I'd like to know how it was achieved on the NES if possible as I'm as interested in the technique as I am in the end result.

Some Googling suggests that the best method to use is by setting up forces acting on the character. Is this how it would have been accomplished back in the 1980s?

Thanks for any help! :)

Andy

P#26259 2016-08-01 08:44 ( Edited 2016-08-02 14:06)

SHOW MORE

Hi, I've been looking through the Pico-8 manual, and found this:

The bottom half of the spritesheet and bottom half of the map occupy the same memory.

What uses can this have? I can't really think of anything personally but there must be some.

P#25610 2016-07-20 09:03 ( Edited 2016-07-20 13:58)

SHOW MORE


I made this bit of code for creating a parallax effect for side-scrolling games. It uses three layers of infinitely repeating maps. I've set it up so that all the code is in a self-contained section that can be copied and pasted below your own code, with just an initialise, update and draw function needing to be called from the respective functions in your game.

More complete instructions can be found in the header of the code.

I hope somebody finds it useful!

:)

P#25598 2016-07-20 04:33 ( Edited 2016-07-20 13:42)

SHOW MORE

Cart #25546 | 2016-07-19 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

Hi,

I'm a bit of a beginner where programming is concerned, but I'm trying to work out how best to create an infinite scrolling background for a side-scrolling shooter game.

I figured that the way to achieve this would be to make a screen full of sprites and move them to the left, deleting them once they are off the screen and replacing them with new sprites on the right. I have managed to achieve this, but I don't think the performance is that great. It doesn't feel very smooth.

Am I doing it the right way? Is there a better way?

Thanks for any help you guys can give!

--tile scrolling

function _init()
    tile_h={} --horizontal tile strip

    --spawn 16 tiles in strip
    for i=0,16 do
        spawn_tile(i*8,0)
    end
end

function _update()
    foreach(tile_h,update_tile)
end

function _draw()
    cls()
    for i=0,16 do
        foreach(tile_h,draw_tile)
    end
end

function update_tile(t)
    t.x-=1 --move tile to left

    --if tile off edge of screen
    if t.x<-8 then
        del(tile_h,t) --delete tile

        --add new tile to right
        spawn_tile(16*8,0)
    end
end

function spawn_tile(x,y)
    local t={}
    t.x=x
    t.y=y
    add(tile_h,t)
end

function draw_tile(t)
    --draw 16 tiles vertically
    for i=0,16 do
        spr(1,t.x,t.y+i*8)
    end
end
P#25547 2016-07-19 10:10 ( Edited 2016-07-19 18:03)

Follow Lexaloffle:          
Generated 2024-03-19 02:38:48 | 0.084s | Q:38