I'm trying to make a game. I've been a member of these forums since 2010. I've watched countless others progress in this same time period. This is the closest I've come to making a game of my own. At most, I've finished tutorials for different game engines (Unity, Game Maker, Godot, Stencyl), which mostly consist of breakout clones.
The engine I am using for this game is PICO-8. I love restrictions when it comes to pixel art. However, the programming has led to an existential crisis on whether I even like making games or not. So far, I have tile based movement and collision programmed. A number of art assets are also done. If I had used Game Maker instead, I would most likely already be finished with this game. PICO-8 caused the idea for this game two years ago. This led to me putting the idea on hold until I was more experienced. That programming experience never came. I finally decided to stubbornly pursue this game idea after all this time. These past two weeks I've spent a lot of time fumbling through the little progress I've made on this game. The movement code and collision code are not where I want them to be, but are more functional than I thought I could achieve. However, this much would not have been possible without the help of PICO-8 forum members.
Here is a .gif of the current state of the game.I have my character animations drawn, but not yet programmed. I have most of the map drawn, but no screen transitions programmed. The gameplay has yet to be implemented, and there is no start screen. No music or sound. I'm aiming for a 5-10 minute experience. When giving advice, most recommend "starting small", and this is the smallest I could conceive of. There isn't much to explain regarding the design of the game. It is functionally a "walking simulator".
function _init()
player={}
player_x=56 --xpos
player_y=56 --ypos
--timer
frame={}
frame.count=0
end
function _update()
_timer()
local old_x=player_x
local old_y=player_y
--check if player is still moving in the same direction as last frame
if not btn(direction) then
direction=-1
end
--check if there is a new button pressed
for i=0,3 do
if btn(i) and (not btn_prev(i) or direction==-1) then
direction=i
end
end
--move player
if btn(direction) and frame.count==0 then
if direction<=1 then
player_x+=(direction-0.5)*16
else
player_y+=(direction-2.5)*16
end
end
--store current buttons
btn_ = btn()
if hitwall(player_x, player_y) then player_x=old_x end
if hitwall(player_x, player_y) then player_y=old_y end
end
function _draw()
cls()
map(0,0,0,0,16,16)
draw_player()
palt(2,true)
palt(0,false)
--print(frame.count,12,6,15)
end
function draw_player()
spr(1,player_x,player_y,2,2)
end
--check if button was pressed previously
function btn_prev(i)
return 2^i==band(2^i,btn_)
end
function _timer()
if frame.count<4 then frame.count+=1
else frame.count-=4
end
end
function hitwall(_x,_y)
if (checkspot(player_x,player_y,1)) return true
if (checkspot(player_x+15,player_y,1)) return true
if (checkspot(player_x,player_y+15,1)) return true
if (checkspot(player_x+15,player_y+15,1)) return true
--otherwise: false
return false
end
function checkspot(_x,_y,_flag)
local tilex=_x/8
local tiley=_y/8
local tile=mget(tilex,tiley)
return fget(tile,_flag)
end
This is my current codebase. I'm mostly leaving this here in case I need help. Please forgive the wacky indentations. It looks very different inside PICO-8 itself.
I believe this is my first devlog. It's sad that I've taken this long, but I'm finally here.