Log In  
[back to top]


Cart #mot_asteriods-1 | 2024-06-22 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
17

This game is a little demo of a 2D transformation library I put together.
I chose a simple Asteroids clone because it is a good example of rotation and scaling.
The first tab contains the game. The second tab contains the library.

The library adds commands that affect 2D drawing commands, allowing you to rotate, scale and translate output, similar to the transformation commands in HTML Canvas or the old OpenGL 1.1 matrix stack.

It affects the following Pico-8 drawing commands:

  • pset
  • line
  • rect/rectfill
  • circ/circfill
  • map
  • spr
  • sspr

Notes:

  • Be aware that spr, sspr and map are significantly slower as they all have to perform several tline calls internally.

[ Continue Reading.. ]

17
3 comments



Add an instant replay to your game!

(Shown here: OMEGA ZONE by @kometbomb)

New from the mind that brought you Instant 3D! and still hasn't apologized, Instant Replays!

Paste this snippet into the end of your game and be amazed at your new replay capabilities!!! Or it could fail completely! That's the mystery of it!!!

do
 local prev={
  _update=_update,
  _update60=_update60,
  _draw=_draw,
  btn=btn,
  btnp=btnp
 }

 local bstate,pstate,addr,isplay={},{},0x8000,false

 local function updatebtns()
  for i=0,5 do
   pstate[i]=bstate[i]
  end   
  if isplay then
   local mask=peek(addr) addr+=1
   if(mask==0xff)run()
   for i=0,5 do
    bstate[i]=mask&(1<<i)~=0
   end
  else
   local mask=0
   for i=0,5 do
    bstate[i]=prev.btn(i)

