🤑 Indie game store🙌 Free games😂 Fun games😨 Horror games
👷 Game development🎨 Assets📚 Comics
🎉 Sales🎁 Bundles

allaze-eroler

23
Posts
4
Topics
4
Following
A member registered 178 days ago

Recent community posts

you could do this in the top row and just below of the F1 to F10 buttons of your keyboard since it's where it should be pressed. but i supposed there might be a problem related to that since someone already reported this somewhere in the forum...

i hope it does helped you :)

so apparently it was a bug from your game engine? interesting... guess i will have to push further my planned release of the first prototype to september or october instead of august XD;

well, take your time to polish your game engine :)

i'm glad you like this idea, i'm looking forward it then! :D

alright, after a few day of figuring out how to display correctly the hud and the room, i successed it, unfortunately, i encountered a weird bug that is driving me nuts... so, here the problem i have:

function Draw(HUD)
    if(drawHUD == true) then
        BackgroundColor(0)
        Clear()
        DrawTilemap(0, 0, 40, 8)
        drawHUD = false
    else
        BackgroundColor(31)
        Clear()
        DrawTilemap(16, hudHeight, 288, 112)
    end
end
function Draw(ROOM)
    BackgroundColor(31)
    Clear()
    DrawTilemap(16, hudHeight, 288, 112)
end
function Draw(OBJECTS)
    -- body
end
function Draw(SPRITES)
    BackgroundColor(31)
    Clear(16, hudHeight, 288, 112)
    DrawTilemap()
-- character position starter.
    local newX = 48
    local newY = 121
--that line of code will tell where to get the sprite data. so, the game will be able to animate them.
    local frameData = speakingNormal2Frames[idleFrame]
-- that little "if(frameData ~= nil) then" is REALLY important to add. so, it will not display "out of the range"
-- everytime i start the game.
-- each variable will be called from the array code at the start of file.
    if(frameData ~= nil) then
        DrawSprites(frameData.spriteData.spriteIDs, newX, newY, frameData.spriteData.width)
    end
-- We are going to detect if the mouse is on the screen. When the cursor is within the bounds
-- of the DisplayChip, we will show its x and y position.
    if (mousePos.x < 0 or mousePos.y < 0) then
    else
-- We also need to draw it to the display. We'll be using the DrawSprites() method to take the four cursor sprites and render them in a 2 x 2 grid.
        DrawSprites(greenCursorSprites, mousePos.x, mousePos.y, cursorWidth)
        OverscanBorder(1,1)
    end
end

any idea why it isn't  working like i wanted? also, the background bug is anoying as well. ah yes, here the pic of how annoying it is:

that is before i change Draw() to Draw(HUD), Draw(ROOM), Draw(OBJECTS), Draw(SPRITES) which the background color become all orange. 


any suggestions are welcomed!

hello, sorry to interfer it but after reading the whole thread, i remember of  a small well known fact among old devs team that i'm been reading or watch video: in devkit of each console gen, they tend to add one extra chip or other thing mainly used for debug like you tried to do there since a while. so, my suggestion is this:

why don't you create a dedicated dev chip for debugging part? once exported, the dev chip will be removed fully from the exported game :)

and also, check this wikipedia: https://en.wikipedia.org/wiki/... it will give you some idea of how different these dev console kit are... :)

(Edited 1 time)

alright! here how far i've done with the sprites and the like:

first of all, here the sprites sheet:

now here the animation of these sprites:

and now here 2 rooms wips i've done so far:

the second level which it's still far from done:

here a few icons i made for the "game":

the result of the "game":


bonus just for fun that i've done it before the release of PV8 0.70a, a pregnant version of the main character... ^^; :



that is all for now!

(Edited 1 time)

as pixel explained it, it was my fault for not double checking the array tables... and the "function update(timeDelta)" that pixel provided for me greatly helped me to get the right timing for each frame! many thank to him! :D

alright, now that i fixed most of stuff, here the current code source i made so far:

-- still sprite of normal udder and clothed edition.
MomooStillN2={width=8,unique=37,total=64,spriteIDs={-1,-1,-1,-1,0,1,2,-1,-1,-1,15,16,17,18,19,-1,-1,-1,45,46,91,92,49,-1,-1,-1,-1,-1,112,113,114,-1,-1,158,159,160,161,224,225,-1,-1,235,236,237,238,321,322,323,-1,-1,-1,348,349,428,429,430,-1,-1,-1,-1,452,489,490,-1}}
-- flick cycle of normal udder and clothed edition.
MomooFlickN2={width=8,unique=37,total=64,spriteIDs={-1,-1,-1,-1,0,1,2,-1,-1,-1,26,27,28,18,19,-1,-1,-1,65,66,101,92,49,-1,-1,-1,-1,-1,112,113,114,-1,-1,158,159,160,161,224,225,-1,-1,235,236,237,238,321,322,323,-1,-1,-1,348,349,428,429,430,-1,-1,-1,-1,452,489,490,-1}}
-- idle cycle of normal udder and clothed edition.
MomooIdleN2_2={width=8,unique=37,total=64,spriteIDs={-1,-1,-1,-1,3,4,5,-1,-1,-1,20,21,22,23,24,-1,-1,-1,50,51,93,94,54,-1,-1,-1,-1,-1,115,116,117,-1,-1,158,159,164,226,227,228,-1,-1,235,236,242,243,324,325,326,-1,-1,-1,270,353,431,429,432,-1,-1,-1,-1,452,489,490,-1}}
MomooIdleN2_3={width=8,unique=36,total=64,spriteIDs={-1,-1,-1,-1,3,4,5,-1,-1,-1,20,21,22,25,24,-1,-1,-1,50,51,95,96,57,-1,-1,-1,-1,-1,118,119,117,-1,-1,167,168,169,229,227,230,-1,-1,245,246,247,248,327,328,329,-1,-1,-1,355,356,433,434,-1,-1,-1,-1,-1,452,489,490,-1}}
MomooIdleN2_4={width=8,unique=37,total=64,spriteIDs={-1,-1,-1,-1,3,4,5,-1,-1,-1,20,21,22,23,24,-1,-1,-1,50,51,93,97,59,-1,-1,-1,-1,-1,115,116,117,-1,-1,158,159,164,226,227,228,-1,-1,235,236,242,243,324,325,326,-1,-1,-1,270,353,431,429,432,-1,-1,-1,-1,452,489,490,-1}}
MomooIdleN2_5={width=8,unique=37,total=64,spriteIDs={-1,-1,-1,-1,0,1,2,-1,-1,-1,15,16,17,18,19,-1,-1,-1,45,46,91,98,61,-1,-1,-1,-1,-1,112,120,121,-1,-1,158,159,160,161,224,225,-1,-1,235,236,237,238,321,322,323,-1,-1,-1,348,349,428,429,430,-1,-1,-1,-1,452,489,490,-1}}
MomooIdleN2_6={width=8,unique=37,total=64,spriteIDs={-1,-1,-1,-1,0,1,2,-1,-1,-1,15,16,17,18,19,-1,-1,-1,45,46,91,99,63,-1,-1,-1,-1,-1,112,113,114,-1,-1,158,159,160,161,224,225,-1,-1,235,236,237,238,321,322,323,-1,-1,-1,348,349,428,429,430,-1,-1,-1,-1,452,489,490,-1}}
MomooIdleN2_7={width=8,unique=37,total=64,spriteIDs={-1,-1,-1,-1,0,1,2,-1,-1,-1,15,16,17,18,19,-1,-1,-1,45,46,91,100,49,-1,-1,-1,-1,-1,112,113,114,-1,-1,158,159,160,161,224,225,-1,-1,235,236,237,238,321,322,323,-1,-1,-1,348,349,428,429,430,-1,-1,-1,-1,452,489,490,-1}}
-- speaking cycle of normal udder and clothed edition.
MomooSpeakingN2_1={width=8,unique=37,total=64,spriteIDs={-1,-1,-1,-1,0,1,2,-1,-1,-1,15,16,17,18,19,-1,-1,-1,45,46,91,102,49,-1,-1,-1,-1,-1,112,113,114,-1,-1,158,159,160,161,224,225,-1,-1,235,236,237,238,321,322,323,-1,-1,-1,348,349,428,429,430,-1,-1,-1,-1,452,489,490,-1}}
MomooSpeakingN2_2={width=8,unique=37,total=64,spriteIDs={-1,-1,-1,-1,0,1,2,-1,-1,-1,15,16,17,18,19,-1,-1,-1,45,46,91,103,49,-1,-1,-1,-1,-1,112,120,114,-1,-1,158,159,160,161,224,225,-1,-1,235,236,237,238,321,322,323,-1,-1,-1,348,349,428,429,430,-1,-1,-1,-1,452,489,490,-1}}
MomooSpeakingN2_3={width=8,unique=37,total=64,spriteIDs={-1,-1,-1,-1,0,1,2,-1,-1,-1,15,16,17,18,19,-1,-1,-1,45,46,91,104,49,-1,-1,-1,-1,-1,112,120,114,-1,-1,158,159,160,161,224,225,-1,-1,235,236,237,238,321,322,323,-1,-1,-1,348,349,428,429,430,-1,-1,-1,-1,452,489,490,-1}}
MomooSpeakingN2_4={width=8,unique=37,total=64,spriteIDs={-1,-1,-1,-1,0,1,2,-1,-1,-1,15,16,17,18,19,-1,-1,-1,45,46,91,105,49,-1,-1,-1,-1,-1,112,113,114,-1,-1,158,159,160,161,224,225,-1,-1,235,236,237,238,321,322,323,-1,-1,-1,348,349,428,429,430,-1,-1,-1,-1,452,489,490,-1}}
MomooSpeakingN2_5={width=8,unique=37,total=64,spriteIDs={-1,-1,-1,-1,0,1,2,-1,-1,-1,15,16,17,18,19,-1,-1,-1,45,46,91,106,49,-1,-1,-1,-1,-1,112,113,114,-1,-1,158,159,160,161,224,225,-1,-1,235,236,237,238,321,322,323,-1,-1,-1,348,349,428,429,430,-1,-1,-1,-1,452,489,490,-1}}
MomooSpeakingN2_6={width=8,unique=37,total=64,spriteIDs={-1,-1,-1,-1,0,1,2,-1,-1,-1,15,16,17,18,19,-1,-1,-1,45,46,91,102,49,-1,-1,-1,-1,-1,112,113,114,-1,-1,158,159,160,161,224,225,-1,-1,235,236,237,238,321,322,323,-1,-1,-1,348,349,428,429,430,-1,-1,-1,-1,452,489,490,-1}}
-- still sprite of normal udder and clothed edition.
local StillNormal2 = {
    {spriteData = MomooStillN2, time = 5}
}
-- Here we will store the random idle animation data.
-- the idle cycle of normal udder and clothed edition.
local idleNormal2Frames = {
    {spriteData = MomooIdleN2_1, time = .1},
    {spriteData = MomooIdleN2_2, time = .56},
    {spriteData = MomooIdleN2_3, time = .08},
    {spriteData = MomooIdleN2_4, time = .1},
    {spriteData = MomooIdleN2_5, time = .1},
    {spriteData = MomooIdleN2_6, time = .08}
}
-- flick cycle of normal udder and clothed edition.
local FlickNormal2 = {
    {spriteData = MomooFlickN2, time = .05}
}
-- The speaking cycle of normal udder and clothed edition.
local speakingNormal2Frames = {
    {spriteData = MomooSpeakingN2_1, time = .12},
    {spriteData = MomooSpeakingN2_2, time = .12},
    {spriteData = MomooSpeakingN2_3, time = .12},
    {spriteData = MomooSpeakingN2_4, time = .12},
    {spriteData = MomooSpeakingN2_5, time = .12},
    {spriteData = MomooSpeakingN2_6, time = .12}
}
-- these different local will be used for timing of each frame.
local idleDelay = .2
local idleTime = 0
local idleFrame = 1
-- The Mouse Demo shows off how to capture mouse input and display a cursor on the screen.
-- Pixel Vision 8 requires the runner to supply mouse data via the ControllerChip.You will
-- need to implement the IMouseInput interface and register a custom Mouse Class with the
-- ControllerChip in order for this demo to work.
-- We need to create some fields to store the mouse cursor's sprites, dimensions, position, and offset.
local greenCursorSprites = {0493,0494,0495,0496}
local redCursorSprites = {0497,0498,0499,0500}
local greyCursorSprites = {0501,0502,0503,0504}
local handCursorSprites = {0505,0506,0507,0508}
local eyeCursorSprites ={0509,0510,0511,0512}
local crossCursorSprites ={0513,0514,0515,0516}
local cursorWidth = 2
local fontOffsetX = 128
local mousePos = {x = -1, y = 0}
-- The Init() method is part of the game's lifecycle and called a game starts. We are going to
-- use this method to configure background color, ScreenBufferChip and draw a text box.
function Init()
-- Before we start, we need to set a background color and rebuild the ScreenBufferChip. The screen buffer
-- allows us to draw our fonts into the background layer to save on draw calls.
    BackgroundColor(31)
    DrawText("momoo game test Demo", 1, 1, DrawMode.Tile, "default")
