Log In  
Log In  
[back to top]

Hey All, I hope you had a great new year!

PICO-8 0.1.4 builds are live on the updates page and on Humble. The main features of this update are:

Friendlier Token Counting

Pairs of brackets and block deliminations now count as one token each, and local declarations do not count at all. You can now fit in around 30% more code because of this, and there is less need for odd space-saving techniques (e.g. using blah"" instead of blah()), or getting rid of local variables. It does mean you're more likely to hit the compressed code limit (use INFO to check), but I don't think this will be a problem. The raw character limit has also been increased from 32k to 64k.

Importing / Exporting Data

import() and export() can now load and save the sprite sheet: export("something.png") and sfx: export("something.wav"). These aren't very flexible yet, but in future they'll be able to do things like grabbing particular sets of sprites, or only importing into empty slots.

External Cartridge Data Access

reload() and cstore() now take an optional 4th parameter: a filename to grab the data from or store the data to. This is useful for making custom tools, or doing fancy data management. It's intended at this point mainly as a development tool, and isn't supported by the exporter or BBS player. But of course, you can do what you like with it :P

Here's Let's Karate being gradually replaced with data from Jelpi during runtime:

Changelog:

    v0.1.4

        Added: spritesheet importing and exporting with import("blah.png"), export("blah.png")
        Added: sfx exporting with export("blah%d.wav")
        Added: External cartridge parameter for reload() and cstore()
        Added: Persistent cartridge data mapped to 0x5e00
        Added: Click token limit to toggle token & char limit display
        Added: assert(), type()
        Added: P to pause
        Changed: code char limit: 64k (was 32k)
        Changed: local declarations and semicolons not counted as tokens
        Changed: Pairs of brackets and block delimitations count as one token
        Changed: Only _update() or _draw() need to exist to enter main loop
        Changed: Allow forward-slash in code editor
        Changed: info() reports current (last loaded or saved) filename
        Changed: html5 version compiled with NO_DYNAMIC_EXECUTION 
        Fixed: Shift-drag-copy sprites -> paste only pastes 1x1
        Fixed: ".." should count as one token
        Fixed: Tracker displaying D instead of .
        Fixed: Multi-line comments
        Fixed: Crash on run when code close to char limit
        Fixed: When over token limit, can not run any command
        Fixed: Unused high bits in SFX section not saved in .p8 format
        Fixed: Camera position memory mapping out of sync
        Fixed: pico8.txt link broken in windows installer
        Fixed: print() crashes when parameter is not a string or numbers
        Fixed: Multi-line strings & escape chars mess up tokenizer and print()
        Fixed: Joystick not responding when left stick is up to the left
        Fixed: Alt-F4 saves screenshot before quitting
        Fixed: Sprite editor mode button doesn't show fullscreen mode
        Fixed: -sound parameter not working in html5 version 

P#18122 2016-01-02 18:14 ( Edited 2016-02-13 18:26)

Voxatron 0.3.4 builds are live on the updates page and on Humble.

This is a quick bug-fixing update, mostly responding to issues in the 0.3.3 thread.

Changes:


v0.3.4

Changed: Super-State conditions (S-STATE) apply to all actors including ones spawned by emitters
Changed: When pasting alias, activation controller parameters are copied from the original
Improved: More robust anti-stuck-in-a-wall method
Improved: Default object properties
Improved: Config file validation
Fixed: Aliased animation inside root of pickup renders pickup uncollectable
Fixed: Base weapon doesn't change with modifier
Fixed: Legacy sword has 0 attack damage
Fixed: Room editor: spacing between objects should be taken from object definition
Fixed: Zoot's weapon switching in Chaos Arena

P#18099 2015-12-30 16:39 ( Edited 2015-12-30 21:40)

Hey All

I've been doing some spring cleaning, and updated all of the older Lexaloffle games: Neko Puzzle (which is now free), Swarm Racer, Chocolate Castle, Zen Puzzle Garden, Swarm Racer and Swarm Racer 3000. If you had any trouble running these games on newer versions of OSX or 64-bit Linux, these versions should work out of the box.

