Log In  
BBS > Lexaloffle Community Superblog
This is a combined feed of all Lexaloffle user blogs. For Lexaloffle-related news, see @zep's blog.

All | Following | PICO-8 | Voxatron | General

Cart [#mgiyamuru-1#] | Code | 2019-06-05 | License: CC4-BY-NC-SA | Embed
4

Finished my last vacation surfgame project during my current vacation. Added a nice startscreen, results, persistent highscores and polished gameplay. Entirely* made at the beach and the pool on my pocket chip device.

With nice california beach tunes from dirk aka cloudriver.org

Have fun!

*OK, not the sound. This was done later at the pc. :-)

P#65004 2019-06-05 10:55 ( Edited 2019-06-05 11:21)

Cart [#kebisufoyo-1#] | Code | 2019-06-05 | License: CC4-BY-NC-SA | Embed

Hi, this is my pico-8 debut. Brutal Quidage, freely inspired by ZX Spectrum game Fantastic Voyage.
You have to fight aggresive desease.
Control micronaut and kill everything you see.
Large blobs produces small enemies, which transform into blobs when mature.
Find shield and activate it for help with infested areas.
Do not overheat your gun.

controls:
movement - arrow
z - shoot
x - shield
hold x for map

Enjoy

P#65003 2019-06-05 10:47 ( Edited 2019-06-05 14:08)

Cart [#ls_and_bbs_stats-0#] | Code | 2019-06-05 | No License | Embed
1

This thread is intended for the sake of researching particular (and most likely undocumented) parts of PICO-8's STAT(), that @zep didn't reference in the PICO-8 manual. The cartridge above also shows a new way for PICO-8 game devs to read the root-folder cartridge list with LS() (you must be on the desktop PICO-8 and your root directory must have at least 1 cartridge).

If you, Zep, know anything about the STAT() numbers not seen in the manual, can you tell me what they are for? People have figured out these for the BBS 101~104:

  • STAT(101) -> BBS ID (nil for local carts)
  • STAT(102) -> Site name (blank string in exported HTML's, nil in desktop PICO-8 builds and exported binaries)
    People have NOT figured out:
  • STAT(103) -> Hash string of unknown encryption method (was 0 in 0.1.11g)
  • STAT(104) -> False (when will this evaluate to true or some other value?)
P#65002 2019-06-05 10:19

Cart [#hsd-2#] | Code | 2019-06-07 | License: CC4-BY-NC-SA | Embed

Hc Svnt Dracones!?

Yes, I know it's latin for "Here Be Dragons" but it's also the name of a furry-themes role-playing game currently on it's second (MUCH improved) edition, but that has a character creation system that involves some number-juggling at times as you start with an amount of XP to spend on a broad sheet of bonuses, and juggling the numbers can be taxing even for the math-inclined.

So... I re-implemented it more like a video-game skill tree, though without any deeper details of what the various parts mean yet.

Controls?

X toggles rectangles
Left/Right decrease/increase a given row
Up/Down switches between rows

Future Plans/Changelog

There's quite a few more sections I need to implement, and taken by itself this one 'screen' won't make much sense I admit; I do plan to implement most/all of HSD character creation on this tool as I have time.

Version 0.9b

Entirely back-end changes in preparation for expanding to more 'pages' to handle the other components of the character sheet, and eventually handling multiple character sheets in a single cart.

P#64996 2019-06-05 04:38 ( Edited 2019-06-07 02:09)

Cart [#laser_blast-0#] | Code | 2019-06-05 | License: CC4-BY-NC-SA | Embed
1

Note: This is a game I released June 24, 2018 for Proc Jam 2018.

Help Atom Girl defeat waves of enemies trying to stop her as she races through space. Use her ability to change into a ship and back to blast her foes into stardust.

How to play:

Directon keys: Move ship/robot around

'Z' key (O on mobile): Shoot

'X' key: Change between ship and robot form

Tips:

  • Atom Girl's ship form has a smaller hitbox, so she can dodge enemies more effectively. In addition, the lasers she shoots as a ship move quickly.

  • Atom Girl's humanoid robot form can't dodge enemies as well, but she gets a triple shot that can destroy enemy waves with ease.

  • Stay on the left or middle of the screen; otherwise, enemies are likely to surprise you.

  • Only 1 enemy and the boss can shoot at you, so take advantage of this.

  • The boss can only be hit with shots aimed at his core. Destroy the shield in front of it first to expose the vulnerable core. Destroy the core!

  • The boss has two separate attacks which he switches between. Use the ship's smaller hitbox to dodge his slower shots.
P#64992 2019-06-05 01:28 ( Edited 2019-06-05 01:30)

Cart [#party_xxx_leben_0-0#] | Code | 2019-06-04 | No License | Embed
7

This is our contribution to the Outline 2019 demoparty (See https://www.pouet.net/party.php?which=652&when=2019 for the other entries, there were other PICO-8 stuff). It's also my first ever PICO-8 cart. :-) And it's a birthday demo to @xxx!

Detailed credits and more info are on Pouet.

Thanks to @Nodepond for his pic2pico.rb script and to @kometbomb for his fadetable. Greetings to @jobe. :-)

EDIT: fixed link for Outline 2019, looks like the formatting code doesn't like having the ampersand character (&) in URLs...:(

P#64990 2019-06-04 21:27 ( Edited 2019-06-07 17:13)

Hello everyone. Today I wrote a script to swap Sprites positions without messing with the Map. Very handy to reorganise your sprite sheet. And Flags will follow. Here's how it works:

1- Make a backup

First thing first: make a backup of your p8 file!
This is important, as you can screw things up real quick if you do not pay attention.

2- Get the script

Create an empty file named "swapspr.lua" that you'll put alongside your p8 file.
Copy/paste this script to "swapspr.lua" and save it:

function swapspr(n1,n2)
    for i=0,7 do
        local p1=i*64+n1*4+448*flr(n1/16)
        local p2=i*64+n2*4+448*flr(n2/16)
        local b1,b2=peek4(p1),peek4(p2)
        poke4(p2,b1)
        poke4(p1,b2)
    end
    local f1,f2=fget(n1),fget(n2)
    fset(n1,f2)
    fset(n2,f1)
    for x=0,127 do
        for y=0,127 do
            if mget(x,y)==n1 then
                mset(x,y,n2)
            elseif mget(x,y)==n2 then
             mset(x,y,n1)
            end
        end     
    end 
    cstore(0x0000,0x0000,0x7fff)
end
---------------------

Note: the last 21 caracters "-" are important, otherwise, you'll mess the include.
See bug here: https://www.lexaloffle.com/bbs/?pid=64985#p (for @zep)

3- Prepare your p8 file

Open your p8 file and add those two line at the very begining of your code:

#include swapspr.lua
swapspr(3,6)

In this example, we are swaping positions of sprites numbers 3 and 6:

4- Run

Run your p8 file and that's it!
Your sprites position have swaped while keeping their flags:

And (magic) the Map didn't change:

5- Clean

Run this script as long as you need to swap positions.
Don't forget to remove the two lines you added at the start of your code once you have finished.

I hope this will save a lot of time for the Pico-Eighters like me that don't think about sprite order until the need to save space and tokens...

Right now, it only swaps 8x8 sprites, but that can be modified easily.

P#64987 2019-06-04 16:35 ( Edited 2019-06-04 19:15)

Cart [#cct-1#] | Code | 2019-06-05 | License: CC4-BY-NC-SA | Embed
1

Inspired by @Bibiki making Pallet town, I have made the Cerulean City
theme from Pokémon Red/Blue/Yellow.
Sprites are used from the Pokémon Yellow Demake by @illMadeCoder
Hope you enjoy!

P#64986 2019-06-04 15:29 ( Edited 2019-06-05 21:00)

Cart [#flyingtoasters-0#] | Code | 2019-06-04 | License: CC4-BY-NC-SA | Embed
3

A version of the classic "Flying Toasters" screensaver, with soothing background music.

P#64981 2019-06-04 02:50

Hi,
I have an idea-- lets say i have a voxel model with colors blue and brown. Is lUA/shader/something else
able to have the blue voxels behave/look like water and the brown like dirt? Is there another idea for this? id like the existing properties be linked to the colors of the model!! Well, keep on voxing!

P#64976 2019-06-03 19:10

If you port your PICO-8 game to any European languages other than English, you might want to include some character accents, which doesn't work by default since PICO-8 only supports ASCII characters (plus some special ones in the unused range between ASCII and ISO-8859-1).

My work here is based off of Zep's post from a couple weeks ago about Latin accent printing (by including special characters in front of plain ASCII characters to indicate accents). My code goes a step further by offering a way to save your strings with the real accent characters included, and then encode them so they can be printed properly. This way your text is a bit more readable in the source file.

I slightly modified Zep's original print function by changing the : control character to @ since I needed : in my printed text. The general rule, if you want to add new encoded characters to this system, is to pick a control character that won't be needed in the actual printed text.

FUNCTIONS:

  • print_with_accents is the modified version of Zep's Latin accent string printing function. It does not print strings with Latin accent characters. It prints strings that have been processed already by encode_accents.
  • encode_accents accepts a string and returns the "encoded" version made up of plain ASCII characters.
  • encode_table takes a table full of string values (can be nested in subtables) and converts all the strings using encode_accents. It does this in-place and doesn't return any value.

HANDLING ADDITIONAL ACCENT CHARACTERS:

A bunch of cases are included in encode_accents to cover all the standard French accents, but if you need to handle another case (like the ñ in Spanish) you can include it manually! For accents that haven't already been handled for any letters, you'll want to also include a new row in the dat table for print_with_accents

ACCOUNTING FOR SPECIAL PICO-8 CHARACTERS:

The printer generally assumes that printed characters will take up 4 pixels of horizontal space, but the special upper range PICO-8 characters (e.g. 🅾️, ❎) actually take up 8 pixels, so we have to account for this in print_with_accents. If you need to include any of those characters in your printed text, make sure to add that check in the code.

HOW TO USE FEWER TOKENS:

If you're worried about the number of tokens you would need to include encode_accents and encode_table, you can use those functions in combination with a table serializer like pico8-table-string to encode your table at build time in a separate Lua script.

function print_with_accents(str,x,y,col)
 local dat={
  ["#"] = {",",  0, 2},
  ["^"] = {"^",  0,-3},
  ["`"] = {"`", -1,-3},
  ["|"] = {",",  1,-6},
  ["@"] = {"\"", 0,-3}
 }
 local p = 1
 while p <= #str do
  local c=sub(str,p,p)
  if dat[c] then
   print(
    dat[c][1],
    x + dat[c][2],
    y + dat[c][3],
    col
   )
   p += 1
   c = sub(str,p,p)
  end
  print(c, x, y, col)
  x += 4 p += 1
  if (
   c == '🅾️' or
   c == '❎' or
   c == '♪'
  ) then
   x += 4
  end
 end
end

function encode_accents(str)
 local new_str = ""
 local i = 0
 while i <= #str do
  -- two byte compare string
  local c = sub(str,i,i+1)
  -- one byte default
  local e = sub(str,i,i)
  -- cedille ¸
  if c == "ç" then
   e="#c"
  -- aigu ˊ
  elseif c == "é" then
   e="|e"
  -- circonflexe ˆ
  elseif c == "â" then
   e="^a"
  elseif c == "ê" then
   e="^e"
  elseif c == "î" then
   e="^i"
  elseif c == "ô" then
   e="^o"
  elseif c == "û" then
   e="^u"
  -- grave ˋ
  elseif c == "à" then
   e="`a"
  elseif c == "è" then
   e="`e"
  elseif c == "ì" then
   e="`i"
  elseif c == "ò" then
   e="`o"
  elseif c == "ù" then
   e="`u"
  -- tréma ¨
  elseif c == "ë" then
   e="@e"
  elseif c == "ï" then
   e="@i"
  elseif c == "ü" then
   e='@u'
  end
  new_str=new_str..e
  if e ~= sub(str,i,i) then
    i = i + 1
  end
  i = i + 1
 end
 return new_str
end

function encode_table(table)
 for k,v in pairs(table) do
  if type(v) == "table" then
   encode_table(v)
  else
   table[k]=encode_accents(v)
  end
 end
end
P#64966 2019-06-03 03:49 ( Edited 2019-06-03 03:54)

Cart [#yajatobipu-0#] | Code | 2019-06-03 | License: CC4-BY-NC-SA | Embed
1

Break the bricks as fast you can. You are going to need fast reflexes to beat this game. Ball resets and goes after each loss. 3 losses and it is game over!

P#64965 2019-06-03 02:50

Cart [#bazikogeme-0#] | Code | 2019-06-03 | No License | Embed

P#64962 2019-06-03 01:04

Cart [#zoob-0#] | Code | 2019-06-02 | License: CC4-BY-NC-SA | Embed
7

This is a work-in-progress.

Can you get to the top?

P#64960 2019-06-02 21:30

Cart [#abduction-0#] | Code | 2019-06-02 | License: CC4-BY-NC-SA | Embed

You hail from a dairyless world, void of cheese and butter. On your quest, you come across a planet riddled with the necessary provider to bring dairy back to your planet: the cows of Earth.

Your objective is to grab as many of the cows as you can, before the Earthlings make an attempt at your life.

this is a w.i.p., I have had issues with the cows running away and the missile apparently doesn't want to follow the ship with the a.i. provided. I will continue to work on this!

P#64957 2019-06-02 18:41

So I'm new to Pico-8 and really enjoying it so far. I'm trying to get tile collisions working on a scrolling background but just can't seem to figure it out. Here's what I have so far. Any help would be appreciated. Thanks!!

Cart [#yyubogugu-0#] | Code | 2019-06-02 | No License | Embed

P#64955 2019-06-02 18:03 ( Edited 2019-06-02 22:17)

Ghost Rally

Cart [#grally-0#] | Code | 2019-06-02 | License: CC4-BY-NC-SA | Embed
20

Game

The game is a race-against-yourself rally game. It features accurate rigid body physics and car handling.
Goal is to beat yourself every lap!

Enjoy racing as in the 80's, whith over powered cars very close to the public!
tip hitting any of the lil' dudes:
[61x16]
incurs a +5s time penalty :]

warning the game is complete yet the car handling is really picky - I am releasing it as is, as I can't tweak the gameplay without breaking the physic engine :/

Controls

  • left/right: turn
  • up/down: accelerate/brake
  • c: recover (when flipping over!)

Dev Log

Source code & tools: ghost-rally

Credits:

Sound effect code: taken from @tiagosr rally game
Trifill: @p01

Physic Engine

Physic engine was started from scratch following Barraf's 'classic' paper.
I quickly dropped this version as it relied too much on numeric convergence !

The current version uses part of Randy Gaul C++ physic library and underlying principles.
The key aspect to get stable collision is to resolve impacts only for the incident face, e.g. the plane most facing the ground:

This is obviously an heavily simplified version, limited to dynamic-to-static resolution.
Randy's engine architecture relies on very few magic constants and is extremely stable (well, as long as pico numbers don't get in the way!!).

The physic engine is designed as an extension a generic 3d actor class and can easily be taken out for other games.

Car Physic

The car is modeled using a front and rear tire. Each tire has lateral and longitudinal forces, as detailed in this article: The Racing Line - Combined Tyre Forces.
Other good readings:
Car Physics for Games
Box2d Top Down Racing Game

The gif above shows forces applied to the car and their application point:

  • G force (down)
  • read tyre pushing car (with a lateral component to counter slide)
  • front tyre and turning forces (again with a lateral component)

Slip angle and slip ratio curves are defined using SFX 4 and 5 - tweak them to see effect in game!

Terrain

The game started as a terrain renderer using marching squares.
Terrain height map is 64x64, displayed as a 128x128 grid to display marching square "diamond tiles":

Textured Car

The car is textured mapped, using a custom version of @p01 trifill.
The Blender model directly references an export of the cart spritesheet.

Toolchain

The game uses my usual Blender/Python export toolchain.
A custom terrain editor is available as a pico-8 cart (contact me if needed)

P#64950 2019-06-02 14:33 ( Edited 2019-06-04 20:11)

Cart [#puzibimepu-0#] | Code | 2019-06-02 | License: CC4-BY-NC-SA | Embed

Found some time to play around with pico8 again! Here's a simple game: dodge the bullets!

P#64949 2019-06-02 12:39

Cart [#busitedawi-0#] | Code | 2019-06-02 | No License | Embed

P#64948 2019-06-02 10:38 ( Edited 2019-06-02 10:39)

Hi,

I have an issue about on-screen button doesn't work on mobile(iOS) only on itch.io website.
I did export follow the instruction on pico8 manual. Does anyone know how to fix it?

Thanks

P#64947 2019-06-02 09:11
View Older Posts
About | Contact | Updates | Terms of Use
Follow Lexaloffle:        
Generated 2019-08-22 10:13 | 0.269s | 4194k | Q:213