-- This default text will help display the current state of the mouse. We'll render it into the
-- ScreenBufferChip to cut down on sprite draw calls.
--DrawText("MOUSE POSITION", 1, 1, DrawMode.Tile, "large-font", 0);
--DrawText("BUTTON 1 DOWN", 1, 3, DrawMode.Tile, "large-font", 0);
--DrawText("BUTTON 2 DOWN", 1, 4, DrawMode.Tile, "large-font", 0);
end
-- The Update() method is part of the game's life cycle. The engine calls Update() on every frame
-- before the Draw() method. It accepts one argument, timeDelta, which is the difference in
-- milliseconds since the last frame.
function Update(timeDelta)
-- The APIBridge exposes a property for the mouse's x and y position. We'll store this in a field and
-- retrieve it during Draw() execution of the GameChip's life cycle.
    mousePos = MousePosition()
-- While this step may appear to be wasteful, it's important to separate any calculation logic from
-- render logic. This optimization technique will ensure the best performance for Pixel Vision 8 games
-- and free up the Draw() method to only focus on rendering.
-- Here we are tracking the each iddles animation features.
    idleTime = idleTime + timeDelta
    if(idleTime > idleDelay) then
        idleFrame = idleFrame + 1
        if(idleFrame > #idleNormal2Frames) then
             idleFrame = 1
        end
        idleDelay = idleNormal2Frames[idleFrame].time
        idleTime = 0
        end
    end
-- The Draw() method is part of the game's life cycle. It is called after Update() and is where
-- all of our draw calls should go. We'll be using this to render sprites to the display.
function Draw()
    RedrawDisplay()
-- For the last bit of code we are just going to display whether the left or right mouse button is being held down by using the
-- GetMouseButton() method on the APIBridge.
    --[[DrawText(tostring(MouseButton(0)):upper(), fontOffsetX - 8, 24, DrawMode.Sprite, "large-font", 0)
    DrawText(tostring(MouseButton(1)):upper(), fontOffsetX - 8, 32, DrawMode.Sprite, "large-font", 0)
    ]]
-- character position starter.
    local newX = 8
    local newY = 128
--that line of code will tell where to get the sprite data. so, the game will be able to animate them.
    local frameData = idleNormal2Frames[idleFrame]
-- that little "if(frameData ~= nil) then" is REALLY important to add. so, it will not display "out of the range"
-- everytime i start the game.
-- each variable will be called from the array code at the start of file.
    if(frameData ~= nil) then
        DrawSprites(frameData.spriteData.spriteIDs, newX, newY, frameData.spriteData.width)
    end
-- We are going to detect if the mouse is on the screen. When the cursor is within the bounds
-- of the DisplayChip, we will show its x and y position.
    if (mousePos.x < 0 or mousePos.y < 0) then
        --[[ DrawText("OFFSCREEN", fontOffsetX, 8, DrawMode.Sprite, "large-font", 0)
        ]]
    else
-- Pixel Vision 8 automatically returns a -1 value for the mouse x and y position if it is out of the bounds of the DisplayChip
-- or if a mouse was is not registered with the ControllerChip.
-- Since the mouse within the display, let's show its current x and y position.
        --[[ DrawText("(" ..  mousePos.x .. "," .. mousePos.y .. ")", fontOffsetX, 8, DrawMode.Sprite, "large-font", 0)
        ]]
-- We also need to draw it to the display. We'll be using the DrawSprites() method to take the four cursor sprites and render them in a 2 x 2 grid.
        DrawSprites(greenCursorSprites, mousePos.x, mousePos.y, cursorWidth)
    end
end

of course, all the sprites data will be saved as "momoosprites.lua to avoid any change from "sb-sprites.lua" so, i could manually update each new data :) for now, all i'm trying to figure is how to randomize each idles, i suppose i have to use that math.random in one of these code line?

we will see how it will go with some test! :D

oh and i will soon post a demo example for those who want to know how to get a dynamic time frame for one animation.

edit: i forgot to fix that tiny bug in the

local framedData = idleNormal2Frames[idleFrame]

 XD;;;;

something tell me that out of range exception might be a bug from your new api, i tried everything and i even used your DrawSpriteDemo as a base and bring my spriteIDS i made with sprite builder in the place of fireball's SpriteIDs. it still said out of range.

i suppose it was because my sprites is larger than 8x8? since it's a 64x64 as sprite size.

(Edited 2 times)

alright! now that the PV8 update is finally here, the new features are wonderful but that doesn't solve the problem i have.


here how it will happen when i use the current code as result:


as you can see, it's not what i'm trying to achieve, here what is the goal i wanted the game display:

as you can see, the duration of each frame are dynamic which it's exactly what i'm trying to achieve. do you know what is the right methode to achieve it?

i will upload the code source once i finish cleaning them all from the old api to the new api.

alright, i just finished cleaning my code source and added the mouse features that worked pretty well but not yet fixed the sprite part of character... i always get that message: 

"IndexOutOfRangeException:
Array index is out of range."

wondering why it happened even though i did them right... might have something about the last part of code. allright, here the code source:

-- spritelib-start
-- idle cycle of normal udder and clothed edition.
MomooIdleN2_1={width=8,unique=37,total=64,spriteIDs={-1,-1,-1,-1,0,1,2,-1,-1,-1,15,16,17,18,19,-1,-1,-1,45,46,91,92,49,-1,-1,-1,-1,-1,112,113,114,-1,-1,158,159,160,161,224,225,-1,-1,235,236,237,238,321,322,323,-1,-1,-1,348,349,428,429,430,-1,-1,-1,-1,452,489,490,-1}}
MomooIdleN2_2={width=8,unique=37,total=64,spriteIDs={-1,-1,-1,-1,3,4,5,-1,-1,-1,20,21,22,23,24,-1,-1,-1,50,51,93,94,54,-1,-1,-1,-1,-1,115,116,117,-1,-1,158,159,164,226,227,228,-1,-1,235,236,242,243,324,325,326,-1,-1,-1,270,353,431,429,432,-1,-1,-1,-1,452,489,490,-1}}
MomooIdleN2_3={width=8,unique=36,total=64,spriteIDs={-1,-1,-1,-1,3,4,5,-1,-1,-1,20,21,22,25,24,-1,-1,-1,50,51,95,96,57,-1,-1,-1,-1,-1,118,119,117,-1,-1,167,168,169,229,227,230,-1,-1,245,246,247,248,327,328,329,-1,-1,-1,355,356,433,434,-1,-1,-1,-1,-1,452,489,490,-1}}
MomooIdleN2_4={width=8,unique=37,total=64,spriteIDs={-1,-1,-1,-1,3,4,5,-1,-1,-1,20,21,22,23,24,-1,-1,-1,50,51,93,97,59,-1,-1,-1,-1,-1,115,116,117,-1,-1,158,159,164,226,227,228,-1,-1,235,236,242,243,324,325,326,-1,-1,-1,270,353,431,429,432,-1,-1,-1,-1,452,489,490,-1}}
MomooIdleN2_5={width=8,unique=37,total=64,spriteIDs={-1,-1,-1,-1,0,1,2,-1,-1,-1,15,16,17,18,19,-1,-1,-1,45,46,91,98,61,-1,-1,-1,-1,-1,112,120,121,-1,-1,158,159,160,161,224,225,-1,-1,235,236,237,238,321,322,323,-1,-1,-1,348,349,428,429,430,-1,-1,-1,-1,452,489,490,-1}}
MomooIdleN2_6={width=8,unique=37,total=64,spriteIDs={-1,-1,-1,-1,0,1,2,-1,-1,-1,15,16,17,18,19,-1,-1,-1,45,46,91,99,63,-1,-1,-1,-1,-1,112,113,114,-1,-1,158,159,160,161,224,225,-1,-1,235,236,237,238,321,322,323,-1,-1,-1,348,349,428,429,430,-1,-1,-1,-1,452,489,490,-1}}
MomooIdleN2_7={width=8,unique=37,total=64,spriteIDs={-1,-1,-1,-1,0,1,2,-1,-1,-1,15,16,17,18,19,-1,-1,-1,45,46,91,100,49,-1,-1,-1,-1,-1,112,113,114,-1,-1,158,159,160,161,224,225,-1,-1,235,236,237,238,321,322,323,-1,-1,-1,348,349,428,429,430,-1,-1,-1,-1,452,489,490,-1}}
-- spritelib-end
-- mode enums
local Up, Down, Right, Left, A, B, Select, Start = 0, 1, 2, 3, 4, 5, 6, 7
    local MomooIdleNormal2Sprites = {
            MomooIdleN2_1[1],
            MomooIdleN2_2[1],
            MomooIdleN2_3[1],
            MomooIdleN2_4[1],
            MomooIdleN2_5[1],
            MomooIdleN2_6[1],
            MomooIdleN2_7[1],
            MomooIdleN2_8[1]}
local idleNormal2Animation = {
    {sprite = MomooIdleNormal2Sprites[1], hFlip = false, vFlip = false, time = 2},
    {sprite = MomooIdleNormal2Sprites[2], hFlip = false, vFlip = false, time = .1},
    {sprite = MomooIdleNormal2Sprites[3], hFlip = false, vFlip = false, time = .16},
    {sprite = MomooIdleNormal2Sprites[4], hFlip = false, vFlip = false, time = .4},
    {sprite = MomooIdleNormal2Sprites[5], hFlip = false, vFlip = false, time = .08},
    {sprite = MomooIdleNormal2Sprites[6], hFlip = false, vFlip = false, time = .1},
    {sprite = MomooIdleNormal2Sprites[7], hFlip = false, vFlip = false, time = .1},
    {sprite = MomooIdleNormal2Sprites[8], hFlip = false, vFlip = false, time = .08}
}
-- Here we will store the random idle animation data
local idleDelay = .2
local idleTime = 0
local idleFrame = 1
-- The Mouse Demo shows off how to capture mouse input and display a cursor on the screen.
-- Pixel Vision 8 requires the runner to supply mouse data via the ControllerChip.You will
-- need to implement the IMouseInput interface and register a custom Mouse Class with the
-- ControllerChip in order for this demo to work.
-- We need to create some fields to store the mouse cursor's sprites, dimensions, position, and offset.
local greenCursorSprites = {0493,0494,0495,0496}
local redCursorSprites = {0497,0498,0499,0500}
local greyCursorSprites = {0501,0502,0503,0504}
local handCursorSprites = {0505,0506,0507,0508}
local eyeCursorSprites ={0509,0510,0511,0512}
local crossCursorSprites ={0513,0514,0515,0516}
local cursorWidth = 2
local fontOffsetX = 128
local mousePos = {x = -1, y = 0}
-- The Init() method is part of the game's lifecycle and called a game starts. We are going to
-- use this method to configure background color, ScreenBufferChip and draw a text box.
function Init()
    -- Before we start, we need to set a background color and rebuild the ScreenBufferChip. The screen buffer
    -- allows us to draw our fonts into the background layer to save on draw calls.
    BackgroundColor(31)
    DrawText("momoo game test Demo", 1, 1, DrawMode.Tile, "default")
    -- This default text will help display the current state of the mouse. We'll render it into the
    -- ScreenBufferChip to cut down on sprite draw calls.
    DrawText("MOUSE POSITION", 1, 1, DrawMode.Tile, "large-font", 0);
    DrawText("BUTTON 1 DOWN", 1, 3, DrawMode.Tile, "large-font", 0);
    DrawText("BUTTON 2 DOWN", 1, 4, DrawMode.Tile, "large-font", 0);
    local pipeX = 1
    local pipeY = 21
end
-- The Update() method is part of the game's life cycle. The engine calls Update() on every frame
-- before the Draw() method. It accepts one argument, timeDelta, which is the difference in
-- milliseconds since the last frame.
function Update(timeDelta)
    -- The APIBridge exposes a property for the mouse's x and y position. We'll store this in a field and
    -- retrieve it during Draw() execution of the GameChip's life cycle.
    mousePos = MousePosition()
    -- While this step may appear to be wasteful, it's important to separate any calculation logic from
    -- render logic. This optimization technique will ensure the best performance for Pixel Vision 8 games
    -- and free up the Draw() method to only focus on rendering.
    -- Here we are tracking the fireball animation
    idleTime = idleTime + timeDelta
    if(idleTime > idleDelay) then
        idleFrame = idleFrame + 1
        if(idleFrame > #idleNormal2Animation) then
             idleFrame = 1
        end
        idleTime = 0
        end
    end
-- The Draw() method is part of the game's life cycle. It is called after Update() and is where
-- all of our draw calls should go. We'll be using this to render sprites to the display.
function Draw()
    -- We can use the DrawScreenBuffer() method to clear the screen and redraw the tilemap in a
    -- single call.
    Clear()
    DrawTilemap(0, 0, 32, 30)
    -- We can use the RedrawDisplay() method to clear the screen and redraw the tilemap in a
    -- single call.
    RedrawDisplay()
    -- For the last bit of code we are just going to display whether the left or right mouse button is being held down by using the
    -- GetMouseButton() method on the APIBridge.
    DrawText(tostring(MouseButton(0)):upper(), fontOffsetX - 8, 24, DrawMode.Sprite, "large-font", 0)
    DrawText(tostring(MouseButton(1)):upper(), fontOffsetX - 8, 32, DrawMode.Sprite, "large-font", 0)
    -- We are going to detect if the mouse is on the screen. When the cursor is within the bounds
    -- of the DisplayChip, we will show its x and y position.
    if (mousePos.x < 0 or mousePos.y < 0) then
        DrawText("OFFSCREEN", fontOffsetX, 8, DrawMode.Sprite, "large-font", 0)
    else
        -- Pixel Vision 8 automatically returns a -1 value for the mouse x and y position if it is out of the bounds of the DisplayChip
        -- or if a mouse was is not registered with the ControllerChip.
        -- Since the mouse within the display, let's show its current x and y position.
        DrawText("(" ..  mousePos.x .. "," .. mousePos.y .. ")", fontOffsetX, 8, DrawMode.Sprite, "large-font", 0)
        -- We also need to draw it to the display. We'll be using the DrawSprites() method to take the four cursor sprites and render them in a 2 x 2 grid.
        DrawSprites(greenCursorSprites, mousePos.x, mousePos.y, cursorWidth)
    end
    local newX = 8
    local newY = 48
    local frameData = idleNormal2Animation[idleFrame]
    newX = newX + 16
    DrawSprite(frameData.sprite, newX, newY, frameData.hFlip, frameData.vFlip) --frameData.time)
end

to be honest, this new api is really more elegant and cleaner than the old version which i'm very happy of the result! :) too bad that last portion of code is bugging me for a while now XD;

you're welcome :)

just read the link that pixel vision 8 shared, yuo will figure it soon enough :)

