Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles

tobiasvl

90
Posts
3
Topics
20
Followers
48
Following
A member registered Dec 01, 2017 · View creator page →

Creator of

Recent community posts

How did you format the source code there?

(2 edits)

Here's my other game too, Lights Out. I'm more pleased with this game as it has two modes, a title screen and a win state.

Minified:

z="lights out"poke(24364,3)::x::flip()cls()k=btnp()w={[0]="","▒","█"}f=flr
?z,12,18,stat(95)%4
?"z: classic\nx: 2000",12,32,7
if(k<9)goto x
if(k>16)w[3]="█"
b={}p=2m=0
for i=1,35 do
b[i]=i%7<2 and 0or 2
end::_::flip()cls()
?m,30,54
for i=1,35 do
j=b[i]
?w[j],i%7*8-2,6*f(i/7)+18,j*3+2
end
x=p%7*8-2y=6*f(p/7)+17rect(x-1,y,x+7,y+6,9)q=0k=btnp()h={-1,1,-7,0,7}if k>9then m+=1for i in all(h)do
o=b[p+i]
if(o and o>0)b[p+i]=o%#w+1
end
elseif k>0then q=h[f(k/2)+1]end
g=b[p+q]
if(g and g>0)p=p+q
for i=1,35 do
if(b[i]>1)goto _ end
z="you win!"goto x

Unobfuscated and commented (gist, since itch strips linebreaks):

-- title screen logo
title="lights out"
-- 64x64 resolution
poke(0x5f2c,3)
-- title screen loop
::title_screen::
-- clear screen
-- (we do it here because we
-- jump back upon winning)
flip()
cls()
-- read button input
key=btnp()
-- light values and visuals:
-- 0: no light
-- 1: light off
-- 2: red light
-- 3: green light
-- (green light only in mode
-- "lights out 2000")
lights={[0]="","▒","█"}
-- print title with color
-- alternating based on time
-- (stat(95) is current second)
print(title,12,18,stat(95)%4)
-- print menu
print("z: classic\nx: 2000",12,32,7)
-- if the button value is below
-- 16 (all values are powers of
-- two so by checking below 9
-- here we save a character),
-- including 0 (no input), we
-- just loop. 16 is the z key,
-- so if that's the case we
-- will fall through to classic
-- mode.
if (key<9) goto title_screen
-- button value 32 is x, so in
-- that case we add the green
-- light value for "2000 mode".
if (key>16) lights[3]="█"
-- initialize the board
board={}
-- start in the left corner
player=2
-- move counter
moves=0
-- initialize the 5x5 board
-- with the value 2 (red light)
-- but add a column of 0 (no
-- light) on either side to
-- avoid wrapping when toggling
for i=1,35 do
  -- if column is 1 or 7:
  if i%7<2 then
    board[i]=0
  else
    board[i]=2
  end
end
-- gameplay loop
::play::
flip()
cls()
-- move counter
print(moves,30,54)
-- print the board
for i=1,35 do
  light=board[i]
  -- a trick: each light's
  -- color can be computed from
  -- its value
  -- none: 0*3+2 = 0 (black)
  -- off: 1*3+2 = 5 (dark gray)
  -- red: 2*3+2 = 8
  -- green: 3*3+2 = 11
  light_color=light*3+2
  -- print lights in grid
  print(lights[light],i%7*8-2,6*flr(i/7)+18,light_color)
end
-- print the player's marker
x=player%7*8-2
y=6*flr(player/7)+17
rect(x-1,y,x+7,y+6,9)
-- marker movement: we find the
-- new position and see if it's
-- valid. if so, we move it.
new_player=0
key=btnp()
-- all adjacent grid indices.
-- used for movement and for
-- toggling lights. notice that
-- 0 (ie. no movement, the
-- currently marked light) is
-- in position 4 in the table.
-- this is a trick, used when
-- mapping input keys to
-- positions.
directions={-1,1,-7,0,7}
-- if the key is x or z (value
-- is 16 or 32) we toggle:
if key>9 then
  moves+=1
  -- look at all adjacent
  -- lights in all directions
  for i in all(directions) do
    light=board[player+i]
    -- if it's inside the board
    if light and light>0 then
      -- cycle light value up
      -- (use #lights here so
      -- we cover both classic
      -- and 2000 mode)
      board[player+i]=light%#lights+1
    end
  end