[ [size=16][color=#ffaabb] [ Continue Reading.. ] [/color][/size] ](/bbs/?pid=106415#p)
12
7 comments



Cart #mot_grandprix_editor-2 | 2021-10-09 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
15

This is the track editor for Mot's Grand Prix

I don't recommend running this in browser as you cannot save/load tracks - anything you build will be lost.
Rather download the file and run it in Pico-8 itself.

You will also need to download the main game and run it in Pico-8 in order to race on any tracks you create.

This editor requires a keyboard and mouse.

Existing tracks

You can download the tracks from the existing game from this Google Drive folder. Place them in your carts folder (next to the editor) then select "Load" from the editor hamburger menu (top right) to load them.

[ Continue Reading.. ]

15
1 comment



Cart #mot_grandprix2-0 | 2022-04-22 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
159

Title screen artwork by Marco Vale

Update: The track editor is now available here.

Update 2: Added Autodromo Nazionale di Monza circuit

Update 3: Added last two tracks (Hockenheim and Spa Francorchamps) plus championship mode. The BBS version now plays identically to the itch.io multi-cart version.

Update 4: Minor update to add some side-textures to buildings. (No more boring gray boxes.)

Step back in time to an era when folk were real folk and racecar steering wheels were real steering wheels.
Mot's Grand Prix is a pseudo 3D Formula 1 racer inspired by Grand Prix Circuit, Continental Circus and a bunch of other 80s/90s racers I've forgotten :).

[ Continue Reading.. ]

159
19 comments



Just a suggestion, but for modern controllers it would be really nice if the extra controls could be mapped like:

  • Right trigger = X
  • Left trigger = O
  • Right thumbstick = Mouse

That would allow FPS games like Poom, Sorcerer to be played like a twin stick shooter on capable input devices, without actually changing Pico-8's input model.

5
0 comments



This is a cut down version of the variable inspector I wrote a while ago. It's a bit more limited, but a lot more light weight. And there's a way to use it even if you have no tokens to spare (described below).

You use it to view Lua table variables:

  1. Run your game
  2. Press Esc to break into it
  3. Type: dinsp(variable)

Then use the mouse to expand values and scroll wheel to scroll up/down.

Code snippet follows (for some reason I can't use the code formatting tags):


poke(0x5f2d,3)cursor()pal()clip()function dadd(n,v,i,p)add(lines,{n=n,v=v,x=type(v)=="table"and"+"or" ",i=i},p) end function dexp(l,p)if l.x=="+" then for n,v in pairs(l.v) do p+=1 dadd(n,v,l.i.." ",p)end l.x="-"end end

function dinp()local x,y,b,w=stat(32),stat(33),stat(34),stat(36)line(x,y,x,y+2,10)if btnp(❎) then local i=(y-10)\6+1 local p=s+i local l=lines

[ Continue Reading.. ]

17
1 comment



This is a suggestion, not a bug obviously.

The ability to toggle on a metronome tick/beep every 4 beats in the sfx editor would be quite helpful for composing tunes.

3
2 comments



Cart #mot_sorcerer-11 | 2022-04-10 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
265

UPDATE: The dungeon generation logic has been revamped. Rooms are not always rectangular, and can often have a bit more cover (or hiding places for monsters). Also added a couple of new enemy types. Gold has been removed (I needed the extra tokens), but it didn't really do anything anyway.

Grab your magic staff and venture deep into the demon realm to defeat Bahmott and his evil servants!

Trial of the Sorcerer is a procedurally generated 3D first person shooter inspired by Wolfenstein 3D and Catacomb Abyss.

Shoot monsters, collect loot, find keys to unlock doors, and try to find the exit to the next level.
And don't forget to pickup the power crystals to level-up your magic staff along the way.

[ Continue Reading.. ]

265
39 comments



Cart #mot_crypt-1 | 2021-07-02 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
10

Still needs quite a bit of finishing off.
I'm posting it now mainly so I can play it on my phone :-)

Levels are randomly generated. Shoot monsters, collect loot, find keys to unlock doors and reach the exit.

10
6 comments



Cart #mot_formula1-4 | 2021-02-19 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
17

Strap into one of the world's fastest race cars and blast around the legendary Bronzerock circuit like it's 1988!
...or something - there's not a lot of physical or historical accuracy in this game :)

Z/X=accelerate/brake
Left/right=steering

Driving off road slows you down. Driving too fast around corners causes you to slide.

You can use the pause menu to view your last/best lap times (my best so far is 1:43.23)

This is work-in-progress, so some caveats:

  • There are no other cars yet.
  • Lots of things need tweaking/adjusting.
17
3 comments



Cart #mot_f1-0 | 2021-02-05 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
7

This is very unfinished and I wasn't planning to release this just yet, but somebody asked to play it so here it is :-)

Z/X accel/brake
Left/right to steer

Eventually there will be consequences for leaving the road and crashing into things.

7
1 comment



Cart #mot_wolf3d-3 | 2021-01-29 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
42

This isn't really a game - unless you consider it a short "Walking simulator" - it's more of a tech demo.

The engine is a basic Wolfenstein-3D like 3D engine. It has floor and ceiling textures and render reasonably sized and complex rooms at 60 frames-per-second, in a 128x96 viewport.

  • Arrow keys = move
  • X = toggle map mode

If anyone feels like something out of it, it's fairly easy to get started with (details below).


Levels are built using the map editor, using the sprites on page 1.

The bottom left sprites are walls, except the left-most one which positions a door.
The next row up is for placing objects.
The numbered circles are for placing triggers that trigger code when the player reaches them.
The gray arrows at the top are for setting the player start position and direction.

You can use the top left 124x32 tiles of the map area.

Wall textures (and door texture) are sprite tabs 2 and 3.

You can define up to 8 (including the door).

Objects are sprite tab 4.

They are always 16x16 pixels. You can define up to 16.

Objects must be defined in the "otyp" array (code tab 1):

otyp={
-- y    h   w  solid flat
 { .33,.4, .5, true},
 {-.36,.25,.25,false},
 {   0, 1, .3, true},
 { .5,.45, .7, false,true},
 {.375,.5, .7, true},
 { -.3,.4, .3, false},
 { .3,.35, .4, true},
 { .5,.45, .8, false,true},
 { .1, .8, .4, true},
 { .2, .6, .6, true}	
}
  • y = y position (-0.5 = ceiling, 0.5 = floor)
  • h = height
  • w = width
  • solid = true if object will obstruct player's movement
  • flat = true to flatten object to floor/ceiling

Floor and ceiling textures are defined at the very right of the map.

Floor and ceiling "plane types" must also be defined in code tab 1:

-- plane types
--       tex  scale height xvel yvel
pl_tile ={ 0, 0.5   }
pl_panel={ 1, 0.5   }
pl_dirt ={ 2, 0.125 }
pl_stone={ 3, 0.25  }
pl_sky  ={ 4, 7,    10,    .007,.003}
  • tex = Which "texture" to use. 0 = topmost.
  • scale = Texture scale factor.
  • height = Optional. Set the plane height, e.g. for sky textures. Otherwise defaults to floor/ceiling height.
  • xvel,yvel = Optional. Creates moving planes.

You then select the floor and ceiling planes by setting the "floor" and "roof" variables.

floor={ typ=pl_dirt,  x=0,y=0 }
roof ={ typ=pl_sky,   x=0,y=0 }

[ Continue Reading.. ]

42
16 comments



Cart #mot_flight-3 | 2020-12-14 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
22

A little arcady "flight sim" I started writing.
Buzz past randomly generated islands in a wrap-around ocean.

I will probably add stuff to blow up eventually :)

There is no throttle! Just steer with arrows.

22
5 comments



by Mot
Cart #mot_pool-23 | 2020-10-08 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
222

This is Mot's 8-Ball Pool, a little pool simulation inspired by 3D pool on the C64 and Amiga.
Shoot a round of pool against a friend, or one of the 7 different AI characters.

UI

The UI at the bottom of the screen shows how each player is progressing.
The player's name flashes when it is their turn.
The color they must sink is displayed next to their name, and the balls already sunk are displayed above.
A white ball indicates they have a free ball.

When player fouls, the reason for the foul is displayed in a scrolling message along the bottom of the screen.

[ Continue Reading.. ]

222
15 comments



[sfx]

I felt like transcribing a little tune I made in Caustic to Pico8.
Could use a bit more work (instruments, balancing, is pattern 14 off key?) but I'm happy enough with it.

9
0 comments



by Mot
Cart #mot_pool-22 | 2020-10-06 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
30

A work-in-progress 3D pool table simulation.

30
15 comments



Not sure if anyone has posted a smap() yet, but it's reasonably straightforward to implement with tline, so here's mine.

Parameters are:
cx,cy,cw,ch Specify a region in the tile map. Measured in tiles.
sx,sy,sw,sh Region on the screen to map to.
flipx,flipy Whether to flip horizontally and/or vertically.
layers Layer flags. Same as for map().

You need to supply at least the c and s parameters.

function smap(cx,cy,cw,ch,sx,sy,sw,sh,flipx,flipy,layers)

 -- negative screen sizes
 if(sw<0)flipx=not flipx sx+=sw
 if(sh<0)flipy=not flipy sy+=sh
 sw,sh=abs(sw),abs(sh)

 -- delta
 local dx,dy=cw/sw,ch/sh

 -- apply flip
 if flipx then
  cx+=cw
  dx=-dx
 end
 if flipy then
  cy+=ch
  dy=-dy
 end

 -- clip
 if(sx<0)cx-=sx*dx sx=0
 if(sy<0)cy-=sy*dy sy=0
 if(sw>128)sw=128
 if(sh>128)sh=128

 -- render with tlines
 -- pick direction that results
 -- in fewest tline calls
 if sh<sw then
  -- horizontal lines
  for y=sy,sy+sh-1 do
   tline(sx,y,sx+sw-1,y,cx,cy,dx,0,layers)
   cy+=dy
  end
 else
  -- vertical lines
  for x=sx,sx+sw-1 do
   tline(x,sy,x,sy+sh-1,cx,cy,0,dy,layers)
   cx+=dx
  end	
 end
end

[ Continue Reading.. ]

20
1 comment



Mot's Animation System

Cart #mot_animsys-2 | 2020-07-19 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
44

Mot's Animation System is a visual editor for creating 2D animations.

You start by sequencing sprites and/or tilemaps together to create the basic components. Then combine them using timelines and key-frames to make animations. Or combine them again to make bigger, more complex animations.

Animations can trigger sounds and music, and call back into to your main program, e.g. to trigger game play events.

You could use it for:

  • Character animations, like run cycles
  • Larger multi-sprite animated characters
  • Cutscenes
  • Animated birthday cards

Animations can be loaded and played in your own carts (the loading and playback code is 1836 tokens). They can either be stored in Lua strings or loaded from a separate cart.

[ Continue Reading.. ]

44
11 comments



OK, this may be a bit bonkers, but I figured out how to play Ramps with a racing wheel, with proper analogue steering and acceleration/braking.

It's a little involved and only works on Windows.

Mouse input

First, you need a version of Ramps (or whatever game you plan to play) edited to accept mouse input. Like this version:

Cart #mot_ramps_mouse-0 | 2020-06-06 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
5


WARNING: Attempting to drive with an actual mouse may cause high blood pressure and throwing things.
Also I've only tried this in PICO-8 itself - not sure if it works when running in a browser.

Joystick -> mouse

Next, you need a utility to convert game controller input to mouse movement.

[ Continue Reading.. ]

5
0 comments



I'm a bit new here, so I don't know if adding network capability has previously been discussed (?)

But it feels to me some simple UDP send/receive instructions would add some cool functionality, without adding too much complexity.

Perhaps something like:

[write message to RAM]
poke4([ip-locn],ip)
poke2([port-locn],port)
send(0x4300,length) 

Where [ip-locn],[port-locn] would be some special reserved locations for IP address and port.
UDP packets are usually small. I've seen <=512 bytes recommended in places, which easily fits into the user RAM address range.
And an IPV4 address would fit in a number variable, and would be adequate for LAN play.

Receive could be:

length=recv(0x4300,maxlength)
[read message from RAM]

Returning 0 if nothing is waiting.
It could also populate [ip-locn] with the return IP address so that replying would be straightforward.

Perhaps [port-locn] could be pre-populated with a default port number (0x1C08 ?).

[ Continue Reading.. ]

2
1 comment





Top    Load More Posts ->