hint: create that folder.

yes here an example how pico-8 behaved, i think you will get some hint with this example



i hope it does help you out :) unfortunately, i couldn't find any information about that system... but i do hope you will figure it out :)

i've noticed that problem too, there is a solution which pico-8 managed to fixe somewhere. but i have no idea how he did it. i will update my post once i found that said solution.

hummmm yes that is what i had in mind, for now, i have to wait you release it so, i could test it out. since seeing like this, it's kind hard for me to imagine how is was going to work XD;;

ps: try to avoid jpg file because it cause lot of artifacts, use png or gif for pixel art :)

hello folks, after many test with the draw sprite demo, i wasn't able to make it work so, i decided to share it:

first, the code source:

--
-- Copyright (c) 2017, Jesse Freeman. All rights reserved.
--
-- Licensed under the Microsoft Public License (MS-PL) License.
-- See LICENSE file in the project root for full license information.
--
-- Contributors
-- --------------------------------------------------------
-- This is the official list of Pixel Vision 8 contributors:
--
-- Jesse Freeman - @JesseFreeman
-- Christer Kaitila - @McFunkypants
-- Pedro Medeiros - @saint11
-- Shawn Rakowski - @shwany
--

-- These values represent the shell's position, speed, animation
-- time and frame.
local shellAPos = {x = 0, y = 8*8}
local shellBPos = {x = 8*22, y = 0}

