Log In  
Follow
Ender42
Follow

Cart #gloryhammer-0 | 2020-06-19 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

This is a game tribute to the prince of Fife.
It fall under the fan art category. While technically this cart has no actual references to the band, do not distribute this for money, Angus is their i.p.!
Someday:
He will quest for the jet pack and gain a dash ability.

  • this will include a laser dragon boss battle!

Then he will recharge his hammer in the sun and gain the smash ability.

  • this will include a Death Knight boss battle!

There may be 8bit heavy metal music!

P#78261 2020-06-19 07:43

Cart #zutamopuf-0 | 2020-03-17 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Here is what you have all needed in your life to combat the lows, and be with you in the highs. Maybe you didn't know you needed it, but here, have a Corgi! :D

P#74007 2020-03-17 11:26

Cart #topifaname-0 | 2020-03-05 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Howdy ya'll. Maybe someday I'll make a full Cowboy RPG but for now, I just made a cowboy combat system.
Ride on!

P#73707 2020-03-05 22:37

Cart #pehukobido-0 | 2020-02-20 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Use this however you like!
button 4: jump
button 5: reset

P#73270 2020-02-20 04:02 ( Edited 2020-02-20 04:03)

Cart #sejorobate-0 | 2020-02-19 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

I could easily find a tutorial on how to make a bounding box collision function online, but I could not easily find an example of iterating through a table to test for collisions, so I made it myself in hopes to help new programmers.

-- collision example
-- andy c

function _init()
 -- create player object named block, each object in this example will need an x and a y
    block = {}
    block.x = 64
    block.y = 64
    -- create 6 walls
    walla = {}
    walla.x = ceil(rnd(120))
    walla.y = ceil(rnd(120))
    wallb = {}
    wallb.x = ceil(rnd(120))
    wallb.y = ceil(rnd(120))
    wallc = {}
    wallc.x = ceil(rnd(120))
    wallc.y = ceil(rnd(120))
    walld = {}
    walld.x = ceil(rnd(120))
    walld.y = ceil(rnd(120))
    walle = {}
    walle.x = ceil(rnd(120))
    walle.y = ceil(rnd(120))
    wallf = {}
    wallf.x = ceil(rnd(120))
    wallf.y = ceil(rnd(120))
    -- add the walls to the wall table
    walls = {walla, wallb, wallc, walld, walle, wallf} 
-- here's an inspirational quote: "wall-e" - wall-e
end

function collision(wall)
-- basically if it overlaps on two axis, it's a collision
    if(block.x < wall.x + 8 and 
        block.x + 8 > wall.x and
        block.y < wall.y + 8 and
        block.y + 8 > wall.y)then
        return true
    end
end

function _update()
 -- basically, move the coordinate, and test a collision for every object in the table. 
 -- if any of them return true, move back the coordinate to where it was
    -- left
    if (btn(0) and block.x > 0) then
        block.x -= 1
        for i in all(walls) do
            if (collision(i)) then
             block.x += 1
            end
        end
    end
    -- right
    if (btn(1) and block.x < 120) then
        block.x += 1
        for i in all(walls) do
            if (collision(i)) then
             block.x -= 1
            end
        end
    end
    -- up
    if (btn(2) and block.y > 0) then
        block.y -= 1
        for i in all(walls) do
            if (collision(i)) then
             block.y += 1
            end
        end
    end
    -- down
    if (btn(3) and block.y < 120) then
        block.y += 1
        for i in all(walls) do
            if (collision(i)) then
             block.y -= 1
            end
        end
    end
end

function _draw()
-- iterate through the table and draw a blue square for each block. draw a red square for the player
    cls()
    spr(1,block.x,block.y)
    for i in all(walls) do
        spr(2,i.x,i.y)
    end
end
P#73257 2020-02-19 21:13

Follow Lexaloffle:        
Generated 2020-08-12 00:33 | 0.102s | 4194k | Q:79