Log In  
Follow
Zellente

Hi,
I'm working on some kind of story game, where you start animations with the X/O buttons.
(in the cart, you can use left right to change the animation-loop, index 0 is "idle", index over 2 crash the game)

My Question is: Is there a common way to do move whole sprites around?

Tutorials I found are all about one sprite animation and not how to how to move the sprite in a loop, instead of players input via buttons. Might not know the search term.

I use an array of 8 frames that will manipulated a sspr() command.
The 8. index sets a new sprite-area, after the other frames are used to move the guy around.

foo bar = {{2,5}, 		{7,18},	{7,27},	{8,27}, 	{9,27},	{10,27}, {11,28},	{11,28,	18,80, 4,4, 0,0, 4,4, true,false}  }
sspr(	sx,sy,				sw,sh,				foobar[1][1],foobar[1][2],						[dw,dh,flip_x,flip_y] ))

animation_box = {
									{ {2,5}, 		{7,18},	{7,27},	{8,27}, 	{9,27},	{10,27}, {11,28},	{11,28,	18,80, 4,4, 0,0, 4,4, true,false}  },

[ [size=16][color=#ffaabb] [ Continue Reading.. ] [/color][/size] ](/bbs/?pid=197331#p)
3 comments



A WIP for a vignette game (did not know that this genre exsist, before September 2026. Toy box, Diarama Games)

Sept: First upload of a game cart
Okt: Big update for me, add a game state and a game start animation.

Next update will bring some construktion areas and a building animation

This cart is made for my son (3y) who loves trains and puplic transportation, let´s hope I can finish before he turns 12.

Thanks

Thanks on Lazy Devs youtube channel and his
" The 30 Circle Test " and " We Are All Game Beginners - Porklike Postmortem "

Insides

I love this unpack list combination for spritesheet coords and this rnd use with lists, but do not know if this a common way for little bigger games.

--(	sspr		sx,sy,                    sw,sh,				dx, dy,						[dw,dh,flip_x,flip_y] )

[ [size=16][color=#ffaabb] [ Continue Reading.. ] [/color][/size] ](/bbs/?pid=197058#p)
0 comments



Hi, I try to make a one-button game and thought I could extend it to four players , maybe even using one controller (but yes two players on the direction pad might not work).

On a keyboard 4 players could use the keys from both players, even esdf, for movement. Btnp() returns an integer that represents the pressed button/keys. e.g. 512 for player2,-> (right).

The players use the x ("x" and o ("c") buttons and on keybord q,w. I could use btnp(4,0), btnp(5,0) and btnp(4,1),btnp(5,1) but it would use 4 "if-statements" instead of one and I want to use the keyboard and variable keysetting.

I would like to have something like this:

playerbtn		= {32,16,4096,8192}
player[i]		= {btnpressed = playerbtn[i])

for i=1,game.playernumber do
if btnp() == player[i].btnpressed then
some code
end
end

instead of four times this:

if btnp(5,0) then
if player[1].movment < 8 then

[ [size=16][color=#ffaabb] [ Continue Reading.. ] [/color][/size] ](/bbs/?pid=156371#p)
1
6 comments



Today I finished some code restruction,from scatch and noticed I forgot to "copy" the sprites and the map and no problem
export foo.png //nice
export foo.map.png //nice
and easy
import foo.png //nice

and
import foo.map.png //ups just spritesheet is full
? okay
import map foo.map.png //nope

Of Course I can just copy the code to the cart with the map I want, but is there a command I didn't found? There are parameter import foobar.png -L, that do not help me.
The Pico-8 manual has only export map...

4 comments