-- if the key is an arrow key
-- (value is 1, 2, 4 or 8):
elseif key>0 then
  -- divide the button value by
  -- two and add 1 and we get
  -- 1, 2, 3 or 5. look that up
  -- in the directions table
  -- (recall that position 4
  -- was the current light)
  new_player=directions[flr(key/2)+1]
  -- if it's inside the board
  light=board[player+new_player]
  if light and light>0 then
    -- move there
    player=player+new_player
  end
end
-- if any of the lights are
-- still on, stay in the
-- gameplay loop
for i=1,35 do
  if (board[i]>1) goto play
end
-- otherwise, set the title to
-- a congratulatory message
title="you win!"
-- and go back to the title
-- screen
goto title_screen

Really nice game! Looks and sounds awesome. I'm playing it on my EverDrive. I am, however, stuck already in room 4/5. lol.

(1 edit)

Very cool! It's a shame that it's too long, though, so I forked your gist and cut down some characters. If you don't want to use my version outright, I can tell you that it helps to use flip() and goto instead of _update() and _draw(), that you never use the variables g and q, and that you can remove several linebreaks after lines that end in parentheses. There might be more too, but it fits nicely now.

(3 edits)

Sure. Here's the original code for Patrick's Picochallenge:

poke(24364,3)x="웃"v="▥"h="▤"b={}for i=1,36 do b[i]=i%9<2 and""or"█"end for i in all{"⬆️","➡️",h,"⬅️","⬇️",v,x}do repeat f=1+flr(rnd(36))until b[f]!=""b[f]=i
if(i==x)p=f
end::_::t=btnp cls()for i=0,35 do
k=b[i+1]
?k,i%9*8,6*flr(i/9)+20,k==x and 11 or 7
end b[p]=""q=p
if(t(0))q-=1
if(t(1))q+=1
if(t(2))q-=9
if(t(3))q+=9
if(b[q]and#b[q]>0)p=q t=b[p]
if(t=="⬆️"or t==v)b[p-10]=""b[p-9]=""b[p-8]=""
if(t=="⬇️"or t==v)b[p+10]=""b[p+9]=""b[p+8]=""
if(t=="⬅️"or t==h)b[p-10]=""b[p-1]=""b[p+8]=""
if(t=="➡️"or t==h)b[p+10]=""b[p+1]=""b[p-8]=""
b[p]=x flip()goto _

My attempt at unobfuscating and commenting it (I wrote it minified from the start):

--patrick's picochallenge
--by tobiasvl
--use 64x64 resolution
poke(0x5f2c,3)
--generate a blank board of
--empty █ tiles
board={}
--the board is 7x4, but we
--represent it as a one-
--dimensional table. we also
--represent it as 36 tiles, ie
--a 9x4 grid, with two columns
--of "" on each end, so ⬅️➡️▤▥
--tiles don't wrap around when
--they destroy adjacent tiles.
for i=1,36 do
  if i%9<2 then
    --first and last column
    board[i]=""
  else
    board[i]="█"
  end
end
--populate the board with tiles
--and the player's starting tile
tiles={"⬆️","➡️","▤","⬅️","⬇️","▥","웃"}
for i in all(tiles) do
  --find a random tile which is
  --not in the "invisible" outer
  --columns
  repeat
    position=1+flr(rnd(36))
  until board[position]!=""
  board[position]=i
  --remember the player
  if (i=="웃") player=position
end
--game loop
::_::
cls()
--print the board
--here's the only obfuscation i
--left in: here i loop from
--0 to 35, instead of 1 to 36,
--because then i only need to
--do i+1 once instead of i-1
--twice.
for i=0,35 do
  local tile=board[i+1]
  --the player is green
  if tile=="웃" then
    color(11)
  else
    color(7)
  end
  --properly centering the board
  --takes up too many characters
  --so just an approximation
  print(tile,i%9*8,6*flr(i/9)+20)
end
--erase the player character
--and destroy the tile
board[player]=""
--remember the player's position
new_player=player
--move the player's position if
--an arrow key is pressed
if (btnp(⬅️)) new_player-=1
if (btnp(➡️)) new_player+=1
if (btnp(⬆️)) new_player-=9
if (btnp(⬇️)) new_player+=9
--if we're still inside the
--board proper, ie the tile isn't
--nil (outside the board) or ""
--(the border columns), make
--that the new position.
if board[new_player] and board[new_player]!="" then
  player=new_player
  tile=board[player]
end
--if the player lands on one of
--the special tiles, destroy
--adjacent tiles
if tile=="⬆️" or tile=="▥" then
  --destroy three tiles above
  board[player-10]=""
  board[player-9]=""
  board[player-8]=""
end
if tile=="⬇️" or tile=="▥" then
  --destroy three tiles below
  board[player+10]=""
  board[player+9]=""
  board[player+8]=""
end
if tile=="⬅️" or tile=="▤" then
  --destroy three tiles left
  board[player-10]=""
  board[player-1]=""
  board[player+8]=""
end
if tile=="➡️" or tile=="▤" then
  --destroy three tiles right
  board[player+10]=""
  board[player+1]=""
  board[player-8]=""
end
--put the player in the new
--(or old!) position
board[player]="웃"
--loop
flip()
goto _

Fun exercise. I actually found a bug while looking through it, so thanks for that!

The game itself is a demake of a game I made earlier this year, so it was really interesting to try to find smarter solutions than I did originally.

Edit: itch stripped out blank lines from the code for some reason, here's a gist.

(1 edit)

Thanks! Yeah, it's actually a demake of an actual puzzle game, which is also itself kind of hard to grasp at first. It doesn't help that I didn't have room to check if the random puzzle is actually solvable or not, hehe.

You should link to Minit on itch instead of Steam! https://devolverdigital.itch.io/minit

Thanks! I think maybe your mouse pointer was on the edge or outside of the window though, it's not supposed to continually scroll if you don't want it to. But that meant you found a bug where it didn't correctly notice the meteors when the mouse was outside the window, so I fixed that! My bad you didn't catch any meteors, should be easier now.

I agree. I'm probably going to make it so you don't have to catch them, just react when one is on screen. Thanks for your comment!

(1 edit)

Not a new game, but an old jam game I've been meaning to update for a while. I'll write up a devlog with the changes and link to it.

I know you're hard at work with the Defold version of this game, but it'd be awesome if the PICO-8 version got some love some time in the future too! For starters it'd be nice with a save feature, which is really easy to add. And it doesn't look like the game's on the BBS? It'd be great if you submitted it there so it can be easily found on Raspberry Pi PICO-8 devices etc :) Awesome game, looking forward to the full version!

