Log In  

BBS > Superblog
Posts: All | Following    GIFs: All | Postcarts    Off-site: Accounts

Cart #55294 | 2018-08-17 | Code ▽ | Embed ▽ | No License
7

This cart outlines a fairly simple way in which diagonal vectors can be normalized, to avoid super-fast diagonal movement. On tab 0, you can check out the normalization code, and an example of where you should drop it in your code to make it work!

Feel free to use this function in your code, or to revise the math to make a more efficient system! The movement is a little jittery, so there's definitely room for improvement!

Also ... Vector the Skateboarding Duck might feature in future games. We'll see!

7
4 comments


Cart #tomatoworm-0 | 2018-12-11 | Code ▽ | Embed ▽ | No License
24


You are the tomato worm and you are very hungry for tomatoes. Clear mind-bending puzzle levels of all tomatoes by eating them while making sure you don't get stuck in corners with your growing body.

Controls:

arrow-keys/d-pad: move the tomato worm on the grid
x: go to next level after clearing the current one
z: restart current level

Update 1.0:

  • 65 levels
  • more gameplay elements including non-ripe tomatoes
24
8 comments


Guide your character on a journey through dungeons inhabited by perilous adversaries. Solve puzzles and discover secrets to get your hands on that special kind of loot.

The game pays homage to the old isometric classics like Cadaver, Hero Quest, Darkmere etc.

-- WORK IN PROGRESS --

TO-DO:

  • Add monsters, with basic AI (wander/patrol and attack on sight)
  • Combat and damage formulas
  • If token/compressed space allows it I'll add the map feature, else it'll be kicked to the curb.
  • Player character animations (idle, walk, melee, cast spell, die)
  • Add some more props/decor if spritesheet allows it
  • Optimize
  • Optimize
  • Optimize
  • ...Optimize!

Cart #55555 | 2018-08-23 | Code ▽ | Embed ▽ | No License
24

[ Continue Reading.. ]

24
30 comments


I'm confused, didn't viewing this address:

https://www.lexaloffle.com/bbs/?cat=7

Reveal more than just this ?

Confirmed in Firefox, Opera, and Google Chrome browers. They all do not show pics of the carts, user marks, or even number of replies/comments.

6 comments


sooo i may be making a version of Bonzi Buddy for the pico-8
the image below shows my progress
the BONZI BUDDY ICON will move him back in postion
the BANANA icon will feed the purple gorilla
the MUSIC icon will make BB sing a song
and the SOUND icon will toggle the music
maybe more idk.

-ScrubSandwich

1
6 comments



crushed_title_screen3x.png

Crushed

