Log In  

BBS > Community Superblog
All | Following | GIFs | Off-site

Pico Tower

Office Tower Simulator

Cart #tomuhikipi-3 | 2022-01-11 | Code ▽ | Embed ▽ | No License
26

What is this

Pico Tower is a tower simulator in the vein of a scaled-down SimTower or Project Highrise.
Build offices and provide needed services to earn money. Grow your tower and unlock more features as your tower grows in height. Experiment with layouts to optimize travel times for your tower's occupants.

Tips

  • Most rooms have an entranceway indicated by a yellow doorway. When building make sure this side is rotated to be accessible.
  • If a meeple is travelling, they aren't making money! Optimize travel times to make sure offices stay profitable.
  • If a meeple cannot find a nearby service they will eventually leave the building to meet their need elsewhere.

[ Continue Reading.. ]

26
5 comments


tl;dr

In the pico8 console, run load #prof, then edit the last tab with some code you want to measure:

prof(function(x)
  local _=sqrt(x)   -- code to measure
end,function(x)
  local _=x^0.5     -- some other code to measure
end,{ locals={9} }) -- "locals" (optional) are passed in as args

Run the cart: it will tell you exactly how many cycles it takes to run each code snippet.


what is this?

The wiki is helpful to look up CPU costs for various bits of code, but I often prefer to directly compare two larger snippets of code against each other. (plus, the wiki can get out of date sometimes)

For the curious, here's how I'm able to calculate exact cycle counts
(essentially, I run the code many times and compare it against running nothing many times, using stat(1) and stat(2) for timing)