-- This 2D array stores sprite IDs for the turtle shell animations.
-- Each shell is a made up of 4 sprites in a 2x2 grid.
--local shellSprites = {{0,0,2,2},{1,1,3,3}}

local shellSprites =
    {
        {0,0,flipH,2,2,flipH},{1,1,flipH,3,3,flipH}
    }



local speed = 100

local time = 0
local frame = 1

-- The Init() method is part of the game's lifecycle and called a game
-- starts. We are going to use this method to configure the DisplayChip,
-- ScreenBufferChip and also draw fonts into the background layer.
function Init()

    -- Here we are starting by changing the background color and telling
    -- the DisplayChip to wrap.
    apiBridge:ChangeBackgroundColor(32)
    apiBridge:ToggleDisplayWrap(true)

    -- Here we are rebuilding the screen buffer so we can draw tile and
    -- fonts to it. This will cut down on our draw calls.
    apiBridge:RebuildScreenBuffer()

    -- With the ScreenBuffer ready, we can now draw fonts into it. Here
    -- we are creating two new labels to display under our demo sprites.
    apiBridge:DrawFontToBuffer("Sprite Test", 1, 1, "large-font", 0)
    apiBridge:DrawFontToBuffer("Position Wrap Test", 1, 6, "large-font", 0)

end

-- The Update() method is part of the game's life cycle. The engine
-- calls Update() on every frame before the Draw() method. It accepts
-- one argument, timeDelta, which is the difference in milliseconds
-- since the last frame. We are going to keep track of time to sync
-- up our sprite animation as well as move the sprites across the screen.
function Update(timeDelta)

    -- We are going to move the sprite positions by calculating the speed by
    -- the timeDelata. We can then add this to the x or y position of our sprite
    -- vector.
    shellAPos.x = math.ceil(shellAPos.x + (speed * timeDelta))
    shellBPos.y = math.ceil(shellBPos.y + (speed * timeDelta))

    -- We are going to keep track of the time by adding timeDelta to our time
    -- field. We can then use this to tell if we should change our animation frame.
    time = time + timeDelta

    -- Here we'll determine when it's time to change the sprite frame.
    if(time > 0.09) then

        -- If time is past the frame we'll increase the frame number to advance the animation.
        frame = frame + 1

        -- We need to reset the frame number if it is greater than the number of frames.
        if(frame > #shellSprites) then
            frame = 1
        end

        -- Now we can reset time back to 0 to start tracking the next frame change.
        time = 0

    end

end

-- The Draw() method is part of the game's life cycle. It is called after Update() and
-- is where all of our draw calls should go. We'll be using this to render each of
-- the sprites and font characters to the display.
function Draw()

    -- It's important to clear the display on each frame. There are two ways to do this. Here
    -- we are going to use the DrawScreenBuffer() way to copy over the existing buffer and clear
    -- all of the previous pixel data.
    apiBridge:DrawScreenBuffer()

    -- Here we are going to draw the first example. The turtle shell is made up of 4 sprites.
    -- We'll draw each sprite out with a few pixels between them so you can see how they are
    -- put together.
    apiBridge:DrawSprite(0, 8, 24, false, false, true, 0)
    apiBridge:DrawSprite(0, 18, 24, true, false, true, 0)
    apiBridge:DrawSprite(2, 8, 34, false, false, true, 0)
    apiBridge:DrawSprite(2, 18, 34, true, false, true, 0)

    -- For the next two examples we'll use the DrawSprites() method
    -- which allows us to combine sprites together into a single draw request.
    -- Each sprite still counts as a draw call but this simplifies drawing
    -- larger sprites in your game.
    apiBridge:DrawSprites(shellSprites[1], 32, 24, 2, false, false, true, 0)
    --apiBridge:DrawSprites(shellSprites[frame], 54, 24, 2, false, false, true, 0)

    -- Here we are drawing a turtle shell along the x and y axis. We'll take advantage of the Display's wrap
    -- setting so that the turtle will appear on the opposite side of the screen even when the x or y
    -- position is out of bounds.
    --apiBridge:DrawSprites(shellSprites[frame], shellAPos.x, shellAPos.y, 2, false, false, true, 0)
    apiBridge:DrawFont("("..shellAPos.x..","..shellAPos.y..")", shellAPos.x, shellAPos.y + 20, "large-font", 0)

    -- The last thing we are going to do is draw text below each of our moving turtles so we can see the
    -- x and y position as they wrap around the display.
    --apiBridge:DrawSprites(shellSprites[frame], shellBPos.x, shellBPos.y, 2, false, false, true, 0)
    apiBridge:DrawFont("("..shellBPos.x..","..shellBPos.y..")", shellBPos.x, shellBPos.y + 20, "large-font", 0)

end
    

and the sprites i used for the coding part:



the idea is that we could display the shell with only one half of sprite and than mirroring it like the nes games actually does it. let take a look at that example i found from google:


as you may noticed, alot of sprite are only one half but can be mirrored thank to the coding part unfortunately, it's not pratical because it was in assembly language. so, that is why i'm trying to reproduce it in lua scripting because i know it might be possible but i haven't yet found how to do that. all i found as information is this:

https://nesdoug.com/2015/11/22/6-sprites/ as you see, many nes games used that trick to make it as a whole sprite by only using half, that is exactly what i'm trying to achieve. i don't know if the guy from nesdoug is using the lua scripting but it's clear that he found a way to do this way.

also, i found this interesting information about mirroring and flipping from nes dev:

https://wiki.nesdev.com/w/index.php/Mirroring and this: http://wiki.nesdev.com/w/index.php/PPU_OAM

if you have a better suggestion, feel free to share it!

i see! in this case, let cheer him! :D

hehe i see what you mean, i happen to want making game for this little beauty XD; (i wouldn't mind to donate a raspberry pi for you as my express to support your work) and also, it's an excellent way to test the limit of your game engine :)

ahhh i see why... in this case, i just have to wait a few months before i can use it :)

hello, i bough a raspberry pi 3 model B after i saw a video about your game engine working on a raspberry pi, how can i install your game engine on it?

Indeed! and I agree that you could make this way. Also, without that Sprite Builder, It would took me alot of time to write them down manually... ^^;

And thank you for taking your time to read my suggestion! :)

Hello, after some think, I found out there is a possible solution for making these animation sprites more easily, so here what I had as idea of workflow and I'm not sure if it was possible:

First, we have to export each animation into gif file that will contain each duration of one frame:


The second step would be to create a new folder called "AnimationBuilder" in our Workspace:

Then we will move each gif files in the new folder we created previously:

Once done, we should see this:


Which in this case, in the game creator we will get this kind of change:

At this step, we just have to hit that "animate builder" button. So, we could automatically generate this kind of code:

