Log In  
6

Cart [#40228#] | Copy | Code | 2017-05-05 | Link
6

Just a simple little 2D-rotation example.

The function takes a 2D position (X,Y) and rotates it by ANGLE. CX,CY represents the center/pivot point.

The lines of code in the middle are the rotation matrix:

local rotx=cosa*x-sina*y
local roty=sina*x+cosa*y

This rotates a point around the origin. Before and after doing so, we offset our position by our center coordinate - this lets us rotate around any arbitrary pivot point.

For bonus points: When you're rotating lots of objects by the same angle (like a camera rotating, or a complex prop rotating), you can re-use your SINA and COSA values.

P#40230 2017-05-05 22:07

0

Cart [#36390#] | Copy | Code | 2017-01-22 | Link
0

Protect your rebbitts from the angry magician!

We made this for Global Game Jam 2017, at the Omaha, Nebraska site.

Eli Piilonen (Code/Design)
David Carney (Art/Audio)

(Instructions are in-game)

P#36365 2017-01-22 16:05

3

Cart [#35829#] | Copy | Code | 2017-01-15 | Link
3

Cart [#35825#] | Copy | Code | 2017-01-15 | Link
3

Cart [#35818#] | Copy | Code | 2017-01-15 | Link
3

Cart [#35705#] | Copy | Code | 2017-01-14 | Link
3

This is a port of my favorite mobile game, which was originally designed by Area/Code Entertainment. Zynga acquired the original version, and they promptly ruined the minimalist experience with a bunch of abrasive and irritating hooks. On top of that, all of the clones I've found have been kind of janky.

Pico8 to the rescue! I'm trying to make the very best totally-free version of Drop7. Your feedback would be greatly appreciated!

INSTRUCTIONS:

Click to drop disks.

A disk is destroyed if its number is equal to the size of the group that contains it. A "group" is a horizontal row or vertical column of adjacent disks (like Connect-4, except with no diagonals).

For example: If you have five disks in a row along the bottom of the screen, any of those disks with a "5" label will be destroyed. Vertical columns of disks work, too.

If you destroy a numbered disk while it's touching an unlabeled disk, then the unlabeled disk will take damage. If you damage an unlabeled disk twice, it will change into a random numbered disk.

After every tenth disk you drop, a row of unlabled disks will rise from the bottom of the screen.

If any disk ends up above the top of the gameplay grid, then you lose. Click anywhere to return to the main menu.


Version 1.1.1:

(Hopefully) fixed a bug causing an error when you run the game for the first time. If you get an error on first launch, try refreshing the page...and then please leave a comment saying that the bug isn't fixed yet.


Version 1.1:

Added three difficulty modes.


Version 1.0:

Lots more polish compared to the alpha version - Drop-5 and Drop-10 modes, a main menu, scene transitions, a palette selection screen, and more!

Experimenting with a feature that restricts certain unfair number spawns when an unlabeled disk pops inside a large cluster. Might make the game too easy, but then it seems like a feature that could be used for easy/training modes.


Alpha version:

A basic Drop7 clone. Will be adding extra features and such over time.

P#35706 2017-01-14 20:01

28

Cart [#32029#] | Copy | Code | 2016-10-29 | Link
28

Cart [#31931#] | Copy | Code | 2016-10-27 | Link
28

Cart [#31884#] | Copy | Code | 2016-10-26 | Link
28

Cart [#31868#] | Copy | Code | 2016-10-26 | Link
28

Cart [#31817#] | Copy | Code | 2016-10-26 | Link
28

Submit a high score screenshot in the comments to get your time and username included in the level select screen!

Version 1.0

  1. Two new levels
  2. Scene transitions
  3. Added titles for levels
  4. "Congrats" and "return to menu" messages after victory
  5. Little menu updates

Don't think I'm making any more changes to the game for a while (unless you submit a high score, in which case I'll put your time/username in the level selection screen)

Version 0.4

Various changes:

  1. Two songs and mowing sfx by David Carney/DVGMusic (we're long-time collaborators!)
  2. Two new levels
  3. Main menu renders thumbnails of level layouts
  4. Basic pause menu options (restart level + return to menu)

Feel free to post a high score image for any level in the comments - I'll put your score/username in the level selector.

Version 0.3
No gameplay changes this time, but I added a faux-3D stick figure dude to push the mower around. I like him. He's got little nubs for feet, and he sways around with the movement controls a bit.

(Also I removed that "dark pixel" thing from the spray particles, to save some performance.)

Version 0.2
Small update. Better update soon.

  1. Main menu with world record shoutout
  2. Grass is now green/yellow instead of orange/pink
  3. Round starts with the player at the bottom, timer doesn't start until you move
  4. Nicer spray particles (dark pixel added below particle position, in certain cases)
  5. Changed the title

Version 0.1
I saw "Advanced Mower Simul8or" by deKay and remembered that I've been vaguely interested in making a little lawn-mowing game for a while now. There are aspects of lawn-mowing that I think are weirdly satisfying, and I wanna capture some of those things. Pico8 feels like the perfect place for this type of stuff.

You play as Mowerman, who is a lawn mower. Mow every pixel of the lawn. There's no fancy victory announcement or startup countdown yet, but your timer locks in when you're done.

P#31819 2016-10-26 09:11

9

Cart [#31654#] | Copy | Code | 2016-10-24 | Link
9

Wanted to see if I could make a post-processing effect to distort previously-drawn screen pixels.

It works, but it's probably too slow to be practical - the much, much cooler thing here is a serendipitous glitch-art effect that happens when the screen isn't cleared between frames. Hit the Z/O key to toggle that.

The distortion effect works like this: It copies the frame buffer into the sprite sheet, then redraws a portion of the screen, pixel by pixel, by reading the sprite sheet - but it modifies the sprite lookup position for each pget() call, so you get the spherical bump when it's done.

Can anybody give me some optimization tips? I feel like there's some kinda trickery out there to make it more powerful (the demo here uses radius=26, but if I put it above 28, it drops to half-fps, at least on my laptop). If you've dealt with lots (thousands) of individual pixel draws per frame, let me know what you learned!

I tried using peek() and poke(), but it seemed like it ended up being slower than pset() for drawing pixels one-at-a-time, since the image data is packed with two pixels per byte - so they had to be separated and joined a bunch of times. Maybe there's some super-lean way to do that, which I didn't think of?

P#31656 2016-10-24 08:25

11

Cart [#31786#] | Copy | Code | 2016-10-25 | Link
11

Cart [#31527#] | Copy | Code | 2016-10-23 | Link
11

Version 2.0
Made some changes to make this thing a bit cooler:

  1. Overhauled the cloth sim so it operates in 3D now. It's projected orthographically ("just uh, ignore the z value for rendering," in this case), so there's no parallax - but even so, allowing points to move on the z-axis produces much more believable motion. I'm leaving the old version up for comparison. Particularly, the mostly-intact flags don't hold themselves upright like a rectangle made of jello anymore.

  2. Added basic "quad rendering." It draws two extra pixel-lines to connect pairs of simulation-lines. Makes it seem like the simulation is much higher-density than it actually is - score! (The cloth sim uses 7 rows with 10 particles each). For style, some of the simulation lines are now invisible (like the horizontal lines along unbroken stripe segments, and all the non-star diagonal structure lines)

  3. Added an extra prize when you win. It doesn't tell you in-game, but you can mash the "cancel" button on the victory screen to stress test it. Be careful not to hit the OK button, since that still acts as the reset button, like usual.

Version 1.0

Started messing with pico8 yesterday, and it's enough fun that I've already made three stupid doodads.

This one is, uh, sort of a game. You can win, but it's really just a clickbaity skinner box where you watch a culturally-exploitative cloth sim in various states of disrepair.

The rarest message is "GET OUT OF AMERICA." You have to mess up really bad to get it. I've literally never seen it happen, but I know that it's possible. You have to pass fewer than 40% of the line-spawn-checks (each line has a random chance to either spawn or not-spawn), but the lowest line-spawn-probability you can get for any given flag is 60%. Because of this, getting a sub-40% score is extremely rare. Maybe somebody can figure out just how rare it is.

Didn't upload the first two doodads because they weren't interactive - but here's a gif of each of them instead:

Ocean sunrise:
https://twitter.com/2DArray/status/789699736433401856

Rainy day:
https://twitter.com/2DArray/status/789940695469400064

bullshit 2darray flag cloth verlet america
P#31528 2016-10-23 05:57


:: More
X
About | Contact | Updates | Terms of Use
Follow Lexaloffle:        
Generated 2017-06-23 12:03 | 0.272s | 1835k | Q:89