Log In  
Follow
slainte
Follow

I've tried to upload several times a new version for a cart but seems something breaks that cart in particular... everything runs fine locally (windows machine) but the uploade version gives a syntax error in an odd place (inside one px9 generated string)

I saved the cart a few times but results are the same... any idea on the reason and a potential fix?

cart is

Cart #deflektor-17 | 2020-07-29 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
(and a few of the previous ones... 14+) In terms of changes against version 13 there's a few extra lines and some extra bin data in the map area. Not htting any of the limits (compressed at 98%,7253 tokens, 48153 chars)

P#80075 2020-07-29 07:26

Probably everyone has one of these... sharing in case you don't and need a quick wrapper around the mouse support.
The library implements an OOP like MOUSE object that supports 2 buttons and provides the following methods:

  • enable() : Enables mouse suport
  • disable() : Disables mouse support
  • pressed(<num>) : true/false if button number <num> is pressed in current frame
  • clicked(<num>) : true/false if button number <num> is pressed in current frame but was not in the previous
  • released(<num>) : true/false if button number <num> is not pressed but was in the previous frame
  • inside(minx,miny,maxx,maxy) : true/false if mouse is inside the defined rect boundaries

Would be quite easy to extend, mouse cursor can be set to any spritesheet index and would be easy to handle animated cursors, bigger cursors and such...

The demo cart shows how it behaves... pressing buttons changes background color, clicking and releasing draw some points on the screen (in green hues for btn 1, blue hues for btn 2.. brighter for click, darker for release)

Cart #mousedemo-0 | 2020-07-19 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

P#79605 2020-07-19 14:16

Took me a while to debug and identify why this was happening...

I was taking advantage of RESET to clear clipping and palette and as a side-effect RND() started to misbehave returning always the exact same number. I guess that RESET also sets a fixed srand seed and that's why the pseudo-randoms go stale... Probably worth documenting that RESET also does that or if this was unintentional fix it...

P#79357 2020-07-15 18:58

Will post here my experiments with particle effects...

Experiment 1: Fireworks... basic explosions

version 1: very basic approach

Cart #fireworkstest-0 | 2019-09-11 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

version 2: added gravity pull and callback update/draw for particles to operate multiple particle types (f.e. rocket and spark in the test)

Cart #fireworkstest-3 | 2019-09-13 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Experiment 2: Additive blit particle fire

version 1:

Cart #particlefiretest-0 | 2019-09-14 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

version 2: Supporting sprite-based blendop palettes (for now only partial additive palette included), next goal blit optimization

Cart #particlefiretest-1 | 2019-09-14 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

version 3: PEEK/POKE BLIT without great results... per-pixel blendops still kill it, updated color and added some toying controls

Cart #particlefiretest-2 | 2019-09-15 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

P#67630 2019-09-13 19:17 ( Edited 2019-09-15 20:08)

While starting work on my little deflektor project I decided to have classic 7 segment led style numbers, my first iteration (the one currently in the game...) is based on sprites but I wanted something a bit more versatile. This is a basic line drawing small library to handle 7 segment led like any digit length display. It should be fairly easy to define a text set and draw 7 segment text desplays (just need a table with the segment mapping for every letter and put up a wrapping function that receives a text and not a number)

It supports background displaying of segments ("off" segments), color configuration and segment width configuration. The cart includes the library and a very basic demo on what it can do

I might be working on reducing token size a bit (library itself is around 300 tokens) and I think there's some salvageable space there, but don't count on it for now

Hope it helps someone out needing a 7 segment style display

Cart #led7segment-0 | 2019-08-14 | Code ▽ | Embed ▽ | No License

P#66679 2019-08-14 18:49

I've invested some time working on a demake for one of my favourite games from the 8-bit era, Deflektor (by Costa Panayi). Your goal is to guide a laser to the receiver on each of the levels, access to it is blocked until you destroy all pods on the level. Laser overloads when it hits mines or if the emitter gets feedback.

Cart #deflektor-17 | 2020-07-29 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

HOW TO PLAY (you can go through this tutorial in the game itself)

CHANGELOG V0.5.3

  • 2 MORE LEVELS (now totalling 6)
  • ADDED safety pre-check so levels don't start on full-reflection or overload status

CHANGELOG V0.5.2

  • FIXED tutorial can be run multiple times

CHANGELOG V0.5.1

  • FIXED bug duplicating player cursor entity...
  • FIXEX tutorial scrambled if you play before running it

CHANGELOG V0.5

  • Massive rewrite (almost 80% of it is new...)
  • ADDED a few more levels
  • REMOVED editor mode... it is now it's own cart... was too big
  • ADDED Tutorial, Intro screen, proper game over and End Game sequence
  • FIXED a few nasty reflection bugs for the laser beam

CHANGELOG V0.3.5

  • FIXED bug with negative angle reflections not causing overload
  • ADDED some more basic FX
  • EDITOR MODE early version (reqs. mouse)
  • ADDED laser loading phase at start level/new live
  • ADDED end level scoring
  • WIP bgmusic (in the cart but not playing, unsure if it will stay)

CHNAGELOG V0.3.1

  • FIXED bug in map loading that made optical fiber to crash (main reason to re-release)
  • ADDED some basic SFX
  • FIXED optical fiber pair coloring
  • some minor token salvaging and code clean-up

CHANGELOG V0.3

  • FIXED extra greediness in beam capture at mirror centers causing odd reflexions
  • FIXED color error on initial rise for the overload meter
  • MASSIVE spr sorting to allow for a reasonable leveldata format
  • Level is loaded from data (level info will live in 0x1000 to 0x1FFF unused shared map/spr space)
  • Crude leveldata persister as a prototype for leveleditor mode (unsure if editor will be a separate cart)

CHANGELOG V0.2

  • Optical fiber interaction
  • Laser grid scatter interaction
  • Level can be completed
  • Interaction with the receiver (connected status to end level)
  • Removed displaying laser point debugging
  • FIXED metal wall reflexion failing for some situations

CHANGELOG V0.1

  • Basic intro page
  • Beam generation and reflection
  • Player movement
  • Mirror interaction and auto-rotation
  • Beam interaction with mirrors, walls, mines and pods
  • Full HUD control
  • Crude live / energy / overload management
  • Scoring
  • Hardcoded level mapping

PENDING

  • MUSIC: title music from the original and maybe a bg loop while playing
  • SOUNDS: laser connection sound
  • VISUALS & GAMEPLAY:
    • live lost sequence
    • level transition
    • extra detail in end game sequence
    • gremlins from the original game... unsure if I will be adding those
    • a few more levels... the plan is get around 20-30 levels in place
  • CODING: even if I refactored a lot, there's still quite some junk... could be I do some more
P#66564 2019-08-11 19:31 ( Edited 2020-07-30 05:55)

Follow Lexaloffle:        
Generated 2020-08-06 19:29 | 0.119s | 4194k | Q:125