SR3K also has some new wall rendering and analogue joystick support. I've been chipping away at it very sporadically but it's on slow burn until after Voxatron is finished. An 8-track preview is available to any Lexaloffle customers.

You can find downloads on the game pages, or your updates page / Humble Library page.

User-made ZPG and Chocolate Castle puzzles are also back up with new HTML5 players. You can post puzzles by saving them to clipboard and then pasting the puzzle text into a BBS post.

P#18087 2015-12-29 12:56 ( Edited 2018-09-25 15:51)

EDIT: 0.3.3b patch is now up; if you tried 0.3.3 from a clean install and got stuck on the title menu, see this post.

Voxatron 0.3.3 builds are now up! Check your updates page for downloads, now including a native 64-bit Linux version. Builds should be up on Humble soon too (check the version number on the files).

Main new features of interest are: integrated music tracker, custom inventories, multiplayer selection and room transition logic, new microscripting events and better activation control, improved water physics. Check out cartridges in the ALPHA CARTS menu: The Jelly Room, Chaos Fortress to see some of these in action. I'll post a more complex demo of custom inventories and weapon switching soon.

Bloot (also under ALPHA CARTS) is now completely playable as a 2P-4P game, with match scoring and end-game logic completely made from microscripting. To select a player, press action once to join, and then once more to select the player (or left / right to change selection). If you want to try it out without a second human around to play with, you can join P2 and then hoist and carry them through the door to begin the game.

There's a script editor in this version (under the new NEW OBJECT fold-out menu), but it doesn't do much yet. Scripting is the last major component of Voxatron engine, and v0.3.3 contains a lot of new code to get it working -- all of the interactions between objects now run through an abstracted event layer because of this. This affected many legacy carts, and I'm still working on improving backwards compatibility.

For a top-level view of the project's progress and what's coming up, check out the new feature-wise Development Map. In the short term, check back for more demos, tutorials and documentation!

Changelog:


v0.3.3