Need for what??

I still considered this a bug, and fixed it. The mouse will be ignored as long as it doesn't move, so it doesn't re-trigger when it's untouched. Should work more intuitively now! Thanks for the report.

Awesome! Devlogs have lots of potential. I'm hoping for more ways to reach them, though. Like a devlog feed on user profiles!

I like it! Seems very inspired by Celeste. It'd be nice with a "full screen" option, because as it is I need to press F11 to make the browser full screen, and even then I don't see the entire game area because of my laptop's resolution.

(2 edits)

Hmm, what emulator are you using? That looks like what happens if the random number generator doesn't work: All the random numbers are 1! That can happen if the emulator doesn't accurately emulate the Game Boy's initial state, which I use as a seed for randomization. I recommend the emulator BGB, which gets this right, but there might be others too! And thanks :D

(2 edits)

That's very nice! I'll make sure to let you know. Although I assume you haven't made much music for an actual Game Boy game before? Or have you?? I'll keep you in mind for more general stuff though! Sound has always been the crucial missing part of my games.

The Bubble Wizard theme is great! Sounds exactly like an alchemy puzzle tune should sound like.

I'll play this when I get to a Windows computer – I wasn't able to run the LÖVE package since it's built for an older version of LÖVE (?)

Great game! The art style is awesome, although sometimes it's a little hard to see what direction I'm pointing towards. Would be cool if firing projectiles affected the ship's trajectory too, but that would probably make it an entirely different game.

