Log In  
Follow
pootie
[ :: Read More :: ]

Cart #yugiwohen-0 | 2021-12-19 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
7

This is a remake of an old Flash game I used to enjoy.
Here's an URL to the Author's Boomshine page: https://k2xl.com/#/games/boomshine

Anyway, one of the best things about the game was the music, but I struggle with the sound/music part. So, if anyone wants to create the music that would be great! Here's a working version of the game online (I'm assuming it's some kind of Flash emulator): https://www.addictinggames.com/strategy/boomshine

Also, my sound effects are pretty crappy too.

Another thing that bothers me is how much the game slows down once we reach 40 balls at the screen at a time. I've gone over everything and I've narrowed it down to the following function.

-- distance
function distance(obj1,obj2)
 return ((obj2.x-obj1.x)^2+(obj2.y-obj1.y)^2)^0.5
end

It's just finding and returning the distance between two points, but of course I have to compare every ball with every other ball so I guess it adds up. If I comment out the logic in that function (and just return a value), the slowdown doesn't occur (even at 60 balls). It looks like some pretty simple math for it to cause so much trouble.

Anyway, thanks for checking it out and any feedback would be great!

Edit: Oops, I forgot to add the score.
Edit 2: Oops, I forgot the Author's URL.

P#103061 2021-12-18 18:29 ( Edited 2021-12-19 23:32)

[ :: Read More :: ]

I'm trying to use a breadth-first search on a grid for path finding. My code works for a grid of 7x7, and just barley for 8x8, but it runs out of memory at 9x9. I was just wondering if there was a way I could do things differently to keep the memory usage down.

function grid:findpath(src,dest)

 function buildpath(node)
  local path={}
  local current=node
  while current do
   add(path,current,1)
   current=current.parent
  end
  return path
 end

 local dirs={
  {x=-1,y=0},
  {x=1,y=0},
  {x=0,y=-1},
  {x=0,y=1}
 }
 src.parent=nil
 local queue={}
 local visited={}
 for y=1,grid_size do
  local row={}
  for x=1,grid_size do
   add(row,false)
  end
  add(visited,row)
 end
 add(queue,src)
 while #queue>0 do
  local node=deli(queue,1)
  visited[node.y][node.x]=true
  if node.x==dest.x and node.y==dest.y then
   return buildpath(node)
  end
  for dir in all(dirs) do
   local new_node={
    parent=node,
    x=node.x+dir.x,
    y=node.y+dir.y
   }
   if new_node.x>0 and new_node.y>0 and new_node.x<=grid_size and new_node.y<=grid_size and visited[new_node.y][new_node.x]==false and self[new_node.y][new_node.x]==0 then
    add(queue,new_node)
   end
  end
 end
end

Thanks

P#100526 2021-11-21 05:08 ( Edited 2021-11-21 05:12)

[ :: Read More :: ]

Just the old Mastermind board game redone in PICO-8.
I got the music from Robby Duguay (Thanks Robby!): https://www.lexaloffle.com/bbs/?tid=2619

Feel free to let me know about bugs and such.

Edit: New version with bug fix and changes as per comments.

Cart #dejutunud-0 | 2021-11-03 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
8

P#99469 2021-11-01 16:35 ( Edited 2021-11-03 00:56)

[ :: Read More :: ]

I've run into the same thing on a couple of projects, so I'm wondering if I'm missing something in regards to map().

  • sprites have flags marked 0-7
  • the map command has the optional argument 'layer' that will display only sprites of a certain flag
  • the default argument for layer is 0, which mean to show everything
  • if I mark a sprite with flag 0, then using 0 as the argument will just show everything (which isn't what I want)

I think in the past I just didn't make use of flag 0 and it looks like that's what Zep did with Jelpi, but it seems odd that I can't (I think) use flag 0 as a layer argument.

Thanks

P#95240 2021-07-24 15:55 ( Edited 2021-07-24 15:55)

[ :: Read More :: ]

So, I was in love with PICO-8 while making a game, but then I ran out of tokens. So, I tried a few techniques to optimize my code but it became clear that I wasn't going to be able to fit everything I had planned. So, I just posted the game with some significant content removed.

Some people have reported bugs here and there, but when I go to fix them I end up running out of tokens just to do my debugging (i.e.adding extra keyboard input for testing purposes).

I get, and enjoyed, the idea of having strict limitations, but hitting the token limit just ruined the experience for me. Even if I could just go outside of its limitations just for the testing process, that would be great. I know it's part of the charm of PICO-8, but the token limit (at least) has kinda killed the fun for me.

Does anyone else know of any tricks for this? Does anyone else feel the same way?

Thanks.

P#80655 2020-08-11 23:02

[ :: Read More :: ]

Cart #kung_fu_demake-0 | 2020-07-16 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
22

A demake of Kung Fu for the NES. It was called "Kung Fu Master" in the arcades in the 80s.

P#79455 2020-07-16 21:32 ( Edited 2020-07-16 21:33)

[ :: Read More :: ]

I'm loving PICO-8 with one exception: I'm not crazy about Lua. I've read the Lua documentation for OOP, but the table thing is so different and I can't find examples for what I'm trying to do.

I'm almost finished something I'm working on, but the larger the program gets the more I miss being able to separate the logic into objects (the way I'm used to anyway).

Long story short, I wanted to do the following:

Entity Class:

  • x, y, width, height, speed, etc
  • function update()
  • function draw()

Player Class(that inherits from the entity class):

  • score, weapon, power, etc
  • function update(overrides but calls super function from entity)
  • function draw(same)

Enemy Class(that inherits from the entity class):

  • extra variables
  • overridden functions calling super functions Entity class

SpecialEnemy Class(that inherits from Enemy/and then from Entity obviously)

  • extra variables
  • overridden functions calling super functions from Enemy class

I hope that makes sense. It looks like Lua doesn't really have a natural way to do multiple inheritance. Anyway, does anyone have any tips for how to implement something like this? Right now, I everything is just procedural.

Thanks.

P#78962 2020-07-06 00:14