Log In  
Follow
btco

Working on a simple desktop-based PICO-8 IDE for Windows/Linux/MacOS. Features: syntax highlighting, code overview, reads/writes the P8 file format, copy/paste sprites directly to system clipboard for easy interop, large map editor.

What other features would you enjoy in a desktop IDE?

3 comments



Cart #53250 | 2018-06-04 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
7

This is a short snippet showing how the water reflection effect is implemented in Pilot8.

Here is the code:

local g_rnd=nil
local g_clk=0

function _init()
 init_rnd()
end

function init_rnd()
 g_rnd={}
 for i=1,64 do
  add(g_rnd,flr(rnd(32)))
 end
end

function _update()
 g_clk+=1
end

function render_water(water_y)
 local addr_w=0x6000+64*water_y
 local addr_r=addr_w
 local rip_c=0x11
 memset(addr_w,rip_c,64)
 for y=water_y+1,127 do
  addr_w+=64
  addr_r-=(y%2)*64
  local offset=1+(flr(g_clk/4)+y)%#g_rnd
  local prand=g_rnd[offset]
  if 0~=band(prand,30) then
   memcpy(addr_w,addr_r+prand%2*64,64)
  else
   memset(addr_w,rip_c,64)
  end
 end
end

function _draw()
 cls(0)
 map(0,0)
 print("pilot8 water effect",
   band(g_clk,127),88,7)
 render_water(96)
end

[ Continue Reading.. ]

7
0 comments



Cart #53240 | 2018-06-03 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
21

UPDATE: Version 1.1:

  • faster ship
  • constant enemy spawns (no delays)
  • muzzle flash effect and better explosions
  • other gameplay tweaks

STORY: Welcome, Pilot 8. You are our top choice for this mission. I mean, 8th choice. Nothing suspicious at all happened to the other 7 pilots that came before you. They... uh... retired. Anyway, here is your comprehensive battle training: use the arrows to move, press [Z] to shoot. End of comprehensive training. Off to war you go. Good luck, Pilot 8.... Ok, that pilot is hopeless, let's start training Pilot 9. Oh, what? It's still on? How do I turn this off <click>

This is a simple space shooter.

  • 18 levels across 6 worlds (Flood City, Oasis, Marshes, Coast, Canals, Fortress)
  • Different weapons and powerups (shield, weapons, etc).
  • Collect chips dropped by enemies to upgrade your ship. 14 upgrades available:
    • extra speed
    • rapid fire (3 levels)
    • ammo capacity (3 levels)
    • shield (3 levels)
    • starting laser
    • powerup frequency
  • World map

Tech aspects:

  • Dynamic lighting (via framebuffer post-processing).
  • Screen-space reflection (water effect, lightning, etc).
  • Particle effects, rain, etc.
21
27 comments