Log In  
Follow
petpolitics
Follow
Siege of Darkwood
by petpolitics

Hi All,

I wrote a small function to scale 8x8 sprites using a sprite number instead of using sspr() itself and having to pick out the x and y position each time.

I'm using it for the Toy Box Jam 2 where you have a spritesheet already made and you want to quickly resize things.

Updated function with feedback from @freds72 and @MBoffin:

function xspr(sprt,x,y,w,h)
    --sprt: sprite number
    --x: x position
    --y: y position
    --w: new sprite width
    --h: new sprite height
    local sx=(sprt%16)*8
    local sy=sprt\16*8
    sspr(sx,sy,8,8,x,y,w,h)
end

Original function:

function xspr(sprt,x,y,w,h)
    --sprt: sprite number
    --x: x position
    --y: y position
    --w: new sprite width
    --h: new sprite height

    local sx=0
    local sy=0
    for i=0,255,16 do
        if(sprt>=i) then
            sy=flr(i/2)
            sx=(sprt-i)*8
        end
    end
    sspr(sx,sy,8,8,x,y,w,h)
end

Probably already exists someplace but thought I'd share my own solution to the problem.

Cheers

P#86188 2021-01-06 00:29 ( Edited 2021-01-06 09:23)

To motivate me to continue working on the project I'm uploading a WIP version of a platformer I've been making.

Feel free to offer feedback but I know it's rough around the edges!

Cart #rab_bab-7 | 2021-04-13 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
5

Latest changes:

  • Improved jump physics
  • Particle collisions on death

Check out my other games!

Siege of Darkwood
Striking Thunder

P#85494 2020-12-16 22:18 ( Edited 2021-04-13 13:47)

Cart #siege_of_darkwood-9 | 2020-12-24 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
6

This is my remake of a long forgotten 68k Mac shareware game of the same name, originally created by Robert Chancellor. I've updated the rules from AD&D to D&D5e and added some extra items.

Aim

You play as Derek Silverhand and are tasked with protecting Darkwood from Torque's approaching hordes.
Survive 10 waves of enemies to win the game!
Darkwood will fall if Derek falls in combat or the advancing hordes destroy the castle!

How to Play

Prepare yourself

Buy equipment like swords and armour from the 4 item shops.

Enter the battlefield

Enter the battlefield and engage with your target

Fight valiantly

The waves of enemies will advance position after the battle is over

Healing

Don't forget to Heal at the Temple if needed

Level Up

Level up and check your stats on the Stats screen

Controls

Z/C - select
X - cancel
Arrow Buttons - control menus or move around the battlefield

Up - access Pico-8 menu from the main screen

Stat Bonuses

Str - Extra Damage
Dex - Harder to Hit
Int - Extra Magic Damage
Wis - Extra XP
Cha - Reduced Shop Prices
Con - Extra HP on Level Up

Check out my other games!

Rab Bab
Striking Thunder

P#80548 2020-08-09 13:14 ( Edited 2021-01-11 13:01)

Cart #striking_thunder-0 | 2020-05-26 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
1

Arrows move

Z/C shoot

X switches ship mode.

The Robot mode's weapon reflects enemy shots. If a reflected shot takes out an enemy ship, you gain a charge.

Decided to have a crack at making a shmup after rolling the name Striking Thunder in the #RNDGAME2020 jam. Kudos to Dan for creating the title screen.

P#77210 2020-05-26 02:38

Follow Lexaloffle:        
Generated 2021-10-16 03:21:03 | 0.084s | Q:20