idle_nude_big = {
    frames = {
    idle_nude_big1 = {
        delay = 0,
        time=5,
        width=8,
        unique=38,
        frame= {-1,-1,-1,-1,0,1,2,-1,-1,-1,15,16,17,18,19,-1,-1,-1,44,45,46,47,48,-1,-1,-1,-1,-1,102,130,131,-1,-1,148,149,150,189,190,191,-1,-1,225,226,227,228,277,278,279,-1,-1,-1,337,338,383,384,385,-1,-1,-1,-1,431,432,433,434}
    },
    idle_nude_big2 = {
        delay = 0,
        time=0.1,
        width=8,
        unique=38,
        frame= {-1,-1,-1,-1,3,4,5,-1,-1,-1,20,21,22,23,24,-1,-1,-1,49,50,51,83,53,-1,-1,-1,-1,-1,105,132,133,-1,-1,148,149,154,192,190,193,-1,-1,225,226,232,233,280,281,282,-1,-1,-1,260,342,386,384,385,-1,-1,-1,-1,431,432,433,434}
    },
    idle_nude_big3 = {
        delay = 0,
        time=0.16,
        width=8,
        unique=38,
        frame= {-1,-1,-1,-1,3,4,5,-1,-1,-1,20,21,22,23,24,-1,-1,-1,49,50,54,84,53,-1,-1,-1,-1,-1,134,135,136,-1,-1,157,158,159,194,195,196,-1,-1,235,236,237,238,283,284,285,-1,-1,-1,344,345,387,388,348,-1,-1,-1,-1,431,435,436,437}
    },
    idle_nude_big4 = {
        delay = 0,
        time=0.4,
        width=8,
        unique=38,
        frame= {-1,-1,-1,-1,3,4,5,-1,-1,-1,20,21,22,23,24,-1,-1,-1,49,50,54,84,53,-1,-1,-1,-1,-1,134,135,136,-1,-1,157,158,159,194,195,196,-1,-1,235,236,237,238,283,284,285,-1,-1,-1,344,345,389,390,351,-1,-1,-1,-1,431,438,439,440}
    },
    idle_nude_big5 = {
        delay = 0,
        time=0.08,
        width=8,
        unique=38,
        frame= {-1,-1,-1,-1,3,4,5,-1,-1,-1,20,21,22,23,24,-1,-1,-1,49,50,51,85,58,-1,-1,-1,-1,-1,105,132,133,-1,-1,148,149,154,192,197,198,-1,-1,225,226,232,233,286,287,288,-1,-1,-1,260,342,389,390,351,-1,-1,-1,-1,431,438,439,440}
    },
    idle_nude_big6 = {
        delay = 0,
        time=0.1,
        width=8,
        unique=38,
        frame= {-1,-1,-1,-1,0,1,2,-1,-1,-1,15,16,17,18,19,-1,-1,-1,44,45,46,59,60,-1,-1,-1,-1,-1,102,137,138,-1,-1,148,149,150,189,190,191,-1,-1,225,226,227,228,277,278,279,-1,-1,-1,337,338,383,384,385,-1,-1,-1,-1,431,432,433,434}
    },
    idle_nude_big7 = {
        delay = 0,
        time=0.1,
        width=8,
        unique=38,
        frame= {-1,-1,-1,-1,0,1,2,-1,-1,-1,15,16,17,18,19,-1,-1,-1,44,45,46,61,62,-1,-1,-1,-1,-1,102,130,131,-1,-1,148,149,150,189,190,191,-1,-1,225,226,227,228,277,278,279,-1,-1,-1,337,338,391,392,393,-1,-1,-1,-1,431,441,442,443}
    },
    idle_nude_big8 = {
        delay = 0,
        time=0.08,
        width=8,
        unique=38,
        frame= {-1,-1,-1,-1,0,1,2,-1,-1,-1,15,16,17,18,19,-1,-1,-1,44,45,46,63,48,-1,-1,-1,-1,-1,102,130,131,-1,-1,148,149,150,189,190,191,-1,-1,225,226,227,228,277,278,279,-1,-1,-1,337,338,383,384,385,-1,-1,-1,-1,431,432,433,434}
        }
    }

Of course, the script part will not be like that way because I have no idea if it's the right way to write these array. And as you can see, it's the same principle of SpriteBuilder method.

I hope my suggestion will give you some ideas.

(Edited 1 time)

finally, i fixed the problem with the animation! apparently, the problem was because of that line of code:

local spriteData = anim.frames[frame]
if(spriteData ~= nil) then
   apiBridge:DrawSprites(spriteData.spriteIDs, 20, 70, spriteData.width, false, false, true, 0)
end

but actually, i should have used this way:

local spriteData = anim.frames[anim.frame]
if(spriteData ~= nil) then
   apiBridge:DrawSprites(spriteData.spriteIDs, 20, 70, spriteData.width, false, false, true, 0)
end

no wonder why i haven't though of adding that kind of information...

alright! now, here the result i managed to get so far:


ok, now it's time to figure out how to give each frame a precise timing, let me explain: for example, the first frame will stay for let said 10 seconds the rest of frames will have different time to give some dynamism. for now, i have though of this code:

-- animation data

local anim = {
   delay = 0,
   frame = 1,
   time = 5,0.1,0.16,0.4,0.8,0.1,0.1,0.8,
   total = 8,
   frames=
      {player_idle_big11,player_idle_big12,player_idle_big13,player_idle_big14,player_idle_big15,player_idle_big16,player_idle_big17,player_idle_big18},
      {player_idle_big21,player_idle_big22,player_idle_big23,player_idle_big24,player_idle_big25,player_idle_big26,player_idle_big27,player_idle_big28},
      {player_idle_big11,player_flick_big1},
      {player_idle_big21,player_flick_big2},
      {player_alt_idle_big11,player_alt_idle_big12,player_alt_idle_big13,player_alt_idle_big14,player_alt_idle_big15,player_alt_idle_big16,player_alt_idle_big17,player_alt_idle_big18},
      {player_alt_idle_big21,player_alt_idle_big22,player_alt_idle_big23,player_alt_idle_big24,player_alt_idle_big25,player_alt_idle_big26,player_alt_idle_big27,player_alt_idle_big28}
}

and apparently, it didn't worked like i hoped.

also, you might noticed that i switched "player" to "anim" because i found out that these animation loop is much adapted for "anim" rather than "player. i will add the randomizer for the idle, the flick, and the alternate idle for later. and once all of them is done, i will try to add the input on the character.

alright, i managed to fix every errors but i still can't find any clue why it's still displayed blank...

-- spritelib-start
-- idle cycle of the swell udder version.
player_idle_big21={time=500,width=8,unique=41,total=64,spriteIDs={-1,-1,-1,-1,0,1,2,-1,-1,-1,17,18,19,20,21,-1,-1,-1,47,48,49,50,51,-1,-1,-1,-1,78,87,88,89,-1,-1,113,114,115,116,117,118,-1,-1,157,158,159,160,161,162,163,-1,213,-1,214,215,216,217,218,-1,-1,-1,264,265,266,267,268}}
player_idle_big22={time=100,width=8,unique=40,total=64,spriteIDs={-1,-1,-1,-1,3,4,5,-1,-1,-1,22,23,24,25,26,-1,-1,-1,52,53,54,55,56,-1,-1,-1,-1,-1,90,91,92,-1,-1,113,114,119,120,117,121,-1,-1,157,158,164,165,166,162,163,-1,213,-1,219,220,221,217,218,-1,-1,-1,264,265,266,267,268}}
player_idle_big23={time=160,width=8,unique=40,total=64,spriteIDs={-1,-1,-1,-1,3,4,5,-1,-1,-1,22,23,24,25,26,-1,-1,-1,52,53,57,58,59,-1,-1,-1,-1,-1,93,94,92,-1,-1,122,123,124,125,126,127,-1,-1,167,168,169,170,171,172,173,-1,222,-1,223,224,225,226,227,-1,-1,-1,264,265,269,270,271}}
player_idle_big24={time=400,width=8,unique=40,total=64,spriteIDs={-1,-1,-1,-1,3,4,5,-1,-1,-1,22,23,24,25,26,-1,-1,-1,52,53,57,58,59,-1,-1,-1,-1,-1,93,94,92,-1,-1,122,123,124,125,126,127,-1,-1,167,168,169,170,171,172,173,-1,222,-1,223,224,228,229,230,-1,-1,-1,264,265,272,273,274}}
player_idle_big25={time=80,width=8,unique=40,total=64,spriteIDs={-1,-1,-1,-1,3,4,5,-1,-1,-1,22,23,24,25,26,-1,-1,-1,52,53,54,60,61,-1,-1,-1,-1,-1,90,91,92,-1,-1,122,123,128,120,117,129,-1,-1,167,168,174,165,166,162,163,-1,222,-1,231,220,232,233,234,-1,-1,-1,264,265,272,273,274}}
player_idle_big26={time=100,width=8,unique=41,total=64,spriteIDs={-1,-1,-1,-1,0,1,2,-1,-1,-1,17,18,19,20,21,-1,-1,-1,47,48,62,63,64,-1,-1,-1,-1,78,87,95,96,-1,-1,113,114,115,116,117,118,-1,-1,157,158,159,160,161,162,163,-1,213,-1,214,215,216,217,218,-1,-1,-1,264,265,266,267,268}}
player_idle_big27={time=100,width=8,unique=41,total=64,spriteIDs={-1,-1,-1,-1,0,1,2,-1,-1,-1,17,18,19,20,21,-1,-1,-1,47,48,62,65,66,-1,-1,-1,-1,78,87,88,89,-1,-1,113,114,115,116,117,118,-1,-1,157,158,159,160,161,162,163,-1,213,-1,214,215,235,236,237,-1,-1,-1,264,265,275,276,277}}
player_idle_big28={time=80,width=8,unique=41,total=64,spriteIDs={-1,-1,-1,-1,0,1,2,-1,-1,-1,17,18,19,20,21,-1,-1,-1,47,48,62,67,51,-1,-1,-1,-1,78,87,88,89,-1,-1,113,114,115,116,117,118,-1,-1,157,158,159,160,161,162,163,-1,213,-1,214,215,216,217,218,-1,-1,-1,264,265,266,267,268}}
-- spritelib-end

-- mode enums
local Up, Down, Right, Left, A, B, Select, Start = 0, 1, 2, 3, 4, 5, 6, 7

-- animation data
local player = {
    delay = 0,
    frame = 1,
    time = .2,
    total = 8,
    frames=
    {player_idle_big21,
    player_idle_big22,
    player_idle_big23,
    player_idle_big24,
    player_idle_big25,
    player_idle_big26,
    player_idle_big27,
    player_idle_big28}
}

-- The Init() method is part of the game's lifecycle and called a game starts. We are going to
-- use this method to configure background color, ScreenBufferChip and draw a text box.
function Init()

    -- Here we are manually changing the background color
    apiBridge:ChangeBackgroundColor(64)

    -- We are going to render text into the ScreenBuffer so need to rebuild it first.
    apiBridge:RebuildScreenBuffer()

end

-- The Update() method is part of the game's life cycle. The engine calls Update() on every frame
-- before the Draw() method. It accepts one argument, timeDelta, which is the difference in
-- milliseconds since the last frame.
function Update(timeDelta)

    -- update animation timer
    player.delay = player.delay + timeDelta

    -- see if we should change animation
    if(player.delay > player.time) then

        -- reset the delay
        player.delay = 0

        -- update the current frame
        player.frame = player.frame + 1

        -- make sure we reset the frame counter when out of anim.frames
        if(player.frame > player.total) then
            player.frame = 1
        end
    end

end

-- The Draw() method is part of the game's life cycle. It is called after Update() and is where
-- all of our draw calls should go. We'll be using this to render sprites to the display.
function Draw()

-- Since we are using the ScreenBuffer, we can use this to clear the display
    apiBridge:DrawScreenBuffer()

local spriteData = player [frame]

    if(spriteData ~= nil) then
       apiBridge:DrawSprites(player[1], 20, 70, false, false, true, 0)
    end
end

i'm starting to wonder if it wasn't because of the player array is the problem

well, that aside, i will continue it for later, i will start cleaning up my sprites as well working on my rooms.

one question though: how can i set up my sprite as 2x2 instead of 8x8?

(Edited 3 times)

thank you for your help! now that i started to understand how it work but i encounter another problem with lua code: apparently, it doesn't work because i don't get the sprite animated.

here the code so far:

-- spritelib-start
player_alt_idle_big21={width=8,unique=41,total=64,spriteIDs={-1,-1,-1,-1,0,1,2,-1,-1,-1,17,18,19,20,21,-1,-1,-1,47,48,62,71,51,-1,-1,-1,-1,78,88,89,90,-1,-1,114,115,116,117,118,119,-1,-1,158,159,160,161,162,163,164,-1,214,-1,215,216,217,218,219,-1,-1,-1,265,266,267,268,269}}
player_alt_idle_big22={width=8,unique=42,total=64,spriteIDs={-1,-1,6,7,8,9,10,-1,-1,-1,30,31,32,33,34,-1,-1,-1,-1,72,73,74,75,-1,-1,-1,-1,78,88,98,97,-1,-1,114,115,131,132,133,119,-1,-1,158,159,176,177,178,163,164,-1,214,-1,239,240,222,218,219,-1,-1,-1,265,266,267,268,269}}
player_alt_idle_big23={width=8,unique=42,total=64,spriteIDs={-1,-1,6,7,8,9,10,-1,-1,-1,30,31,32,35,36,-1,-1,-1,-1,72,73,76,75,-1,-1,-1,-1,78,99,100,97,-1,-1,114,115,131,134,135,136,-1,-1,158,159,176,179,180,181,164,-1,214,-1,239,240,222,218,219,-1,-1,-1,265,266,267,268,269}}
player_alt_idle_big24={width=8,unique=42,total=64,spriteIDs={-1,-1,6,7,8,9,10,-1,-1,-1,30,31,32,35,36,-1,-1,-1,-1,72,73,77,75,-1,-1,-1,-1,78,101,102,97,-1,-1,114,115,131,137,138,119,-1,-1,158,159,176,182,183,184,185,-1,214,-1,239,240,241,242,243,-1,-1,-1,265,266,279,280,281}}
player_alt_idle_big25={width=8,unique=42,total=64,spriteIDs={-1,-1,6,7,8,9,10,-1,-1,-1,30,31,32,35,36,-1,-1,-1,-1,72,73,77,75,-1,-1,-1,-1,78,103,102,97,-1,-1,114,115,131,139,140,119,-1,-1,158,159,176,186,187,188,189,-1,214,-1,239,240,244,245,246,-1,-1,-1,265,266,282,283,284}}
player_alt_idle_big26={width=8,unique=42,total=64,spriteIDs={-1,-1,6,7,8,9,10,-1,-1,-1,30,31,32,33,34,-1,-1,-1,-1,72,73,76,75,-1,-1,-1,-1,78,88,98,97,-1,-1,114,115,131,132,133,119,-1,-1,158,159,176,177,190,191,189,-1,214,-1,239,240,247,248,246,-1,-1,-1,265,266,282,283,284}}
player_alt_idle_big27={width=8,unique=41,total=64,spriteIDs={-1,-1,-1,-1,0,1,2,-1,-1,-1,17,18,19,20,21,-1,-1,-1,47,48,62,67,51,-1,-1,-1,-1,78,88,89,90,-1,-1,114,115,116,117,118,119,-1,-1,158,159,160,161,162,163,164,-1,214,-1,215,216,217,218,219,-1,-1,-1,265,266,267,268,269}}
player_alt_idle_big28={width=8,unique=41,total=64,spriteIDs={-1,-1,-1,-1,0,1,2,-1,-1,-1,17,18,19,20,21,-1,-1,-1,47,48,62,67,51,-1,-1,-1,-1,78,88,89,90,-1,-1,114,115,116,117,118,119,-1,-1,158,159,160,161,192,193,185,-1,214,-1,215,216,249,242,243,-1,-1,-1,265,266,279,280,281}}

player_flick_big2={width=8,unique=41,total=64,spriteIDs={-1,-1,-1,-1,0,1,2,-1,-1,-1,27,28,29,20,21,-1,-1,-1,68,69,70,50,51,-1,-1,-1,-1,78,88,89,90,-1,-1,114,115,116,117,118,119,-1,-1,158,159,160,161,162,163,164,-1,214,-1,215,216,217,218,219,-1,-1,-1,265,266,267,268,269}}

player_idle_big21={width=8,unique=41,total=64,spriteIDs={-1,-1,-1,-1,0,1,2,-1,-1,-1,17,18,19,20,21,-1,-1,-1,47,48,49,50,51,-1,-1,-1,-1,78,88,89,90,-1,-1,114,115,116,117,118,119,-1,-1,158,159,160,161,162,163,164,-1,214,-1,215,216,217,218,219,-1,-1,-1,265,266,267,268,269}}
player_idle_big22={width=8,unique=40,total=64,spriteIDs={-1,-1,-1,-1,3,4,5,-1,-1,-1,22,23,24,25,26,-1,-1,-1,52,53,54,55,56,-1,-1,-1,-1,-1,91,92,93,-1,-1,114,115,120,121,118,122,-1,-1,158,159,165,166,167,163,164,-1,214,-1,220,221,222,218,219,-1,-1,-1,265,266,267,268,269}}
player_idle_big23={width=8,unique=40,total=64,spriteIDs={-1,-1,-1,-1,3,4,5,-1,-1,-1,22,23,24,25,26,-1,-1,-1,52,53,57,58,59,-1,-1,-1,-1,-1,94,95,93,-1,-1,123,124,125,126,127,128,-1,-1,168,169,170,171,172,173,174,-1,223,-1,224,225,226,227,228,-1,-1,-1,265,266,270,271,272}}
player_idle_big24={width=8,unique=40,total=64,spriteIDs={-1,-1,-1,-1,3,4,5,-1,-1,-1,22,23,24,25,26,-1,-1,-1,52,53,57,58,59,-1,-1,-1,-1,-1,94,95,93,-1,-1,123,124,125,126,127,128,-1,-1,168,169,170,171,172,173,174,-1,223,-1,224,225,229,230,231,-1,-1,-1,265,266,273,274,275}}
player_idle_big25={width=8,unique=40,total=64,spriteIDs={-1,-1,-1,-1,3,4,5,-1,-1,-1,22,23,24,25,26,-1,-1,-1,52,53,54,60,61,-1,-1,-1,-1,-1,91,92,93,-1,-1,123,124,129,121,118,130,-1,-1,168,169,175,166,167,163,164,-1,223,-1,232,221,233,234,235,-1,-1,-1,265,266,273,274,275}}
player_idle_big26={width=8,unique=41,total=64,spriteIDs={-1,-1,-1,-1,0,1,2,-1,-1,-1,17,18,19,20,21,-1,-1,-1,47,48,62,63,64,-1,-1,-1,-1,78,88,96,97,-1,-1,114,115,116,117,118,119,-1,-1,158,159,160,161,162,163,164,-1,214,-1,215,216,217,218,219,-1,-1,-1,265,266,267,268,269}}
player_idle_big27={width=8,unique=41,total=64,spriteIDs={-1,-1,-1,-1,0,1,2,-1,-1,-1,17,18,19,20,21,-1,-1,-1,47,48,62,65,66,-1,-1,-1,-1,78,88,89,90,-1,-1,114,115,116,117,118,119,-1,-1,158,159,160,161,162,163,164,-1,214,-1,215,216,236,237,238,-1,-1,-1,265,266,276,277,278}}
player_idle_big28={width=8,unique=41,total=64,spriteIDs={-1,-1,-1,-1,0,1,2,-1,-1,-1,17,18,19,20,21,-1,-1,-1,47,48,62,67,51,-1,-1,-1,-1,78,88,89,90,-1,-1,114,115,116,117,118,119,-1,-1,158,159,160,161,162,163,164,-1,214,-1,215,216,217,218,219,-1,-1,-1,265,266,267,268,269}}

player_walk_big21={width=8,unique=41,total=64,spriteIDs={-1,-1,-1,-1,11,12,13,-1,-1,-1,37,38,39,40,41,-1,-1,-1,78,79,80,81,82,-1,-1,-1,-1,104,105,106,107,-1,141,142,143,144,145,146,147,-1,194,195,196,197,198,199,200,201,-1,-1,-1,250,251,252,253,254,-1,-1,-1,-1,285,286,287,288}}
player_walk_big22={width=8,unique=40,total=64,spriteIDs={-1,-1,-1,7,14,15,16,-1,-1,-1,42,43,44,45,46,-1,-1,-1,-1,83,84,85,86,-1,-1,-1,-1,108,109,110,111,-1,148,149,150,151,152,153,154,-1,202,-1,203,204,205,206,207,208,-1,-1,-1,239,255,256,257,258,-1,-1,-1,-1,289,290,291,292}}
player_walk_big23={width=8,unique=41,total=64,spriteIDs={-1,-1,-1,-1,11,12,13,-1,-1,-1,37,38,39,40,41,-1,-1,-1,78,79,80,81,82,-1,-1,-1,-1,104,112,113,107,-1,141,142,143,144,155,156,157,-1,194,195,196,197,209,210,211,201,-1,-1,-1,250,259,260,261,254,-1,-1,-1,-1,293,294,295,288}}
player_walk_big24={width=8,unique=40,total=64,spriteIDs={-1,-1,-1,7,14,15,16,-1,-1,-1,42,43,44,45,46,-1,-1,-1,-1,83,84,87,86,-1,-1,-1,-1,108,109,110,111,-1,148,149,150,151,152,153,154,-1,202,-1,203,204,212,213,207,208,-1,-1,-1,239,262,263,264,258,-1,-1,-1,-1,296,297,291,292}}
-- spritelib-end

-- loop animation

-- idles version of swell udder. need to find a way to animate them.
-- normal idle that will happen once a while.

local delay = 0
local frame = 1
local time = 0

local idle_big2 = {

    [player_idle_big21] = {
    delay = 0,
    frame = 1,
    time = 5000
    },

    [player_idle_big22] = {
    delay = 0,
    frame = 1,
    time = 100
    },

    [player_idle_big23] = {
    delay = 0,
    frame = 1,
    time = 160
    },

    [player_idle_big24] = {
    delay = 0,
    frame = 1,
    time = 400
    },

    [player_idle_big25] = {
    delay = 0,
    frame = 1,
    time = 80
    },


    [player_idle_big26] = {
    delay = 0,
    frame = 1,
    time = 100
    },


    [player_idle_big27] = {
    delay = 0,
    frame = 1,
    time = 100},


    [player_idle_big28] = {
    delay = 0,
    frame = 1,
    time = 80
    }


}

--[[
    Pixel Vision 8 - New Template Script
    Copyright (C) 2017, Pixel Vision 8 (http://pixelvision8.com)
    Created by Jesse Freeman (@jessefreeman)

    This project was designed to display some basic instructions when you create
    a new game.    Simply delete the following code and implement your own Init(),
    Update() and Draw() logic.

    Learn more about making Pixel Vision 8 games at https://www.gitbook.com/@pixelvision8
]]--

-- This this is an empty game, we will the following text. We combined two sets of fonts into
-- the default.font.png. Use uppercase for larger characters and lowercase for a smaller one.
local title = "Momoo Games"
local message = "this is an empty game template. press ctrl + 1 to open the editor or use an external editor to modify the files found in your workspace game folder."


local Up, Down, Right, Left, A, B, Select, Start = 0, 1, 2, 3, 4, 5, 6, 7

-- The Init() method is part of the game's lifecycle and called a game starts. We are going to
-- use this method to configure background color, ScreenBufferChip and draw a text box.
function Init()
    -- Here we are manually changing the background color
    apiBridge:ChangeBackgroundColor(64)
    -- We are going to render text into the ScreenBuffer so need to rebuild it first.
    apiBridge:RebuildScreenBuffer()
    -- We are going to render some text in a box to the ScreenBuffer.
    apiBridge:DrawTextBoxToBuffer(message, 60, 1, 26, "default", -4, true)
end

-- The Update() method is part of the game's life cycle. The engine calls Update() on every frame
-- before the Draw() method. It accepts one argument, timeDelta, which is the difference in
-- milliseconds since the last frame.

function Update(timeDelta)

    -- Here we'll determine when it's time to change the sprite frame.
    if(time > 0.09) then
        -- If time is past the frame we'll increase the frame number to advance the animation.
        idle_big2.frame = frame + 1

        -- We need to reset the frame number if it is greater than the number of frames.
        if(frame > idle_big2) then
            idle_big2.frame = 1
        end
        -- Now we can reset time back to 0 to start tracking the next frame change.
        time = 0
    end

end

-- The Draw() method is part of the game's life cycle. It is called after Update() and is where
-- all of our draw calls should go. We'll be using this to render sprites to the display.

function Draw()
    -- Since we are using the ScreenBuffer, we can use this to clear the display.
    apiBridge:DrawScreenBuffer()
    -- Let's draw the title as sprites on each frame
    apiBridge:DrawFont(title, 8, 192, "default", 0, 0)
end

local spriteData = idle_big2 [50000]

if(spriteData ~= nil) then
    apiBridge:DrawSprites(spriteData.spriteIDs, 0, 0, spriteData.width, false, false, true, 0)
end

i think the problem come from the different local "time" and "frame" but not on idle_big2... i might probably missed something...

ah yes, i forgot to mention in the first post that my short game will be a point and click sort of puzzle game. since the character is looking for the missing parts of her machine to milk out of her swell udder.

hello folks, i figured that i should share my progress done with my short game, i hope it will be part of demos but for now, it's a very early version of the game.


first of all, here the current progress of sprites:


and the animation of the full idle which i'm trying to achieve as result:


and here the result of my game that i managed so far:


then the code source i have so far and i know it's messy:

-- spritelib-start
player_alt_idle_big21={width=8,unique=41,total=64,spriteIDs={-1,-1,-1,-1,0,1,2,-1,-1,-1,17,18,19,20,21,-1,-1,-1,47,48,62,71,51,-1,-1,-1,-1,78,88,89,90,-1,-1,114,115,116,117,118,119,-1,-1,158,159,160,161,162,163,164,-1,214,-1,215,216,217,218,219,-1,-1,-1,265,266,267,268,269}}
player_alt_idle_big22={width=8,unique=42,total=64,spriteIDs={-1,-1,6,7,8,9,10,-1,-1,-1,30,31,32,33,34,-1,-1,-1,-1,72,73,74,75,-1,-1,-1,-1,78,88,98,97,-1,-1,114,115,131,132,133,119,-1,-1,158,159,176,177,178,163,164,-1,214,-1,239,240,222,218,219,-1,-1,-1,265,266,267,268,269}}
player_alt_idle_big23={width=8,unique=42,total=64,spriteIDs={-1,-1,6,7,8,9,10,-1,-1,-1,30,31,32,35,36,-1,-1,-1,-1,72,73,76,75,-1,-1,-1,-1,78,99,100,97,-1,-1,114,115,131,134,135,136,-1,-1,158,159,176,179,180,181,164,-1,214,-1,239,240,222,218,219,-1,-1,-1,265,266,267,268,269}}
player_alt_idle_big24={width=8,unique=42,total=64,spriteIDs={-1,-1,6,7,8,9,10,-1,-1,-1,30,31,32,35,36,-1,-1,-1,-1,72,73,77,75,-1,-1,-1,-1,78,101,102,97,-1,-1,114,115,131,137,138,119,-1,-1,158,159,176,182,183,184,185,-1,214,-1,239,240,241,242,243,-1,-1,-1,265,266,279,280,281}}
player_alt_idle_big25={width=8,unique=42,total=64,spriteIDs={-1,-1,6,7,8,9,10,-1,-1,-1,30,31,32,35,36,-1,-1,-1,-1,72,73,77,75,-1,-1,-1,-1,78,103,102,97,-1,-1,114,115,131,139,140,119,-1,-1,158,159,176,186,187,188,189,-1,214,-1,239,240,244,245,246,-1,-1,-1,265,266,282,283,284}}
player_alt_idle_big26={width=8,unique=42,total=64,spriteIDs={-1,-1,6,7,8,9,10,-1,-1,-1,30,31,32,33,34,-1,-1,-1,-1,72,73,76,75,-1,-1,-1,-1,78,88,98,97,-1,-1,114,115,131,132,133,119,-1,-1,158,159,176,177,190,191,189,-1,214,-1,239,240,247,248,246,-1,-1,-1,265,266,282,283,284}}
player_alt_idle_big27={width=8,unique=41,total=64,spriteIDs={-1,-1,-1,-1,0,1,2,-1,-1,-1,17,18,19,20,21,-1,-1,-1,47,48,62,67,51,-1,-1,-1,-1,78,88,89,90,-1,-1,114,115,116,117,118,119,-1,-1,158,159,160,161,162,163,164,-1,214,-1,215,216,217,218,219,-1,-1,-1,265,266,267,268,269}}
player_alt_idle_big28={width=8,unique=41,total=64,spriteIDs={-1,-1,-1,-1,0,1,2,-1,-1,-1,17,18,19,20,21,-1,-1,-1,47,48,62,67,51,-1,-1,-1,-1,78,88,89,90,-1,-1,114,115,116,117,118,119,-1,-1,158,159,160,161,192,193,185,-1,214,-1,215,216,249,242,243,-1,-1,-1,265,266,279,280,281}}
player_flick_big2={width=8,unique=41,total=64,spriteIDs={-1,-1,-1,-1,0,1,2,-1,-1,-1,27,28,29,20,21,-1,-1,-1,68,69,70,50,51,-1,-1,-1,-1,78,88,89,90,-1,-1,114,115,116,117,118,119,-1,-1,158,159,160,161,162,163,164,-1,214,-1,215,216,217,218,219,-1,-1,-1,265,266,267,268,269}}
player_idle_big21={width=8,unique=41,total=64,spriteIDs={-1,-1,-1,-1,0,1,2,-1,-1,-1,17,18,19,20,21,-1,-1,-1,47,48,49,50,51,-1,-1,-1,-1,78,88,89,90,-1,-1,114,115,116,117,118,119,-1,-1,158,159,160,161,162,163,164,-1,214,-1,215,216,217,218,219,-1,-1,-1,265,266,267,268,269}}
player_idle_big22={width=8,unique=40,total=64,spriteIDs={-1,-1,-1,-1,3,4,5,-1,-1,-1,22,23,24,25,26,-1,-1,-1,52,53,54,55,56,-1,-1,-1,-1,-1,91,92,93,-1,-1,114,115,120,121,118,122,-1,-1,158,159,165,166,167,163,164,-1,214,-1,220,221,222,218,219,-1,-1,-1,265,266,267,268,269}}
player_idle_big23={width=8,unique=40,total=64,spriteIDs={-1,-1,-1,-1,3,4,5,-1,-1,-1,22,23,24,25,26,-1,-1,-1,52,53,57,58,59,-1,-1,-1,-1,-1,94,95,93,-1,-1,123,124,125,126,127,128,-1,-1,168,169,170,171,172,173,174,-1,223,-1,224,225,226,227,228,-1,-1,-1,265,266,270,271,272}}
player_idle_big24={width=8,unique=40,total=64,spriteIDs={-1,-1,-1,-1,3,4,5,-1,-1,-1,22,23,24,25,26,-1,-1,-1,52,53,57,58,59,-1,-1,-1,-1,-1,94,95,93,-1,-1,123,124,125,126,127,128,-1,-1,168,169,170,171,172,173,174,-1,223,-1,224,225,229,230,231,-1,-1,-1,265,266,273,274,275}}
player_idle_big25={width=8,unique=40,total=64,spriteIDs={-1,-1,-1,-1,3,4,5,-1,-1,-1,22,23,24,25,26,-1,-1,-1,52,53,54,60,61,-1,-1,-1,-1,-1,91,92,93,-1,-1,123,124,129,121,118,130,-1,-1,168,169,175,166,167,163,164,-1,223,-1,232,221,233,234,235,-1,-1,-1,265,266,273,274,275}}
player_idle_big26={width=8,unique=41,total=64,spriteIDs={-1,-1,-1,-1,0,1,2,-1,-1,-1,17,18,19,20,21,-1,-1,-1,47,48,62,63,64,-1,-1,-1,-1,78,88,96,97,-1,-1,114,115,116,117,118,119,-1,-1,158,159,160,161,162,163,164,-1,214,-1,215,216,217,218,219,-1,-1,-1,265,266,267,268,269}}
player_idle_big27={width=8,unique=41,total=64,spriteIDs={-1,-1,-1,-1,0,1,2,-1,-1,-1,17,18,19,20,21,-1,-1,-1,47,48,62,65,66,-1,-1,-1,-1,78,88,89,90,-1,-1,114,115,116,117,118,119,-1,-1,158,159,160,161,162,163,164,-1,214,-1,215,216,236,237,238,-1,-1,-1,265,266,276,277,278}}
player_idle_big28={width=8,unique=41,total=64,spriteIDs={-1,-1,-1,-1,0,1,2,-1,-1,-1,17,18,19,20,21,-1,-1,-1,47,48,62,67,51,-1,-1,-1,-1,78,88,89,90,-1,-1,114,115,116,117,118,119,-1,-1,158,159,160,161,162,163,164,-1,214,-1,215,216,217,218,219,-1,-1,-1,265,266,267,268,269}}
player_walk_big21={width=8,unique=41,total=64,spriteIDs={-1,-1,-1,-1,11,12,13,-1,-1,-1,37,38,39,40,41,-1,-1,-1,78,79,80,81,82,-1,-1,-1,-1,104,105,106,107,-1,141,142,143,144,145,146,147,-1,194,195,196,197,198,199,200,201,-1,-1,-1,250,251,252,253,254,-1,-1,-1,-1,285,286,287,288}}
player_walk_big22={width=8,unique=40,total=64,spriteIDs={-1,-1,-1,7,14,15,16,-1,-1,-1,42,43,44,45,46,-1,-1,-1,-1,83,84,85,86,-1,-1,-1,-1,108,109,110,111,-1,148,149,150,151,152,153,154,-1,202,-1,203,204,205,206,207,208,-1,-1,-1,239,255,256,257,258,-1,-1,-1,-1,289,290,291,292}}
player_walk_big23={width=8,unique=41,total=64,spriteIDs={-1,-1,-1,-1,11,12,13,-1,-1,-1,37,38,39,40,41,-1,-1,-1,78,79,80,81,82,-1,-1,-1,-1,104,112,113,107,-1,141,142,143,144,155,156,157,-1,194,195,196,197,209,210,211,201,-1,-1,-1,250,259,260,261,254,-1,-1,-1,-1,293,294,295,288}}
player_walk_big24={width=8,unique=40,total=64,spriteIDs={-1,-1,-1,7,14,15,16,-1,-1,-1,42,43,44,45,46,-1,-1,-1,-1,83,84,87,86,-1,-1,-1,-1,108,109,110,111,-1,148,149,150,151,152,153,154,-1,202,-1,203,204,212,213,207,208,-1,-1,-1,239,262,263,264,258,-1,-1,-1,-1,296,297,291,292}}
-- spritelib-end


-- loop animation that i'm still figuring out how to make it work

--[[
local idle_big2 = {
    [player_idle_big21],
    [player_idle_big22],
    [player_idle_big23],
    [player_idle_big24],
    [player_idle_big25],
    [player_idle_big26],
    [player_idle_big27],
    [player_idle_big28],
}
]]--

--[[
    Pixel Vision 8 - New Template Script
    Copyright (C) 2017, Pixel Vision 8 (http://pixelvision8.com)
    Created by Jesse Freeman (@jessefreeman)
    This project was designed to display some basic instructions when you create
    a new game.    Simply delete the following code and implement your own Init(),
    Update() and Draw() logic.
    Learn more about making Pixel Vision 8 games at https://www.gitbook.com/@pixelvision8
]]--

-- This this is an empty game, we will the following text. We combined two sets of fonts into
-- the default.font.png. Use uppercase for larger characters and lowercase for a smaller one.

local title = "Momoo Games"
local message = "this is an empty game template. press ctrl + 1 to open the editor or use an external editor to modify the files found in your workspace game folder."

--player momoo:
local Up, Down, Right, Left, A, B, Select, Start = 0, 1, 2, 3, 4, 5, 6, 7

-- The Init() method is part of the game's lifecycle and called a game starts. We are going to
-- use this method to configure background color, ScreenBufferChip and draw a text box.

function Init()
    -- Here we are manually changing the background color
    apiBridge:ChangeBackgroundColor(64)
    -- We are going to render text into the ScreenBuffer so need to rebuild it first.
    apiBridge:RebuildScreenBuffer()
    -- We are going to render some text in a box to the ScreenBuffer.
    apiBridge:DrawTextBoxToBuffer(message, 60, 1, 26, "default", -4, true)
end

-- The Update() method is part of the game's life cycle. The engine calls Update() on every frame
-- before the Draw() method. It accepts one argument, timeDelta, which is the difference in
-- milliseconds since the last frame.

function Update(timeDelta)
end

-- The Draw() method is part of the game's life cycle. It is called after Update() and is where
-- all of our draw calls should go. We'll be using this to render sprites to the display.

function Draw()
    -- Since we are using the ScreenBuffer, we can use this to clear the display.
    apiBridge:DrawScreenBuffer()
    -- Let's draw the title as sprites on each frame
    apiBridge:DrawFont(title, 8, 192, "default", 0, 0)
    apiBridge:DrawSprites(player_idle_big21.spriteIDs, 0, 0, player_idle_big21.width, false, false, true, 0)
end

as you might noticed, i'm still trying to figure out how to make the larger sprite animated, do you have any suggestion to make it work?

let hope it will work! :D

fair enough, i guess that we need to figure out what is the best set-up or add the remapping buttons system for your game.

alright! take your time to finish it :)

hello, don't forget there are people who actually use azerty or other type of keyboard... would be better if you use the actual arrows for your game? ps: where can i download that game? it doesn't seem to find anywhere at pico-8 site...