"Crushed" is a game developed by Jon Koon and Rusty Bailey over a weekend for the game jam, Ludum Dare 42. The theme for this jam was "Running out of Space".
The game is hosted on itch.io (https://rustybailey.itch.io/crushed) and you can find the LD42 page here (https://ldjam.com/events/ludum-dare/42/crushed).

Description

Enter a cursed tower where the world has come alive and grows with every touch! Reach the top of the tower to attain the chalice and break the curse!

Instructions

  • Use the arrow keys to move.
  • Press Z or Up Arrow to jump.
  • If you get stuck, press Enter to open the pause menu and select “Restart Level”.

We would love any feedback you have! Good luck!

game_6.gif game_4.gif game_5.gif

5
3 comments



2018/08/24

Itty bitty baby update! I want to keep this weekly to make sure it gets finished before the new year:
*A small bit more structure. And ... secret object 'C' has been added.

Cart #55261 | 2018-08-16 | Code ▽ | Embed ▽ | No License
5

I said I'd upload something to do with this within the week
so here you go:

Z - Jump
X - Shoot
S - Toggle palette

A little of the framework is set. I'm going to clean things up a bit and add more features next week.

You can use the code/art here for whatever you want. The goal is to make something people can use/learn from. Fair warning that the codebase isn't great atm; expect improvements next update. The lil robot suit thing is a character I use in stuff, but you can have her cameo in a game or whatever. It's not a big deal.

Feel free to request features or leave feedback here.

5
4 comments


can someone help me?
pico8 is complaining it can't find the obj table on line 132.
it also is printing out weird traces

--objects tab
local inst={}
--obj manager
function inst.add(o,...) 
	o=copy(o)
	o.init(o,...)
	add(insts,o)
 return o
end

function inst.tick()
	for i=1, #objs do
	 o=inst[i]
	 o.tick(o) 
	end
end

function inst.draw()
	for i=1, #objs do
	 o=inst[i] 
		o.draw(o)
	end
end

--obj base
local obj = 
{
	 init = function(o)
   --team
 	 o.team=0
 	 o.weap={}
   --bars
  	o.hp=100
 		o.mp=100
 		o.ap=3
 		--stats
 		o.pwr=1
 		o.rng=1
 		o.rpd=1
 		o.nrg=1
 		o.spc=1
 		--anim
 		o.a=true
 		o.apos=0
 		o.aoff=0
 		o.askp=0
 		o.aspd=1
 		o.alen=1
 		--sprite
 		o.s=true
 		o.sobj=o        --sync object
 		o.spos=vec(0,0) --position
 		o.soff=vec(0,0) --offset
 		o.svel=vec(0,0) --velocity
 		o.sfrc=vec(1,1) --friction
 		o.smax=vec(4,4) --max speed
 		o.ssiz=vec(1,1) --size needs fix
 		o.srot=vec(1,0) --rotation
 		--hitbox
 		o.h=true
 		o.hobj=nil      --sync object
 		o.hpos=vec(0,0) --pos
 		o.hoff=vec(2,2) --offset
 		o.hvel=vec(0,0) --velocity
 		o.hfrc=vec(1,1) --friction
 		o.hmax=vec(4,4) --max speed
 		o.hsiz=vec(4,4) --size
 	 o.hrot=vec(1,0) --not implimented
	 end,

 	tick = function(o)

 		--anim
  	if a then
  	 o.aoff = wrap(o.aspd,0,o.alen)
   end

 	 --sprite
 		if s then
 	  local pos=o.sobj and o.sobj.spos or o.spos
 			local vel=o.sobj and o.sobj.svel or o.svel 
 			local frc=o.sobj and o.sobj.sfrc or o.sfrc
 		 local max=o.sobj and o.sobj.smax or o.smax
 			local rot=o.sobj and o.sobj.srot or o.srot

 		 o.svel  =vmull(vel, frc)
 	  o.spos  =vaddl(pos, vel)
    o.svel.x= mid(vel.x,-max.x,max.x)
 	  o.svel.y= mid(vel.y,-max.y,max.y)
 	  o.spos.x=wrap(pos.x, 0, 127)
 	  o.spos.y=wrap(pos.y, 8, 120)
 	 end

 	 if h then 
 	  local pos=o.hobj and o.hobj.spos or o.hpos
 			local vel=o.hobj and o.hobj.svel or o.hvel 
 			local frc=o.hobj and o.hobj.sfrc or o.hfrc
 		 local max=o.hobj and o.hobj.smax or o.hmax
 			local rot=o.hobj and o.hobj.srot or o.hrot

    o.hpos  =vaddl(pos,vel)
 		 o.hvel  =vmull(vel,frc)
    o.hvel.x= mid(vel.x,max.x,max.x)
 	  o.hvel.y= mid(vel.y,max.y,max.y)
 	  o.hpos.x=wrap(pos.x, 0, 127)
 	  o.hpos.y=wrap(pos.y, 8, 120)
 	 end
 	end,

  draw = function(o)

  	if s then
  		sprr(
  			anim(o.apos, o.aoff, o.askp),
 				o.spos.x+ldirx(vgetr(o.srot))*o.soff.x,
  			o.spos.y+ldiry(vgetr(o.srot))*o.soff.y,
  			o.ssiz.x,
  			o.ssiz.y,
  			vgetr(o.srot)
 			)
 		end
 end
}

--obj thrust
local thr=
{
	init=function(o,pos,rot,obj)
		obj.init(o)
		o.apos=32
		o.spos=pos
		o.srot=rot
		o.sobj=obj
		o.soff=vec(0,-6)
	end,

	tick=function(o)
		obj.tick(o)
	end,

	draw=function(o)
		obj.draw(o)
	end
}

--obj player
local plr = 
{
	init=function(o,pos,rot,team)
		obj.init(o)
		o.apos=32
		o.spos=pos
		o.srot=rot
		o.team=team
		o.part1=inst.add(thr, pos,rot,o)
	end,

	tick=function(o)
		obj.tick(o)
		local u=btn(2,o.team) and 0.10 or 0
 	local d=btn(3,o.team) and 0.99 or 1
	 local l=btn(0,o.team) and 2    or 0
	 local r=btn(1,o.team) and 2    or 0

	 vaddl(o.svel, u, o.tr)
  vmull(o.svel, vec(d,d))
	 vaddr(o.srot, r-l)

	 if     u==0.10 then o.part1.alen=3
	 elseif d==0.99 then o.part1.alen=1
	 else                o.part1.alen=2
	 end	 
	end,

	draw=function(o)
	 obj.draw(o)
 end
}
3 comments


Hi everyone! I know something about coding (very basics stuff) and I'm new to PICO-8.
I'm doing some tests, one of this consist in highlighting an object when the user switch between two objects.
I need some kind of switch, like: when you press 4 the first time highlight X, the second time Y, the following times switch to the other.
This is the code, sorry for bad english:

rect1_x1=5 rect1_y1=120
rect1_x2=20 rect1_y2=110

rect2_x1=5 rect2_y1=5
rect2_x2=20 rect2_y2=15

sex1=-1 sey1=-1
sex2=-1 sey2=-1

function _init()
	cls()
end

function _update()
 cls()
 if btn(4) then
 	sex1=rect2_x1-1
 	sey1=rect2_y1-1
 	sex2=rect2_x2+1
 	sey2=rect2_y2+1
 elseif btn(4) then
 	sex1=rect1_x1-1
 	sey1=rect1_y1-1
 	sex2=rect1_x2+1
 	sey2=rect1_y2+1
  else end
end

function _draw()

	--background-----------
	rectfill(0,0,127,127,1)

	--select---------------
	rectfill(sex1,sey1,
										sex2,sey2,10)

 --1--------------------
	rectfill(rect1_x1,rect1_y1,
										rect1_x2,rect1_y2,8)

	--2--------------------
		rectfill(rect2_x1,rect2_y1,
										rect2_x2,rect2_y2,8)
end 
1 comment


I've been looking for a coding project to fiddle with on the go. Discovered that as a Voxotron owner I also own Pico-8, which was a generous bonus (ありがとうございます!)I use a Surface Pro 2017, and the lightweight nature of Pico-8 is perfect for this tablet size with the on-screen keyboard. However there are a few points that need addressing:

  1. On-screen keyboard arrows don't work. (hoping someone can confirm? Makes the editor a drag to use)
  2. Headphones are ignored. All other apps play sound through headphones but Pico-8 forces everything through the Surface Pro speaker. See below.
  3. Touch to interact with the editor window requires a double-tap where a single mouse click works. Basically the touch input just doesn't feel natural, as when changing toolsets or positioning the text editing cursor.

Hoping that there are API abstractions on Windows platform that can be adopted for "get touch support for free!" (he said, understanding that nothing is ever so simple)

東京に住んでいるので、そろそろピコピコカフェに行くつもりです!
素晴らしいアプリを作って大変ありがたいです。

2 comments


Hey,
I finally managed to tie all the loose ends together in my Outrun-esque racer. There's only one route, but the controls have some nuance which should make for healthy competition.

I know very little about 3D and projection and stuff, so most of the tech is from this excellent article:
https://codeincomplete.com/posts/javascript-racer/

Have fun! And what's your best time?

Cart #55231 | 2018-08-16 | Code ▽ | Embed ▽ | No License
110

110
26 comments


I noticed that if there is a file named "splash.png" in PICO-8’s directory, it will be displayed at launch before the boot sequence. This also works with cartridges exported as binary.

1
20 comments


by
Cart #55227 | 2018-08-16 | Code ▽ | Embed ▽ | No License


Hi all,
I finally found the time to tie together all the loose ends in my Outrun-esqe racer. It is just a single level, but there's some nuances in the controls which should make for health competition!

What's your best time?

0 comments


Cart #55225 | 2018-08-16 | Code ▽ | Embed ▽ | No License
1

Just testing out some sprite art that I made. Don't look directly at the code without personal protective equipment.

1
0 comments


EDITED 2/14/2020

I came up with several functions that I think would go good in pico8 and would reduce file size for larger games

--math

function ldx(d,l)  --stands for lengthdirx
    return cos(d)* l or 1
end
function ldy(d,l) --stands for lengthdiry 
    return sin(d)* l or 1
end
function ptl(x1,y1,x2,y2) --stands for point length
    return sqrt(((y2-y1)^2)+((x2-x1)^2))
end
function ptd(x1,y1,x2,y2) --stands for point direction
    return atan2(y2-y1,x2-x1)
end
function wrp(v,l,h) -- stands for wrap
    local o=v
    while(o < l) o += (h-l)
    while(o > h) o -= (h-l)
    return o
end
function rng(v, l1, h1, l2, h2) -- stands for range
    return l2 + (v - l1) * (h2 - l2) / (h1 - l1)
end

--vectors

function vec(vx,vy) --stands vector
	local m=

[ [size=16][color=#ffaabb] [ Continue Reading.. ] [/color][/size] ](/bbs/?pid=55218#p)
6 comments


Cart #55423 | 2018-08-20 | Code ▽ | Embed ▽ | No License
2

I'm going to call this the beta version, I'll show it at the boston indies showcase tonight and hopefully catch whatever bugs might be left.

Cart #55418 | 2018-08-20 | Code ▽ | Embed ▽ | No License
2

Most certainly the last iteration before release.

Cart #55364 | 2018-08-18 | Code ▽ | Embed ▽ | No License
2

[ Continue Reading.. ]

2
9 comments


how to create smoth gridmovement for player?so he smoothly moved to the side of the grid cell?

6 comments


Cart #55986 | 2018-09-01 | Code ▽ | Embed ▽ | No License
34

Cart #55673 | 2018-08-25 | Code ▽ | Embed ▽ | No License
34

Cart #55556 | 2018-08-23 | Code ▽ | Embed ▽ | No License
34

Cart #55197 | 2018-08-15 | Code ▽ | Embed ▽ | No License
34

[ Continue Reading.. ]

34
23 comments


can someone tell me why my objs.add() function isn't working?

its supposed to let the user pass in a table or object struct and create and store a instance of it.
however it seems to overwrite the instances with the most recent call so they always get created with the last call's paramaters.

--class tab
local objs={}
local obj =
{
	 --team
	 team=0,

		--state
  state=1,
  level=0,
  timer=0,

  --stats
 	shield=100,
		energy=100,
		weapon={},

	 --tile
	 t =0, --tile
	 to=0, --tile offset
	 ts=0, --tile skip
		tw=1, --tile width
	 th=1, --tile height

		--movement
		x=0,
		y=0,
		r=0,
		v=0,
		vx=0,
		vy=0,
		vr=0,
		vv=0,
		fx=1,
		fy=1,
		fr=1,
		fv=1,
		maxvel=3,

	 --shoot
		firetimer=0,
		firedelay=4,
}

--obj manager
function objs.add(o,...)
	o=setmetatable(o or {}, {__index = obj})
	o.base = obj
	if o.init != nil then o:init(...) end
	add(objs, o)
 return o
end

function objs.tick()
	for i=1, #objs do 
	 o=objs[i]
	 o.base:tick()
		if o.tick != nil then o:tick() end
	end
end

function objs.draw()
	for i=1, #objs do
	 o=objs[i] 
	 o.base:draw()
		if o.draw != nil then o:draw() end
	end
end

--base obj
function obj.tick(o)

	--fric
	--o.vx*=min(o.fx,1)
	--o.vy*=min(o.fy,1)
	--o.vr*=min(o.fr,1)
	--o.vv*=min(0,fv,1)

	--vx and vy
 o.vx=cos(o.r/360)*o.v
 o.vy=sin(o.r/360)*o.v
	o.vx=mid(o.vx,-o.maxvel,o.maxvel)
	o.vy=mid(o.vy,-o.maxvel,o.maxvel)

	--vel
	o.x+=o.vx
	o.y+=o.vy
	o.r+=o.vr
	o.v+=o.vv

	--wrap
	o.x=wrap(o.x, 0, 127)
	o.y=wrap(o.y, 0, 127)
end

function obj.draw(o)
 local t=o.t+(o.to*(o.ts+1))
	sprr(t,o.x,o.y,o.tw,o.th,o.r)
	--rint(o.x..", "..o.y,63,63,7)
end
1 comment


Inspired by watching tutorials from Bridgs, MBoffin and Gruber. Scenery collision is a bit hit and miss (lol), but I'm scratching an itch with it right now. This one is 2-player only, sorry - but my goal is a bigger map and a decent single-player mode. Oh, and the next production will have a little more polish to it (including a proper 'death' animation ha ha).... and I'll learn about writing 'optimal' Lua code

Objective
Player 1 and Player 2 get to drive around one of 4 maps, blasting each other. Shots can ricochet off the mountains but will travel over water. The harder difficulty adjusts the rate of reload and your speed in relation to shots.

Cheers
Robsoft

Cart #55149 | 2018-08-14 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

6 comments




Top    Load More Posts ->