Very nice! You can instantly see it's a real Game Boy game set in space, since the background isn't black. Nobody would have a completely dark background in a real Game Boy game because of the artifacts, hehe.

Would be nice if it saved the high score to SRAM so it's persistent, although the fact that it doesn't kinda makes this feel like one of the early MBC1 games, which might have been your intention,

(1 edit)

Nice graphics! I hope you'll be able to develop this further.

(Note that when I ran the game in BGB, it warned me that you're disabling the LCD outside of VBlank. Not sure if it's actually a big deal, but Nintendo claims that could damage the Game Boy hardware.)

Pretty cool! I've barely played any games in this genre, so it took a little getting used to, but it feels like a good game. The overworld could probably be a little more interesting though.

(I feel obliged to point out that the text is a fifth color)

Haha, I love it. Awesome graphics. And what a twist that ending was!

This is really hard! I'm not sure if I'm misunderstanding something, but people don't seem to shut up if I shush them, and the phones just keep ringing.  I tried to stand still to calm down too, but I don't think the spot I found was quiet enough? I just keep turning into a monster all the time.

But nice game! The graphics aren't typical Game Boy graphics, but I like the style. Making the window bigger didn't work on Linux though.

Great graphics! Love the parallax. In an improved version it would be nice if there was a timer or something, which maybe was saved a high score. Maybe even some perk if you dash through bats, although I don't know what that would be (extra lives so you can survive a crash?).

Congrats on your first game! Not the most interesting entry, but good job nonetheless.

Nice game! The heart refill option in the shop is brutally low though, haha. I need to get better.

Nice little game. A bit annoying that everything (background, spikes, grass) move and flicker while scrolling though, is there something wrong with the scaling?

Pretty hard! Good thing those orcs are so dumb.

Cool concept, but it would be nice if it was just a little bit more fleshed out. I really wanted to read all the signs! The camera is a bit annoying (it trails behind the player). But all in all a nice entry!

Yeah, I wanted to do music, but didn't learn how to do it in time!

Thanks!

Oh, well, I don't use Windows so I can't really use the .exe for anything. But I'll play it on Newgrounds then, no worries!

(2 edits)

Hey, just in case anyone else is looking for entries that are actual, bona fide Game Boy games, here are the ones I've found:


Hope I didn't miss any!

And if anyone wants to know more about Game Boy development, check out this list of resources!

Why can't you upload that to itch?

Great game! Simple gameplay idea, tough to execute, like all the best games. Love the music!

But resizing them breaks the resolution, right? I swear they have a higher pixel density than the rest. Anyway, that's nitpicking.

This really feels like it belongs on a Game Boy! Great game; idea, execution, mood, gameplay, difficulty. It only needs a persistent high score!

Man, this looks amazing. However,I just have to point out that although the game itself has the authentic Game Boy resolution of 160x144, the resolution of the text at the bottom of the screen has twice the pixel density. But dang, it looks great.

Very nice-looking. Love the thematic palette choice. Collisions are a little jittery when running/jumping into a crate, and movement in general could probably be tightened up a bit. I also noticed that the sprites that appear when the first floor tiles break aren't in the correct resolution.