Added: Custom inventories
Added: Music pattern sequencer
Added: Multiplayer selection
Added: Bloot: Title page, match logic, music
Added: The Jelly Room
Added: PREV field in activation controller
Added: Audio chooser
Added: Fold-out item creation menu
Added: Scrollwheel / mb3 camera control
Added: Script editor (scripts don't run yet though!)
Added: Shortcut keys for looping in prop editor
Added: Emitters can spawn props, audio and doors
Added: Trigger conditions host:inventory and actor:modifier
Added: Activation controllers for audio and aliases
Added: Total play time displayed on cart completion
Added: Emitted objects can optionally inherit heading and facing rotations
Changed: Can now sink in water by increasing object gravity
Changed: .pov exporter merges sequential voxels of same colour
Changed: Animation completion does not cause parent activation controller to expire
Changed: Can use go_to_room internal script with current room number
Changed: Hoisting is stiffer / more reliable
Changed: Can press button to restart after dying after only 1 second (was 2)
Changed: Doors do not warp in if they are occupied or triggered at t==0
Changed: Legacy sword particle attack damage taken to be player attack damage
Fixed: Doors only reporting occupied event on room entry
Fixed: Water: more robust wading, transitioning between swimming and standing.
Fixed: rand bullet duration
Fixed: incremental item collection
Fixed: aliased modifiers evaluating dereferenced parent
Fixed: emitter id == 0 clobbered on paste
Fixed: cut and pasting object definitions generates new ids
Fixed: actor:time in microscript statements
Fixed: actor:m_state.* called from room object activation controller
Fixed: Inactive modifier attribute values shown from incorrect parent
Fixed: Monsters don't run at full speed at player 2
Fixed: restarting room clobbers total_time_taken
Fixed: broken wall connectivity in small rooms
Fixed: actor state flags not set on zeroth frame
Fixed: Stand-alone emitter remains dormant forever even when duration/bursts have expired
Fixed: Barrel sometimes explodes when thrown from fast run
Fixed: Crash event triggered by carrying actor
Fixed: Walls do not extend down in liquid based rooms
Fixed: Player:super_state:died query sometimes gives false negative
Fixed: Pickups warping in inside player sometimes not immediately collected
Fixed: Room switching sometimes not triggered when carrying other player through door
Fixed: audio editor state is initialised with bad values after new sound created
Fixed: monster accel halved when mode:wandering
Fixed: Joystick not responding when left stick is up to the left
Fixed: death-triggered events don't fire when death caused by actor collision event

P#17811 2015-12-14 18:18 ( Edited 2016-01-22 03:22)

"A Jelly is nothing but Jelly with more Jelly" -- Nietzsche

A silly demo cartridge for Voxatron 0.3.3 -- collect the jellies to become more powerful and make it back to the jelly room.

if it doesn't load for you in the offline binaries, you need to update!

P#17810 2015-12-14 17:34 ( Edited 2018-04-23 15:38)

Hey All,

Here's the final changelog for 0.3.3, which will be live on Monday.


Voxatron v0.3.3

Added: Custom inventories
Added: Music pattern sequencer
Added: Multiplayer selection
Added: Bloot: Title page, match logic, music
Added: The Jelly Room
Added: PREV field in activation controller
Added: Audio chooser
Added: Fold-out item creation menu
Added: Scrollwheel / mb3 camera control
Added: Script editor (scripts don't run yet though!)
Added: Shortcut keys for looping in prop editor
Added: Emitters can spawn props, audio and doors
Added: Trigger conditions host:inventory and actor:modifier
Added: Activation controllers for audio and aliases
Added: Total play time displayed on cart completion
Added: Emitted objects can optionally inherit heading and facing rotations
Changed: Can now sink in water by increasing object gravity
Changed: .pov exporter merges sequential voxels of same colour
Changed: Animation completion does not cause parent activation controller to expire
Changed: Can use go_to_room internal script with current room number
Changed: Hoisting is stiffer / more reliable
Changed: Can press button to restart after dying after only 1 second (was 2)
Changed: Doors do not warp in if they are occupied or triggered at t==0
Fixed: Doors only reporting occupied event on room entry
Fixed: Water: more robust wading, transitioning between swimming and standing.
Fixed: rand bullet duration
Fixed: incremental item collection
Fixed: aliased modifiers evaluating dereferenced parent
Fixed: emitter id == 0 clobbered on paste
Fixed: cut and pasting object definitions generates new ids
Fixed: actor:time in microscript statements
Fixed: actor:m_state.* called from room object activation controller
Fixed: Inactive modifier attribute values shown from incorrect parent
Fixed: Monsters don't run at full speed at player 2
Fixed: restarting room clobbers total_time_taken
Fixed: broken wall connectivity in small rooms
Fixed: actor state flags not set on zeroth frame
Fixed: Stand-alone emitter remains dormant forever even when duration/bursts have expired
Fixed: Barrel sometimes explodes when thrown from fast run
Fixed: Crash event triggered by carrying actor
Fixed: Walls do not extend down in liquid based rooms
Fixed: Player:super_state:died query sometimes gives false negative
Fixed: Pickups warping in inside player sometimes not immediately collected
Fixed: Room switching sometimes not triggered when carrying other player through door
Fixed: audio editor state is initialised with bad values after new sound created
Fixed: monster accel halved when mode:wandering
Fixed: Joystick not responding when left stick is up to the left
Fixed: death-triggered events don't fire when death caused by actor collision event

P#17711 2015-12-11 17:23 ( Edited 2015-12-14 16:05)

The first PICO-8 Jam has ended, and peer ratings have been tabulated and verified. Thanks so much to all participants for making the jam a wonderful event and for producing an excellent collection of rain-themed cartridges. It was a close one, with only a difference of 0.04 PICO-8 stars (out of 8) between the two highest-rated entries. With an average of 6.92 stars, the winner is.. drumroll..

Frog Home! By JTE! white noise cheering sound

Congratulations JTE, and you'll be receiving a small prize in the mail from PICO-8 HQ -- a commemorative plastic coaster depicting your cartridge, along with a PICO-8 canvas bag.

With an extremely close 6.88 stars, is Benjamin Soulé's Rainmaker:

Also close behind were Rain Culture by NuSan, Tea by moonmagic, and the equally heart-melting Rainy Day Friends by electricgryphon.


Stay tuned for the next Jam, which will be in the first quarter of 2016. And if you're not burnt out from jamming or missed this one, join me for Ludum Dare this coming weekend!

You can view all of the P8JAM1 entries here, or directly play the carts mentioned in this post below.

Cart [#16983#] | 2015-11-24 | License: CC4-BY-NC-SA | Embed
64

Cart [#17208#] | 2015-11-29 | No License | Embed
111

Cart [#17235#] | 2015-11-30 | No License | Embed
18

Cart [#17207#] | 2015-11-29 | License: CC4-BY-NC-SA | Embed
23

Cart [#16886#] | 2015-11-22 | License: CC4-BY-NC-SA | Embed
28

P#17580 2015-12-07 04:44 ( Edited 2015-12-08 18:05)

And the theme for PICO-8 JAM #1 is...

Rain


You have 9 days. Good luck!

P#16820 2015-11-21 03:00 ( Edited 2015-12-07 10:01)

The first PICO-8 Jam is approaching!

Following on from this thread, here's an invite cart to make it legit:

Cart [#16614#] | 2015-11-13 | No License | Embed
13

Duration: The Jam will take place from 00:00 PST on the 21st of November 2015 and will finish at 24:00 PST on the 29th. So, it spans 2 weekends and 5 weekdays. You can spend as much or little time on your carts as you like. Tiny silly cartridges are more than welcome.

Theme: As is customary with other jams, a theme will be posted at the start and the goal is simply to make a cart (or some carts) during the jam that reflect your interpretation of the theme. Any type of cartridge is ok: games, toys, demos, music carts or pixels.

Submitting: To submit or update a jam cart before the deadline, just tag it with p8jam1. You can update your cartridge as often as you like before the deadline.

Voting: UPDATE: I'll have a new (but still simple) rating system in place before the end of the jam. Participants will be invited to rate other jam entries on a single scale, and exactly 1 week after the jam finishes, ratings will be tallied.

There will be a small mystery prize for the highest rated cart, but you should enter for glory and honor (or just for kicks).

UPDATE2: the rating system is now live. If you have submitted a p8jam1-tagged cartridge, you'll be able to see the rating interface at the top of any p8jam1 thread.

Rules: Teams / collaborations are allowed, in which case you should nominate one user to be the submitter (and voter). Re-using existing PICO-8 cart material is allowed as long as it is ok by the author, and that the carts are publicly available before the jam starts. Submissions should be mostly new material created during the jam, but it's ultimately up to other participants making ratings to decide what's cool and what's not.

Dev logs: If you want to make posts about your progress, design ideas, or anything else related the jam, feel free to put them in the PICO-8 Blogs section also tagged with p8jam1. Don't be shy!

During the jam, you'll be able to view all carts and posts tagged with p8jam1.

P#16619 2015-11-13 14:48 ( Edited 2015-12-03 22:32)

Cart [#16614#] | 2015-11-13 | No License | Embed
13

Jam details here!

P#16616 2015-11-13 14:23 ( Edited 2015-11-13 22:04)

Hey All

There's a new version of the BBS live now. It's still a little rough -- let me know in the comments if you find something weird going on. I'll be tweaking and extending it over the next month or so.

New stuff:

  1. Cartridge view. Carts are listed in the order they are posted rather than in the order of thread activity.

  2. Creative Commons tags.

The Terms of Use no longer require users to grant permission to use and remix cartridges. Instead, you can tag your cartridge under the CC4-ATTR-NC-SA license. In cartridge view, you can filter by this license.

On your profile page, click "Cartridges" and then "Edit Cartridges" for more information and to release your carts under CC4-ATTR-NC-SA.

  1. User Blogs

There are now blog sections for Voxatron and PICO-8, so that users can post relevant projects that aren't carts, or post about events etc. -- things that don't feel quite right under 'Discussion'. It's still possible to post your work that isn't related to anything Lexaloffle, but might be of interest to other users.

The Voxatron and PICO-8 user blogs are empty right now, but I'll go through and re-categorize existing blog posts soon.

  1. Searching and Tags

These are now a little easier to use, and tags show up on the thread previews. This is still a WIP -- I think tags will be important later for things like searching for music to use in a cartridge, or for tagging carts with a particular event (like a game jam).

  1. To do soon-ish:
  • The TOP filter will be based on newness as well as number of stars
  • Some kind of 'Hall of Fame'-like thing for historic top cartridges and posts
  • Lighter html that doesn't jump around when each page loads
  • Touch controls for cartridges so that they're playable on modern phones
P#15414 2015-10-15 19:20 ( Edited 2015-10-28 20:13)

You can find it on your Updates page. The new builds should be up on Humble soon too (check the version numbers on the files).

This is a quick bug-fixing update. Due to a rogue dev-debug-mode flag being mistakenly switched on in 0.1.2, much of the standard Lua library was accessible. So if you've started using PICO-8 recently, not knowing the library is not supposed to be there and tried to use it, sorry about the confusion!

v0.1.3 Changes:

Added: paste into commandline
Fixed: lua standard libraries accessible
Fixed: command-line loading doesn't work
Fixed: music pattern finished too early when all tracks set to looping
Fixed: peek()ing odd bytes in sfx address space masks bit 7
Fixed: cstore and reload from code space should have no effect

P#15406 2015-10-15 17:40 ( Edited 2015-11-22 05:24)

Check your updates page!

Note: If you bought PICO-8 (rather than Voxatron), it isn't possible yet to activate your Lexaloffle account from Humble. I've been activating accounts manually, so if you purchased PICO-8 very recently and don't see it show up yet, please check back in a day or so. The Humble Bundle library builds should be live soon too.

New stuff: HTML5 exporter, 8-player joystick support, cartridge save data.

To export your cartridge as a stand-alone html5 version:

EXPORT BLAH.HTML

Open the folder (FOLDER) and you should be able to see BLAH.HTML and BLAH.JS

Here's a demo of cartridge saving. Note that save data is not persistent yet in the web version:

Cart [#14880#] | 2015-10-02 | License: CC4-BY-NC-SA | Embed
5

Changelog:


Added: html5 cartridge exporter
Added: Cartridge save data (64 fixed point numbers)
Added: 8-player input
Added: Demo carts: COLLIDE and BUTTERFLY
Added: Command-line parameters // load cart, -run, settings
Added: Alternative function keys (F6..F9 aliased as F1..F4)
Added: pairs()
Added: printh() for debugging
Added: Tab completion for filenames in console
Added: stack trace on runtime error
Changed: music pattern length taken to be first non-looping channel's length
Changed: noise instrument (6) has low frequency white noise scaled by volume
Changed: screenshot captures whole window contents at display resolution
Changed: del() moves remaining items up one index to maintain a packed table
Changed: add(),del(),count(),all() no longer store extra fields
Changed: removed count() from docs -- now just a legacy function. Use # operator instead.
Changed: cursor only blinks while window is active
Changed: peek(), poke() and binary operations (band()..) have no function call overhead
Changed: yellow slightly warmer
Changed: No camera snapping after pan in map mode
Fixed: sqrt() crashing for 0 or >= 32761
Fixed: Semi-colon characters in text editor
Fixed: Long lines split when saving in .p8 format
Fixed: pget() does not respect camera position
Fixed: Error message when peeking or poking outside of legal address space
Fixed: Search replace colour fills one pixel outside of selected region
Fixed: Playing an empty music pattern breaks subsequent music playback
Fixed: Invalid sfx editing state on startup
Fixed: Painting instruments values in frequency view also sets volumes
Fixed: Inconsistent gif recording speeds
Fixed: Unmapped joystick support
Fixed: Compressed code size sometimes larger than uncompressed
Fixed: mid() fails when first argument is not smallest
Fixed: Scroll wheel changes sprite/map zoom while in code editor
Fixed: CTRL-R (quick-run) drawing over current line in command mode
Fixed: Label capture (F7) does not respect screen palette state
Fixed: Syntax highlighting of api functions and hex numbers
Fixed: Looping to 0 with negative step finishes at 1
Fixed: nil values printed as false instead of nil
Fixed: Hexidecimal fractional parts
Fixed: btnp() unresponsive when skipping frames
Fixed: Editing mode is lost when using ctrl-r to run
Fixed: Tracker note entry keys mapped, messing up piano-like layout
Fixed: Shared gfx/map memory out of sync after some editor operations
Fixed: Alt-gr character entry
Fixed: Using shift to select in code editor has wrong selection range
Fixed: Dragging above top of text causes selection to flip to end
Fixed: Duplicate at end of file listing

P#14883 2015-10-02 17:59 ( Edited 2015-10-10 07:24)

Cart [#14880#] | 2015-10-02 | License: CC4-BY-NC-SA | Embed
5

Z to change colours
X to change shapes
LEFT and RIGHT to select presets slot
note: Saving doesn't work in the web version yet!

old version:

 
Cart [#14154#] | 2015-09-15 | License: CC4-BY-NC-SA | Embed
5

P#14155 2015-09-14 20:52 ( Edited 2015-10-03 23:21)

Just a quick note for blog-checkers, Voxatron 0.3.3 and PICO-8 0.1.2 are both arriving this month.

I'll go into detail about new Voxatron developments and plans after the update's out, but here's a quick preview until then.

Also, here's the current changelog for pico-8 0.1.2. There are still known issues that I've rolled over to 0.1.3 but let me know if I missed something small that's easy to fix!

v0.1.2

        Added: Cartridge save data (64 fixed point numbers)
        Added: 8-player input
        Added: demo carts: COLLIDE and BUTTERFLY
        Added: Command-line parameters // load cart, -run, settings
        Added: Alternative function keys (F6..F9 aliased as F1..F4)
        Added: pairs()
        Added: printh() for debugging
        Changed: music pattern length taken to be first non-looping channel's length
        Changed: screenshot captures whole window contents at display resolution
        Changed: del() moves remaining items up one index to maintain a packed table
        Changed: count() includes non-array elements. count(a,v) counts instances of value v
        Changed: add(),del(),count(),all() no longer store hidden fields
        Tweaked: palette: slightly darker gray, warmer greens and yellow
        Fixed: sqrt() crashing for 0 or >= 32761
        Fixed: Semi-colon characters in text editor
        Fixed: Long lines split when saving in .p8 format 
        Fixed: pget() does not respect camera position
        Fixed: Error message when peeking or poking outside of legal address space
        Fixed: Search replace colour fills one pixel outside of selected region
        Fixed: Playing an empty music pattern breaks subsequent music playback
        Fixed: Invalid sfx editing state on startup
        Fixed: Painting instruments values in frequency view also sets volumes
        Fixed: Inconsistent gif recording speeds
        Fixed: Unmapped joystick support
        Fixed: Compressed code size sometimes larger than uncompressed
        Fixed: mid() fails when first argument is not smallest
        Fixed: Scroll wheel changes sprite/map zoom while in code editor
        Fixed: CTRL-R (quick-run) overwriting current command line
        Fixed: Label capture (F7) does not respect screen palette state

P#13988 2015-09-10 18:51 ( Edited 2015-11-14 03:31)

Issue #1 of the community-made PICO-8 zine is out! You can order the 48-page printed version via pico8fanzine.bigcartel.com for a nominal fee, or download the pdf (mirror).

Much respect to @arnaud_debock and contributors for putting this together -- it's humbling to see the world of PICO-8 extended in such a creative and kick-ass way. Issue #1 includes artwork and articles by @dotsukiHARA, @bitmoo, @TheRealMolen, @pizzamakesgames, @PROGRAM_IX"> @PROGRAM_IX, @aliceffekt, @modernmodron and @terrycavanagh. I also took the opportunity to write something on the history of PICO-8 and it's relationship with other Lexaloffle projects.

If you'd like to contribute to future issues, see also this thread, or tweet @arnaud_debock"> @arnaud_debock.

P#12883 2015-08-22 11:19 ( Edited 2015-09-02 08:29)

Cart [#11606#] | 2015-07-15 | License: CC4-BY-NC-SA | Embed
6

Seeing what kind of heavy splashy snare I can get with multiple sfx channels.
As usual, please use or adapt the music for something if you like.

P#11607 2015-07-15 15:09 ( Edited 2015-07-15 23:17)

Cart [#11604#] | 2015-07-15 | License: CC4-BY-NC-SA | Embed
26

This cart demonstrates basic wall collisions, animation and actor-based world objects. I hope it's useful either as something to study for ideas, or as a starting template for a platformer or overhead map-based game. I noticed a few carts reusing stuff from Jelpi, which is great -- but Jelpi might be a little complex to get started with.

See move_actor() for the important part:

 if not solid_area(a.x + a.dx, a.y, a.w, a.h) then
  a.x += a.dx
 else   
  -- otherwise bounce
  a.dx *= -a.bounce
  sfx(2)
 end

 -- ditto for y

 if not solid_area(a.x, a.y + a.dy, a.w, a.h) then
  a.y += a.dy
 else
  a.dy *= -a.bounce
  sfx(2)
 end

The collisions work like this:

  • wall sprites are tagged with flag 1 (orange) in the sprite editor
  • solid_area() checks to see if a given rectangle in the map overlaps with any walls
  • each actor has a velocity (a.dx, a.dy)
  • in move_actor(): before moving an actor along each axis (x, then y), the new potential collision rectangle of the actor is tested against the map. Note the "+ a.dx" in the call to solid_area() to give the candidate position rather than the current one.
  • If the candidate rectangle includes a wall, then the movement along that axis is rejected (and it bounces instead).

This means that as long as actors start outside of walls, they should never end up inside a wall.

There are many minor improvements that could be made -- for example, placing the actor exactly against the wall after it collides. But I've tried to keep it simple to demonstrate only the important concepts.

Note that none of this is the 'right' way to do collisions or anything else in pico-8 -- it's just the way I happen to do it.

If you have any questions about how it works, don't be shy!

EDIT: another example -- this time also with actor collisions.
Exactly the same principle, but instead of looking for solid walls, it searches through all the actors and checks for overlapping actor collision rectangles.

Cart [#11684#] | 2015-07-18 | License: CC4-BY-NC-SA | Embed
26

P#11605 2015-07-15 13:34 ( Edited 2015-10-16 18:20)

Cart [#11533#] | 2015-07-09 | License: CC4-BY-NC-SA | Embed
11

P#11534 2015-07-09 10:33 ( Edited 2017-09-27 20:16)

Cart [#11511#] | 2015-07-08 | License: CC4-BY-NC-SA | Embed
9

A music cart. Feel free to use for anything, especially if you can think of a game that would be called Droid Boots.

There isn't yet a good way to copy music between carts, but if you save as .p8, you can paste the sfx and music data using a text editor.

P#11512 2015-07-08 01:12 ( Edited 2015-11-11 02:18)

View Older Posts
X
About | Contact | Updates | Terms of Use
Follow Lexaloffle:        
Generated 2018-12-15 05:47 | 0.320s | 4194k | Q:197