-- slightly simplified from the version in the cart
function profile_one(func)
  local n = 0x1000

  -- we want to type
  --   local m = 0x80_0000/n
  -- but 8𝘮𝘩z is too large a number to handle in pico-8,
  -- so we do (0x80_0000>>16)/(n>>16) instead
  -- (n is always an integer, so n>>16 won't lose any bits)
  local m = 0x80/(n>>16)

  -- given three timestamps (pre-calibration, middle, post-measurement),
  --   calculate how many more 𝘤𝘱𝘶 cycles func() took compared to noop()
  -- derivation:
  --   𝘵 := ((t2-t1)-(t1-t0))/n (frames)
  --     this is the extra time for each func call, compared to noop
  --     this is measured in #-of-frames (at 30fps) -- it will be a small fraction for most ops
  --   𝘧 := 1/30 (seconds/frame)
  --     this is just the framerate that the tests run at, not the framerate of your game
  --     can get this programmatically with stat(8) if you really wanted to
  --   𝘮 := 256*256*128 = 8𝘮𝘩z (cycles/second)
  --     (𝘱𝘪𝘤𝘰-8 runs at 8𝘮𝘩z; see https://www.lexaloffle.com/dl/docs/pico-8_manual.html#CPU)
  --   cycles := 𝘵 frames * 𝘧 seconds/frame * 𝘮 cycles/second
  -- optimization / working around pico-8's fixed point numbers:
  --   𝘵2 := 𝘵*n = (t2-t1)-(t1-t0)
  --   𝘮2 := 𝘮/n := m (e.g. when n is 0x1000, m is 0x800)
  --   cycles := 𝘵2*𝘮2*𝘧
  local function cycles(t0,t1,t2) return ((t2-t1)-(t1-t0))*m/30 end

  local noop=function() end -- this must be local, because func is local
  flip()
  local atot,asys=stat(1),stat(2)
  for i=1,n do noop() end -- calibrate
  local btot,bsys=stat(1),stat(2)
  for i=1,n do func() end -- measure
  local ctot,csys=stat(1),stat(2)

  -- gather results
  local tot=cycles(atot,btot,ctot)
  local sys=cycles(asys,bsys,csys)
  return {
    lua=tot-sys,
    sys=sys,
    total=tot,
  }
end

[ Continue Reading.. ]

15
3 comments


Cart #sidijafizo-1 | 2022-01-11 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
5


Hello and thank you for taking you time to look at this post. Please try out my first little game. Be gentle lol. it's just a day at the park with my dog Zelda playing fetch.

5
8 comments


Cart #map_col142-0 | 2022-01-10 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
8


This is an open-source cartridge/engine with map collision, player movement, and map scrolling. (206 tokens in total)

8
8 comments


Cart #duwifisora-0 | 2022-01-10 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3

3
1 comment


Cart #tipapeks-0 | 2022-01-10 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

1
0 comments


One post, two topics -- but I figured they are mildly related here since it's really up to zep in both cases :D

I know it's a long shot, but is there any chance of getting a port of PICO-8 to MIPS? Specifically, I want to be able to use my Abernic RG280V to play PICO-8 games on the Adam image (https://www.youtube.com/watch?v=kdIdiQ-dO_Y).

Second topic. Is official Apple Silicon (aka ARM64) support on the roadmap for the Mac version? I know the Intel version runs just fine under Rosetta, but there is still downsides to running Intel code on these machines, like additional memory and battery usage. Plus it future proofs things a little for the eventual (still years away) removal of Rosetta by Apple in a future OS update.

7
4 comments


Cart #midarodafe-0 | 2022-01-10 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

1 comment


Cart #aerialrave1_10_22-0 | 2022-01-10 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
5

Second work in progress release based on user feedback.

Score, style meter, deathscreen with results and office practice room added.
Killfloor rises much slower, rising faster based on your level
Filling boost is made consistent, takes about 5 kills (fountains count as half)

Style rank adds power to your boost! The higher your rank the higher you fly!

[[z,x, and arrow keys to control
double jump recharges with time
double tap and hold direction to stinger attack
You can walljump (though not for much height)
hold up or hold down to do different attacks. Up attacking a stunned enemy gives you height!
Hold x while doing down attack to keep it active. Doing this on a stunned enemy stops this from canceling.

[ Continue Reading.. ]

5
8 comments


Cart #to_infinity-0 | 2022-01-09 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
4

TO LOAD THIS CART in immediate mode, type: load #to_infinity

Written using 5 Pico-8 commands, see code.

Back when i was writing S2 (scenario rpgmaker 2), I wanted to have that cool neat zoom effect like you get on the SNES and more modern RPGs when you enter combat, you know, where the screen would blur and rotate and zoom forward.

At the time I was working in GFA for windows 3.1 and was told it could not be done, that it would require me to grab every pixel on the screen, calculate their point outward, then redraw them.

And yeah the first time I attempted that it was terribly slow and not even that pretty.

[ Continue Reading.. ]

4
0 comments



c-base - drink all the mate

my very first and very simple club-mate drinking game :D

footage

story

you are a nerd that needs all the club-mate they can get
every step drains your energy but club-mate can refill it
when you finished all the bottles you win
if you have no energy left and also no mate you loose

controls

you start the game with X

just walk over the club-mate bottles to drink them
and replenish your energy

why?

i just wanted to draw the c-base hackerspace logo in pico-8.
then i thought, ok what game could i write?
so i thought of c-base and whats there a lot. It's nerds and mate.
so story found, you are a nerd in a nice dark hoodie on the search for
all the club-mate in c-base.

resources used

[ Continue Reading.. ]

0 comments


A basic example of how to do alpha masking with multiple masks (or light sources) that can intersect each other.

Cart #alphamask-0 | 2022-01-09 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

1
0 comments


I was wondering its fair making the developer kit paid but why splore? Its actually a better version of the cartridge list on browser so why make it exclusive to the dev kit?

13 comments


Hello everyone,

I am working on some test code for a game idea and it involved picking up one object at a time. Now my code functions properly for the most part but for some reason the p.detect won't trigger for the key but it will for the gun. And the key can't be placed on top of the gun (correct) but the gun can be placed on top of the key (not meant to happen).

If someone wouldn't mind taking a look for me, most of the code I'm currently working with in is the objects functions and the player functions.

The boolean values are:

p.detect
p.held
key.detect
key.held
gun.detect
gun.held

Cart #yonezijiko-0 | 2022-01-09 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

2 comments


Cart #jabbergranny-0 | 2022-01-09 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

Made in three days for the "one-game a week" course Playing with Games, at the Cologne Game Lab's Master of Art in Game Development and Research.

Astrid Busch & Marcel Pace

2
0 comments


Cart #horse_race-1 | 2022-01-09 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
2

Horse_Race 0.2

Just testing Pico-8 development.

Simple horse race game. Nothing to control just guess which horse will win the race.

2
1 comment



Cart #aerialravewip1_9_22-0 | 2022-01-09 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

z,x, and arrow keys to control
double jump recharges with time
double tap and hold direction to stinger attack
You can walljump (though not for much height)
hold up or hold down to do different attacks. Up attacking a stunned enemy gives you height!
Hold x while doing down attack to keep it active. Doing this on a stunned enemy stops this from canceling.
if you do one of the hold button attacks on a stunned enemy (when they flash) it does something different
Normal slashes are best for causing stuns
hold z to use super jump when red bar is filled
Fill the bar with kills (The fountains count! Downslash kills give the most bar!)
please lmk what you think any issues etc!

4 comments


Cart #shmupengineprototype01-0 | 2022-01-09 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3

Hey all,

I've built a shoot-em-up game engine inspired by Tyrian, a classic of the genre released for MS-DOS in 1995. I'm stuck for now on my lack of artistic skill for graphics, art, a title screen, a menu...

I'm a fan of declarative programming, so I've gone pretty far down that path. The base implementations of ships, guns, and bullets handle clamping to the screen space, autoscrolling, acceleration + momentum + drag, damage, regenerating shields, limited power from a generator (which your weapons and shields both draw from), moving in straight lines (for bullets), limited ammo (optional), and poorly-animated explosions.

I've implemented powerups for recovering health and switching weapons. Weapons can have limited ammo.

[ Continue Reading.. ]

3
2 comments


Cart #nusudeteju-3 | 2022-01-23 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
6

First milestone for a battleship game. Everything is functioning, but lots left to do.

Currently there's still no AI, sound, artwork... though I've already learned a lot with this project. I figured out how to set up an external editor, do some basic logging, and how pallet changing works.

Next up is the AI, which is definitely an area I'm more comfortable with, though I'm sure I'll find some challenges anyways!


Updates:

  • Added a simple AI
6
3 comments




Top    Load More Posts ->