Log In  
Follow
TheRoboZ
Klax (lynx version)
by
Masters of the Universe
by
Mortal Cards
by
[ :: Read More :: ]

After way longer time than planned, here's the first Demo from this upcoming cart.

Cart #pdemo1-0 | 2022-08-12 | Code ▽ | Embed ▽ | No License
38

This includes the first level and is only focused on getting feedback on controls/platforming (there's no sword fighting).
There's a kind of "auto hanging" when possible (unlike the original game where you had to press to hang) this will be optional in the final game.

If you die or exit the level you have to restart the cart.

Controls:

⬆️..........................Climb up ledge
⬇️..........................Crouch / climb down ledge (if located close behind Prince)/ Pick up sword or potions
⬅️ or ➡️.................Run left / right
❎(X) + ⬅️ or ➡️.....Walk left / right (finer control, backs off from ledges the first time, walks through spikes)
🅾️(Z)/Diagonals-Up..Jump (stationary or while running)

Game controls
Ctrl + R..............Restart cart (go to title screen)

The purpose of this project was to test if elements drawn with my picodraw system could be used as out-of-grid map tiles, leveraging some new functionality (self clipping) introduced since the R-type version.

As I was implementing this, I saw a twitter post from @HeyNetters with a mockup that was a perfect fit, so I asked her to use her art to try and implement it for real.

Music arrangement (limited in this demo but there's already more) by the great @dhostin (YouryKiki) as usual. Further info coming with the next demo.

Cart code is partially minified because it's not yet in a state to show for exampel purpose, it will be extensively optimized in the following releases.

For information about the original Prince of Persia game by Jordan Mechner, check here

level start

find the sword

level end

P#115632 2022-08-12 03:40

[ :: Read More :: ]

Hello,

I have a problem with some code in version 0.2.3 that worked up to the previous version:

  if stat(30)  then
      local k = ord(stat(31))
  end

ord(stat(31)) always returns null but was returning the correct value before.

It works if changed to:

  if stat(30)  then
      local k = stat(31) k=ord(k)
  end

The RoboZ

P#98566 2021-10-13 02:30 ( Edited 2021-10-13 02:30)

[ :: Read More :: ]

Hello,

while trying to compact code to save tokens I ran into an issue when trying to use split with strings containing escaped numbers \0, \1, etc.. (to store binary data that will be converted with ord()

s="abc\0def ghijkl"
split(s," ")

This seems to stop at \0 and the string part after " " will not be in the resulting table.

Is this intended behavior or a bug? With other escaped characters as \n \r \t the splitting works fine.

If this could be possible it would help me save additional tokens.

Thank you,

TheRoboZ

P#98565 2021-10-13 02:27

[ :: Read More :: ]

Cart #rtype-5 | 2022-04-12 | Code ▽ | Embed ▽ | No License
167

After months of hard work, here is the NEW release (1.3) of Irem’s R-Type* pico-8 port, featuring the 4 stages in a 32kb cart! (Similar to the PC-Engine port, with 4 in a 256kb hu-card.)

In addition, there are:

  • 30 enemies with most attack patterns and weapon replicated (albeit simplified)
  • 4 HUGE bosses
  • 3 force types with 2 levels of power
  • 60 fps action with arcade-style graphics
  • Awesome 5 tracks soundtrack by the great @dhostin (YouryKiki) based on Masato Ishizaki's original score, you can listen to the OST on SoundCloud

Hope you enjoy it and please, give me some feedback on performance, especially on lower-end machines.

TheRoboZ

Instructions:

🅾️ button to shoot, hold to charge the beam
❎ to detach/recall the force sphere. (hold to auto-fire. after a while auto-firing will detach the force so be careful!) The force can be positioned in front and behind, has 3 powers up levels and can be used defensively too, absorbing the small enemy bullets.

(I strongly suggest to play with keyboard or pad as on the phone it might be a bit harder)


Version 1.4

  • FIXED fsign bug reported on April 11
  • Token reduction
  • Optimized sprite rotation
  • Picodraw cached string to table conversion
  • Fixed bug in detaching cargo in stage 3
  • Improved collision bounding boxes in soem cases
  • Beam draw improvement

Version 1.3

  • fix for pico 0.2.4 black palette bug
  • fixed stage 2 music bug, boss music plays again if coming from stage 1
  • added score recap at stage clear

Version 1.2

  • stage 4 (2 new enemies and 1 new boss)
  • NOTE: stage 4 boss cannot be damaged with normal bullets, you need to use the beam or a force weapon

  • soundtrack available on https://soundcloud.com/youry-kiki/sets/r-type-pico8
  • swapped fire buttons

  • increased special weapon damage
  • added different explosion for missiles
  • fix autofire too fast with force weapons
  • fix autofire firing force while holding button down
  • fixed circle beam/missiles gfx
  • fixed missiles explosion drawn twice
  • missiles only seeks forward as in arcade
  • misc. fixes/improvements to better match arcade version

Version 1.1

  • auto-fire if you hold down (❎), see instructions. thanks @dw817
  • fixed shooting/sounds after death, thanks @Felice
  • fixed problems with music cues/checkpoint restarting and enemy removal(stage 3 mainly) after player death
  • fixed missiles not resetting after player death, thanks to @extar and his awesome let's play
  • fixed excessive beam damage due to being stuck in some situation where a bg tile was behind an enemy (first and third bosses as seen in @extar 's video

What’s missing compared to the arcade (mainly down to token limit):

  • "Option bits" power up (little spheres flying above and/below the ship)
  • continue screen/high scores table
  • The pow-capsule enemy doesn't land/walk
  • No 1-up

Development Notes:

The idea for this came as a way to expand and improve the background graphic system of my previous Masters of the Universe game with scrolling, meanwhile implementing more functionality in picodraw as explained here.
I am pretty satisfied with the technical results and picodraw now evolved a lot with the addition of cloning groups and sprite support. Programming the game was a fun “old times” experience since I had no idea how the original worked and had to keep playing on M.a.M.E. trying to understand enemies patterns, but got a bit tedious at time, while fighting token limits to implement them, specially near the end.

Thank you

The following contributions taught me some incredible techniques that allowed me to complete the game

@sparr/ @Felice for their fillp extension that allows object coordinates fill patters, without this I wouldn’t even have tried as the jittering was really annoying,

@Freds72/@paranoidcactus for their Journey to poom article
showing me the invaluable “properties factory” function that I adapted to my needs and saved me at least 3 times when I overshot token limits. Freds72 also contributed some last minute optimization tricks that will probably allow me an additional update.

@ElGregos for his snake tweetcart, showing me a simple way to implement a more complex movement for the second boss

Without the above, the game would have been way more limited

*R-Type is a side-scrolling shoot'em up game, and the first game in the series. It was originally released in July 1987 by Irem for the Arcades, with ports to home consoles and computers in the following years.

P#98070 2021-10-01 02:28 ( Edited 2022-04-12 00:29)

[ :: Read More :: ]

Game Released, please see this-> post

Stage 1 and 2 of my R-Type pico-8 port, showing all game and graphic system working.
Music once again courtesy of the great @dhostin (YouryKiki) based on Masato Ishizaki's original score

What's new

Stage 2 and stage selector

Some players complained about the difficulty due to restricted play area so I made the following changes:

  • slower enemy bullets and fire rate
  • small tweaks to soem enemy placement
  • when you respawn, no enemies already onscreen

Since this is a tech demo, i left some debug options available:

  • press W to pause scrolling and become invincible
  • once invincible press S and F to scroll through the stage
  • D to show/hide collision boxes
  • Q to summon the force and change its type
  • E to change the force power

Transparent explosions!

Using PicoDraw routines for more graphic elements (weapons/UI)

Notes:

The idea for this came as a way to expand and improve the background graphic system of my previous Masters of the Universe game with scrolling, implementing more functionality in picodraw as explained here. If I have the chance in the following days I will detail a bit further what's new behind the scenes.

This demo is still missing the option power up (the little spheres flying above and/below the ship) and a proper game/over - continue screen. The power-up capsule enemy AI is also unfinished.

The code is not completely optimized as the more enemy I introduce, the easier it is to refactor common parts an streamline functions, so it will get another pass after stage 3 is in. As you can see there's still plenty of sprite/map space unused so a bunch of things I am doing in code could be simplified using these instead.

Programming the enemies is the hardest and most tedious part because I have to play the original game a lot and try to guess what's going on but I will try to implement 3 and maybe the last stage, then we'll see if there's enough interest to add something more, maybe going multi-cart.

Let me know what you think and please give me some feedback on performance, specially on lower-end machines.

Enjoy,

TheRoboZ

*R-Type is a side-scrolling shoot'em up game, and the first game in the series. It was originally released in July 1987 by Irem for the Arcades, with ports to home consoles and computers in the following years.

P#90591 2021-04-15 07:48 ( Edited 2021-10-01 02:33)

[ :: Read More :: ]

Cart #klax-2 | 2022-01-28 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
25

This is a pico-8 port of Klax, mainly based on the Atari Lynx version, featuring:

-100 levels
-5 different backgrounds
-warps
-full klax combos and scoring system.

updated to v1.1

-Fixed early game over condition when last free tile would create a klax
Thanks to @dan9er finding
-added additional perspective tile graphics for tiles on external lines
-added brief tutorial before level one,like lynx version
-added one sample of digitized speech... It's all i could fit without
compression but i wanted to test how this new secret functionality

I needed a warm up project after taking some time off since finishing Masters of the Universe and I was thinking how Lynx screen resolution is not that far off from pico-8's and it gave me the idea of trying to port some games.
I played a lot of this on my lynx and it seemed like the easiest one to start with.

I found 2 other klax carts for pico. One by @GiovanH and one by @troske007. I used the last klax2d as a starting point and then I just "stitched" on all the missing features
and change after change the result is a bit of a Frankenstein monster code-wise, and ended up almost reaching the token limit.

I was already planning a future update with cleaner code and just before posting this I saw @carlc27843 's amazing discover of sfx samples so I will try to add a couple of sfx from the lynx version too soon.

Major thanks to @NiVZ for his feedback!

Hope you'll enjoy this.

Klax is a puzzle video game released in arcades in 1990 by Atari Games. It was designed by Dave Akers and Mark Stephen Pierce. The object is to catch colored blocks tumbling down a machine and arrange them in colored rows and patterns to make them disappear. Klax was originally published as a coin-op follow-up to Tetris, about which Atari Games were tangled in a legal dispute at the time.

P#88945 2021-03-14 01:30 ( Edited 2022-01-28 18:38)

[ :: Read More :: ]

This blog will be way to track ideas and progress related to improving MOTU’s background composition system and PicoDraw.

While developing Masters Of The Universe I was considering the idea of having some for of scrolling backgrounds but there was no time nor token space to experiment. Right now, I am re-using the same system on Klax to draw the biggest part of the play area (the conveyor belt) but it’s still nothing more than a static background.

The final goal of this experiment is applying it in scrolling games, generating backgrounds with a combination of limited tiles and “generated” graphics brushes using pico-8’s gfx primitives and fit a whole game with at least 3 big scrolling levels in a single cart.

A simple beat’em up could re-use a lot of MOTU’s code for sprites, input and states. I had my sights set on Double dragon because e it’s kind of short and simple, plus I played a lot on the Amiga version which had a limited move set and graphics compared to the arcade but was still fun enough.

Last week I saw @Pigmeat ‘s post about his Streets of Rage pico-8 demake and that gave me enough motivation to experiment a bit while finishing the most boring technicalities on Klax.

First thing, I did some research on Double Dragon to see what I have to deal with and found these 2 treasure troves of information:

http://www.electriccafe.xyz/double-dragon
https://doubledragon.kontek.net/

The arcade game has a resolution of 256x240 which is a good fit to be reduced by 50% to 128x120, 1 arcade screen can fit in 1 pico-8 screen with 1 row of 8 pixel left at the bottom. Characters can fit in a 2x4 composite sprite, like MOTU so I can reuse the same composition system.

Double Dragon Full Map

The map can be divided in 5 stages, 3 of which are plain horizontal scrolling, 2 are mixed vertical and horizontal. The firs stage is around 5 screens wide and as a first test I’ll try to reproduced with the hybrid system.
As a first step, I design a mockup of the first screen, using standard tiles/map to get an idea of the aesthetic at this resolution and proportions of various elements.

This looks fine to me but It’s using xx tiles for this single screen!

Studying the tile set and the object represented we can see a couple interesting things: there are some huge elements (windows, door, car, some large walls) that needs at least 4/6 tiles to be represented and, even if in this screen are repeated 2 or 3 times, will never appear in the game again., and a couple which are used once in other levels. These are good candidates to become object brushes.

I will define a table of these object with an id and anchor position in level coordinates, and then draw them on the fly after creating them in picoDraw.

brushes = {{2,-8,8,24,24},{1,16,8,24,24}, ...} --id, x pos, y pos, W, H

The drawing routine expects object coordinates to be within -48 to 173 but we can reposition them while scrolling using pico-8’s camera() function.

Let’s test it on a wall and a window after drawing them in picoDraw

in code this object is a string like this:

"+&NNem\0&ONdl□&QQbj⁴!PPck⬆️!NNemく#VdXh¹#VeWh²#UeVh\n!PUcb$F"

Reusing most of the code from MOTU, we will draw this and the tile version side by side and see how it looks

I’d say not bad but while scrolling, there’s shimmering in the gradients because fill patterns don’t respect local coordinates. This is a problem that I couldn’t solve while working on MOTU and I was banging my head on until recently when I found this life -saver post on pico’s forum.

Local fill patterns

I applied @sparr ‘s code and finally, this long-lasting problem is solved! The window is next

There will be a minor reduction of 1 px details with these objects, but overall, I think they can look the part and the tile set is drastically reduced (I did the door too and the missing ground tiles are because they were just palette swap and are now generated in code).

Now drawing a lot of these will use a bit of CPU so we can’t abuse it but, we can already skip drawing the one that are outside screen view for a minor optimization and, in the future, I’ll try to implement a form of caching to improve performances.

 for i=1,#brushes do
    b=brushes[i]
    if b[2]+b[4]>-(cx+8) then
      camera(-cx-b[2],-cy-b[3])
      do_draw_cmds(brush[b[1]])
      --@todo: test caching to user ram/sprites
    end
  end

It scrolls! (at 60fps in pico-8, gif is a bit jerky)

Next on the list is drawign the car and revamping of picoDraw to add 2 functionalities I will need for more complex objects, sprites and text management.

P#86639 2021-01-21 09:41

[ :: Read More :: ]

Cart #picodraw-1 | 2021-06-07 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
15

Mouse and Keyboard are required!

New release of PicoDraw, the tool I created to draw all backgrounds in my Masters of the Universe cart and the huge scrolling objects in R-Type, in a special compressed format.

What's new:

  • sprite tools
  • clone groups
  • H/V mirroring of subshapes
  • revamped UI

It uses a mixture of primitives/sprites/tile-maps. Maybe someone else will find it useful too or just contribute to further development.

I will update this post with some tutorials as soon as possible, here's a demo cart showing how to use the created data in a game. check the code and the included sprites.

Cart #picodraw_test-2 | 2021-06-08 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
15

The reason for its creation is explained in this devlog

Thanks to @JadeLombax for his triangle functions!

Code needs some further optimization and the tool is missing a couple of final features but it's quite usable. According to my plan, this is what left to do:

-palette remapping tool
-string tool
-variable length commands for optimization

Keyboard commands:

Left mouse button  - draw filled shape
Right mouse button - draw outline shape
(only for rectangles and ovals, other shapes are the same with both buttons)

Keyboard shortcuts (capital letters means shift+letter, * means available in 'Select All' mode)

Ctrl+f -- show prompt for sprites/map import from another cart

Ctrl+a -- toggle Selct All mode (move all shapes at once)

;   -- *toggle background layer
'   -- *toggle foregroudn layer
Ctrl+h -- *toggle unselected shapes visibility
u   -- *toggle UI visibility

1   -- rectangle drawing tool
2   -- oval drawing tool
3   -- line drawing tool
4   -- map drawing tool
5   -- shape select tool
6   -- triangle drawing tool
7   -- pixel drawing tool
8   -- sprite drawing tool
9   -- clone drawing tool
0   -- cycle tools

Backspace -- Delete selected shape
c   -- toggle palette tool

f   -- toggle selected shape fill/outline
g G -- cycle selected shape gradient fill
h  -- *flip current shape horizontally (in omni mode flip all canvas horizontally)
i   -- toggle selected shape selection filter (so tab and ` will only cycle through the same shape as the one selected)

j   -- show shape list for current drawing layer
, . -- scroll shape list

k   -- clone shape (makes a copy of the selected shape over itself)
l   -- switch active layer
Ctrl+l -- move shape to other layer (BG->FG or FG->BG, as last shape of the level)
m   -- enable bg horizontal mirroring (as used in Masters of the Universe, see: -- link -- )

Ctrl+n -- clear canvas (preserving undo to get back to existing drawing)

r   -- toggle 8x8 pixels Grid
t   -- selected shape mutation (cycle through shapes while preserving all parameters)
*v  -- flip current shape vertically (in omni mode flip all canvas vertically)
Ctrl+v -- paste command strings as new drawing (sanitized as much as possible)
Ctrl+y -- redo (256 levels)
Ctrl+z -- undo (256 levels)

` Tab  -- *cycle selected shape
= -    -- increase/decrease shape drawing priority

up    -- *move selected shape up 1 px
left  -- *move selected shape left 1 px
down  -- *move selected shape down 1 px
right -- *move selected shape right 1 px

w      -- decrease selected shape height by 1  (pixel for primitives, unit for sprite and maps)
a      -- decrease selected shape width by 1  (pixel for primitives, unit for sprite and maps)
s      -- increase selected shape height by 1  (pixel for primitives, unit for sprite and maps)
d      -- increase selected shape width by 1  (pixel for primitives, unit for sprite and maps)

W      -- for map/sprite decrease index by 1 row
A      -- for map/sprite decrease index by 1 col
S      -- for map/sprite increase index by 1 row
D      -- for map/sprite increase index by 1 col
[ ]    -- cycle selected shape color

You can draw 256 shapes on each of the 2 layers, when you reach the limit the toolbar turns purple

After the drawing is done, I quit to the prompt and just Ctrl+V paste the drawing data, it's always copied to the clipboard after every operation and it's automatically escaped/unescape

P#81235 2020-08-27 02:26 ( Edited 2021-06-08 05:25)

[ :: Read More :: ]

Cart #motu-6 | 2021-08-15 | Code ▽ | Embed ▽ | No License
160

The battle for Eternia is in your hands!

Side with He-Man and his allies or Skeletor and his minions in this new take on the classic Barbarian sword fighting game.

Battle 8 levels against increasingly difficult foes or play against a friend. You have the power!

This Pico-8 cart is bursting with the Power of Grayskull, featuring:

  • 16 Characters
  • 16 combat moves
  • 4 stages
  • 8 difficulty levels
  • 3 game modes
  • A kickass soundtrack

Update 1.6 - 2021/08/15

-fixed crash in "vs cpu" select screen after credits cycle (Introduced in v1.5)

Update 1.5 - 2021/03/01

code optimization reclaimed over 110 tokes so:

-fixed an AI bug that made flying overhead chop overpowered with some opponent levels, now cpu reacts more like original code

-Added Hordak and Fisto.

-There are now 9 characters for each side but you still fight 8 rounds, picked among this pool.

-If you play as She-Ra then Hordak is the final boss and Skeletor can be a random opponent. Same if you paly with Hordak. Old characters with He-Man or Skeletor as final boss get Hordak/She-Ra as random opponents

-Animated intro! (I really wanted this from the start and was so sad to cut it before)

-Various minor gfx fixes

-music loop fix

current stats: T:8187 C:42085 %:15607

Due to the major changes in this release, the previous one remains available below

Updated to v1.4 - 2020/10/03

Cart #motu-4 | 2020-10-03 | Code ▽ | Embed ▽ | No License
160

Thanks to @RoundUpGaming suggestions, here's what changed:

  • fixed infinite roll attack so you can't chain them and stuck opponent to the edge of the stage
  • added gore disabling option for kids, no decapitations and no blood.

    This makes the game a bit more challenging because you can't have a sudden victory with the flying chop

I want to remind also that you can disable sprite outlining to play with the original style the game had during development

current stats: tokens 8182 / chars 44437 / compress 99.87

Updated to v1.3 - 2020/09/03

  • fixed losing last fight will restart from first opponent, very sorry about this
  • fixed grayskull bg glitch introduced in last update
    current stats: tokens 8182 / chars 44523 / compress 99.87

Updated to v1.2 - 2020/08/31

  • Fixed some P2 controls still affecting CPU opponent

Updated to v1.1

  • Fixed a bug where if the winning blow caused a character to fall it wouldn't display the winning/losing animations
  • Fixed a minor music mistake
  • The flying neck chop was overpowered so now it only decapitates your opponent if his health is 75% or less

How to play:

Arcade mode is a battle against enemies of increasing difficulty to regain control of Eternia

P1 vs CPU is a 1 round fight with customizable difficulties, characters and stage

P1 vs P2 allows you to fight a friend with your favorite characters

While selecting your character in vs modes, use up and down to select stage and difficulty.

Controls:

Player1: Pad 1 \ arrow keys + Z/N ([O] Button - Attack) + X/M ([X] Button - Defense)

Player2: Pad 2 \ E S D F + W/Left Shift ([O] Button - Attack)+ Q/A ([X] Button - Defense)

Move list:

UP -Jump, RIGHT - move forward, DOWN – crouch, LEFT - move backward,

​ATTACK - Body Chop, RIGHT+ATTACK - Neck Chop, UP + ATTACK - Overhead Chop, LEFT + ATTACK - Sword spin, DOWN + ATTACK - Leg Chop,

​DEFENSE - Protect Body, UP + DEFENSE - Protect Head, RIGHT+ DEFENSE - Headbutt, DOWN + DEFENSE – Leg chop,

​ATTACK + DEFENSE - Flying Neck Chop

Credits

Original artworks and idea: John Henderson

Music:

Programming and gfx: Andrea Baldiraghi

Masters of the Universe and all related characters TM by Mattel Inc.

Barbarian TM by Palace Software Ltd. 1987

Thanks to:

John Henderson - for granting me permission to develop this version of his original idea

FL - for his barbarian archive and source codes: http://barbarian.1987.free.fr

@freds72 Frederic Souchu - for finding and sharing it

@JadeLombax - for his triangle drawing functions

@zep - for pico-8 https://www.lexaloffle.com/pico-8.php

And all pico-8 users for their support and contributions on this game
and on Mortal Cards

Development Stats:

Started on may 29 with the first teaser

35% of the time on picodraw for backgrounds

July 9 – complete graphics foundation and picodraw

Aug – 18 game code completed

Aug 22 - Added Music and released online

About three months, working around three hours per day 5 days a week when possible.

My goal for this game was to experiment and expand upon the sprite techniques I used for mortal card, as that was a simple and quite rushed game, made for a jam, but I felt the same ideas could be used for a proper action game. After starting, I also decided to experiment a bit with this mixed shapes/map tiles backgrounds to try and give the game a “big” look, big animated sprites, full screen , painterly style background. I already thought about a barbarian remake since I remembered the game graphics had a lot of repetition that was suitable to be broken into components, and just a short time later, I found John’s post about his motu idea and that gave me the final push as it made it a bit more original and interesting. While scouting the pico bbs to see if a barbarian remake was already attempted or even done, I found this… post that lead to a treasure trove of info that greatly helped for moves timing, AI and overall game flow, even if the code had to be mostly rewritten from scratch for size reason. Overall I am satisfied with the result even if I feel I made a couple of mistakes in the way I manage frames that lead to unnecessary complexity. I should have finalized the frame set once and for all before starting with the input cope and I could have had a more compact representation and probably save some more tokens and compression space.

To fit everything into a cart I had to give up some additional “flourishes” I had in mind, such as an animated intro and an ending mimicking the cartoon with a character giving some moral lesson.. and pre and post fights vignettes with some text and characters portrait.

I had to simplify a bit the bg animations to save tokens so they are not as refined as while they were just work in progress and I had to cut personalized winning poses for every character. I also planned to have a dramatic “clashing” sometimes when swords collided with a lightning and black and white silhouette, but , while I have the code to draw it, it’s simply too much tokens to fit. I might code a deluxe multicart version in the future, but all these are just decorations and don’t really add much to the game itself.

This is my second full game and the third pico coding experiment I also wanted to try to do a port of an existing game to a system, writing my own tools etc.. as old school-style as possible, as I really love reading about classic game programming but never really did anything at the time. Glad that pico-8 gave me a similar, albeit more comfortable chance to experience something close to it. , it was overall a very fun experience, and I hope you all enjoy playing it as much as I enjoyed coding it.

From this experience, I hope I can get some improves tricks for the next game, which I’ll start after a needed break

I will document and release PicoDraw soon, so it can be improved with the input from other pico users.

P#81037 2020-08-22 08:27 ( Edited 2021-08-15 07:13)

[ :: Read More :: ]

Trying to use shifts instead of multiplication, I noticed an odd thing:

work_ram = 0x4300

printh(work_ram +  2*32) -- result: 17216
printh(work_ram +  2<<5) -- result: 24640  + has higher precedence than shift, is this correct? 
printh(work_ram + (2<<5))-- result: 17216
printh(work_ram |  2*32) -- result: 17216
printh(work_ram |  2<<5) -- result: 17216
printh(work_ram | (2<<5))-- result: 17216

pico-8 version: pico-8_0.2.1b_windows

Am I missing something and this is an intended behavior or there's an operator precedence inconsistency?

P#80287 2020-08-03 02:18 ( Edited 2020-08-03 10:25)

[ :: Read More :: ]

LAST VERSION as USED in R-type 1.4 after optimizing it a bit further:

--97 tokens with Scaling and arbitrary size
function pd_rotate(x,y,rot,mx,my,w,flip,scale)
  scale=scale or 1
  w*=scale*4

  local cs, ss = cos(rot)*.125/scale,sin(rot)*.125/scale
  local sx, sy = mx+cs*-w, my+ss*-w
  local hx = flip and -w or w

  local halfw = -w
  for py=y-w, y+w do
    tline(x-hx, py, x+hx, py, sx-ss*halfw, sy+cs*halfw, cs, ss)
    halfw+=1
  end
end

This is a general-purpose sprite rotation function using tline with support for scaling and flipping

Cart #tline_sprite_rotation-5 | 2022-04-30 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
48

It always draw a screen-oriented rectangular area, (centered at x,y) large enough (w) to contain the rotated tiles (centered at mx,my), and calculates the rotated (rot 0 to 1) tline coordinates and deltas.

The catch is that you need to have the sprite in the map and must leave "clearance-space" around the map part to be rotated (matching the largest side of the sprite or you get some additional map tiles drawn as well, visible in pink in the example). But you can just prepare one rotating area and just swap tiles with mset().

LAST EDITED for a mistake that was messing up mx and my

P#78451 2020-06-24 05:59 ( Edited 2022-04-30 06:52)

[ :: Read More :: ]

My entry for #rndgame2020 - MORTAL CARDS (Mooooooortal Caaaaaaards!)

Cart #mortal_cards-0 | 2020-05-24 | Code ▽ | Embed ▽ | No License
20

With more powerful characters, more secret moves, more depth, more control and the most advanced pico-digitized graphics around – this card game is worth fighting for!

Mortal Cards challenges you with the ultimate card playing experience…
On a secluded island, six elite fighters have gathered to test their deadly skills.

Each competes with a deck of 15 cards, 5 cards each round, as they battle each other and finally, the 4-armed mutant warrior Goro.

Featuring a digitized graphics, multi-layered backdrops and a pulse-pounding soundtrack.

For the most realistic chop-em-up challenge yet, it’s Mortal Cards. The competition will bow in submission.

HOW TO PLAY:

- Check opponent's next card and react accordingly
- Select with left and right arrow, confirm with "Z" Key (Circle button on pico 8)
- Same moves will cancel each other
- Special moves are un-blockable, some will inflict reduced damage when blocked and others will be parried completely
- Discover all the moves interaction
- If health reaches 0 before all card in a hand are used, you can finish with a Fatality!
P#77103 2020-05-24 04:17 ( Edited 2020-08-23 15:14)

[ :: Read More :: ]

Cart #p_harrier-0 | 2020-05-06 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
3

my tweettweetjam4 entry, based on the awesome froggy road by 2darray:

https://itch.io/jam/tweettweetjam/rate/331076

It's a pacifist endless space-harrier demake for pico-8, you can;t shoot but must avoid ground obstacles and projectiles (from invisible enemies!)

I'm having problems uploading it to itch.io, so I'll post it here for now

559 chars, here's source code:

x=64u=127z=0q=0h=0n=16y=x
d=0r,g,w=rnd,circfill,x::::flip()cls(1)b=btn()
k=6((b\2)%2-b%2)x+=k;y=mid(n,y+6((b\8)%2-(b\4)%2),u)h+=.4if(z-h<1)z+=1
if(x<9or x>=u)q+=k/4x-=k
for b=z+n,z-1,-1 do
srand(b)p=(b-h+2)/24m=6+r(9)rectfill(0,w+9/p,u,u,9+b%2)for i=1,r(5)do
for v=0,1 do
for j=v,1 do
t=(im4+j+r()-q)%(200-uv)-w
o=p
(1+.5v)-1/(w-nv)k=t/o+w
l=v(r(n)-13)+5t=l/o+w
o=1/o
v
=2t-=nv
if(o>v)g(k,t,o,5+v)g(x,y-4
v,6-v,8+v)
if(z-d>2 and o>8-v and abs(x-k)<o+4 and abs(y-t)<o+6) goto d
end;end;end;end;goto
::d::d=z
?"❎get ready",2,2
if(btn(5))goto _
goto d

P#75965 2020-05-06 14:24

[ :: Read More :: ]

Hello, this is the pico-port of our Windows Store game: Skiddy, the slippery puzzle.

Cart #bbp_skiddy-1 | 2020-04-04 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
21

Help skiddies leave a level by sliding them around all together and using the available obstacles to your advantage.
110 levels with different completion medals (explained in the tutorial).
Can you get them all?

It was a lot of fun to write this lean version for this wonderful fantasy console.
I only cut some bonus levels and hard mode to fit in the .png cart compression limit.
You can erase your progress from the pause menu.

Thanks to zep for his font and to the community for the awesome learning resources

UPDATE V 1.01

  • fixed a crashing bug after tutorial
  • cosmetic and music fixes

Game design by Christian "CH" Costanza, original programming and PICO-8 version by Andrea "TheRoboZ" Baldiraghi

Hope you'll enjoy it!

P#74434 2020-04-03 03:37 ( Edited 2020-04-04 14:25)