Chara pixelcroft in the shrine of dusty artifacts

ok its more of a walk :walking:

this is 6 fames, i put them all in a 2D array so i can increment the frames
the animation itself looks super janky to me

11 Likes

Is it a refresh rate issue? What kind of fps can we squeeze out of the display? Or is it just the simulator that is having issues?

im using double frames else it looks like speed walking, might also be the gif
have not tested fps

1 Like

@adekto you are using some sort of a screen capture software. Later today I will explain how to get the simulator to make a screen recording.

1 Like

@adekto Could you post/host the source code so I can check your animation problem also?

its allot of data

main.cpp

#include "pokitto.h"
#include "sprites.h"
Pokitto::Core game;

int main () {
game.begin();
char x = 50;
char frame = 0;
game.display.load565Palette(pallet);
while (game.isRunning()) {
    if (game.update()) {
        if(x%2==0){
        frame++;
        frame=frame%6;
        }
        game.display.setInvisibleColor(14);
        game.display.drawBitmap(x,14,sprite[frame]);
        for(int i =0; i<7; i++) game.display.drawBitmap(i*16,40,rock);
        x--;
        if(x <-13)x=110;
        game.display.print("animation test");
    }

}

return 1;
}

```
sprites.h
```
//pallet
const unsigned short pallet[]={
0xb07,
0x44a,
0x6506,
0x8668,
0x0,
0x210,
0x4439,
0x7ddf,
0x72c7,
0xcc68,
0xfeb2,
0xfd42,
0xf720,
0xacd0,
0xca30,
0xffff,
};

//sprite
const uint8_t sprite[][366]={{14, 26, /*width, height*/
0xee,0xee,0xe8,0x88,0x88,0xee,0xee,
0xee,0xee,0x8d,0xd8,0xdd,0x8e,0xee,
0xee,0xe8,0x88,0x88,0x88,0xd8,0xee,
0xee,0x8d,0xcc,0xbb,0x8d,0xc8,0xee,
0xee,0xd8,0xaa,0xa9,0x8d,0x88,0xee,
0xee,0x84,0x4a,0x44,0x88,0xd8,0xee,
0xee,0xd8,0x5a,0x5f,0x88,0xd8,0xee,
0xee,0xe8,0x4a,0x4f,0xa8,0x88,0xee,
0xee,0xe8,0xaa,0xaa,0x98,0x8e,0x8e,
0xee,0x8e,0xe1,0xa9,0x1e,0x8e,0xee,
0xee,0xea,0xa1,0x31,0x3a,0xa8,0xee,
0xee,0xe9,0x33,0x33,0x39,0xae,0xee,
0xee,0xee,0x33,0x33,0x10,0xaa,0xee,
0xee,0xee,0xa3,0x31,0x0e,0x9a,0xee,
0xee,0xea,0x91,0x11,0x0e,0xea,0xae,
0xee,0xe9,0xac,0xb4,0x4e,0xe9,0xae,
0xee,0xee,0x48,0x48,0x84,0x9a,0xae,
0xee,0xee,0x48,0x44,0x84,0xea,0x9e,
0xee,0xee,0x88,0x84,0x88,0xee,0xee,
0xee,0xee,0xaa,0x9a,0xaa,0xee,0xee,
0xee,0xee,0xaa,0x9a,0xaa,0xee,0xee,
0xee,0xee,0x99,0xae,0xa9,0x9e,0xee,
0xee,0xee,0xaa,0xae,0xaa,0xae,0xee,
0xee,0xee,0x44,0xae,0xa4,0x4e,0xee,
0xee,0xee,0x44,0x4e,0x44,0x4e,0xee,
0xee,0xe8,0x88,0x4e,0x48,0x8e,0xee,
},
{14, 26, /*width, height*/
0xee,0xee,0xe8,0x88,0x88,0xee,0xee,
0xee,0xee,0x8d,0xd8,0xdd,0x8e,0xee,
0xee,0xe8,0x88,0x88,0x88,0xd8,0xee,
0xee,0x8d,0xcc,0xbb,0x8d,0xc8,0xee,
0xee,0xd8,0xaa,0xa9,0x8d,0x88,0xee,
0xee,0x84,0x4a,0x44,0x88,0xd8,0xee,
0xee,0xd8,0x5a,0x5f,0x88,0xd8,0xee,
0xee,0xe8,0x4a,0x4f,0xa8,0x88,0xee,
0xee,0xe8,0xaa,0xaa,0x98,0x8e,0x8e,
0xee,0x8e,0xe1,0xa9,0x1e,0x8e,0xee,
0xee,0xea,0xa1,0x33,0x1e,0xe8,0xee,
0xae,0xea,0x93,0x33,0x31,0xee,0xee,
0x9a,0xe9,0x33,0x33,0x3a,0xae,0xee,
0xaa,0xaa,0x33,0x33,0x19,0xaa,0xee,
0xe9,0xaa,0xe1,0x11,0x0e,0x9a,0xae,
0xee,0xee,0xe1,0x11,0x0e,0xe9,0x9a,
0xee,0xee,0xec,0xb4,0x44,0xee,0x9a,
0xee,0xee,0x44,0x88,0x84,0xee,0xee,
0xee,0xee,0x48,0xaa,0x84,0xee,0xee,
0xee,0xee,0x8a,0xaa,0x98,0xee,0xee,
0xee,0xee,0x9a,0xa9,0xee,0xee,0xee,
0xee,0xee,0xea,0xa9,0xae,0xee,0xee,
0xee,0xee,0xe4,0x44,0xae,0xee,0xee,
0xee,0xee,0xe4,0x44,0x44,0xee,0xee,
0xee,0xee,0xe8,0x84,0x44,0xee,0xee,
0xee,0xee,0xee,0xe8,0x88,0xee,0xee,
},
{14, 26, /*width, height*/
0xee,0xee,0xee,0xee,0xee,0xee,0xee,
0xee,0xee,0xe8,0x88,0x88,0xee,0xee,
0xee,0xee,0x8d,0xd8,0xdd,0x8e,0xee,
0xee,0xe8,0x88,0x88,0x88,0xd8,0xee,
0xee,0x8d,0xcc,0xbb,0x8d,0xc8,0xee,
0xee,0xd8,0xaa,0xa9,0x8d,0x88,0xee,
0xee,0x84,0x4a,0x44,0x88,0xd8,0xee,
0xee,0xd8,0x5a,0x5f,0x88,0xd8,0xee,
0xee,0xe8,0x4a,0x4f,0xa8,0x88,0x8e,
0xee,0x88,0xaa,0xaa,0x98,0x8e,0xee,
0xee,0xee,0xe1,0xa9,0x1e,0x88,0xee,
0xea,0xa9,0x91,0x31,0x3a,0xaa,0xee,
0xea,0x9a,0x33,0x33,0x39,0xaa,0xae,
0xea,0x9a,0x33,0x33,0x10,0xe9,0xae,
0xe9,0xa9,0xe3,0x31,0x0e,0xee,0xaa,
0xee,0xee,0xe1,0x11,0x0e,0xee,0x9a,
0xee,0xee,0xec,0xb4,0x4e,0xee,0xee,
0xee,0xee,0x48,0x48,0x84,0xee,0xee,
0xee,0xee,0x48,0x8a,0x84,0xee,0xee,
0xee,0xee,0x49,0x9a,0x94,0xee,0xee,
0xee,0xee,0xe9,0xaa,0x9e,0xee,0xee,
0xee,0xee,0xea,0xa9,0xaa,0xee,0xee,
0xee,0xee,0x4a,0x9e,0x9a,0xae,0xee,
0xee,0xe4,0x44,0xee,0xe4,0x44,0xee,
0xee,0x84,0x44,0xee,0xee,0x44,0x4e,
0xee,0xe8,0x8e,0xee,0xee,0x88,0x8e,
},
{14, 26, /*width, height*/
0xee,0xee,0xee,0xee,0xee,0xee,0xee,
0xee,0xee,0xe8,0x88,0x88,0xee,0xee,
0xee,0xee,0x8d,0xd8,0xdd,0x8e,0xee,
0xee,0xe8,0x88,0x88,0x88,0xd8,0xee,
0xee,0x8d,0xcc,0xbb,0x8d,0xc8,0xee,
0xee,0xd8,0xaa,0xa9,0x8d,0x88,0xee,
0xee,0x84,0x4a,0x44,0x88,0xd8,0xee,
0xee,0xd8,0x5a,0x5f,0x88,0xd8,0xee,
0xee,0xe8,0x4a,0x4f,0xa8,0x88,0xee,
0xee,0xe8,0xaa,0xaa,0x98,0x8e,0x8e,
0xee,0x8a,0x91,0xa9,0x1a,0x8e,0xee,
0xee,0xe9,0x33,0x33,0x39,0xa8,0xee,
0xee,0xee,0x33,0x33,0x10,0xaa,0xee,
0xee,0xee,0xa3,0x31,0x0e,0x9a,0xee,
0xee,0xea,0x91,0x11,0x0e,0xea,0xae,
0xee,0xe9,0xac,0xb4,0x4e,0xe9,0xae,
0xee,0xee,0x48,0x48,0x84,0x9a,0xae,
0xee,0xee,0x48,0x44,0x84,0xea,0x9e,
0xee,0xee,0x88,0x84,0x88,0xee,0xee,
0xee,0xee,0xaa,0x9a,0xaa,0xee,0xee,
0xee,0xee,0xaa,0x9a,0xaa,0xee,0xee,
0xee,0xee,0xaa,0x99,0x9a,0xee,0xee,
0xee,0xee,0xe9,0x9a,0xaa,0x8e,0xee,
0xee,0xee,0xee,0x94,0x4a,0x8e,0xee,
0xee,0xee,0xee,0xe4,0x44,0x8e,0xee,
0xee,0xee,0xee,0x88,0x88,0xee,0xee,
},
{14, 26, /*width, height*/
0xee,0xee,0xe8,0x88,0x88,0xee,0xee,
0xee,0xee,0x8d,0xd8,0xdd,0x8e,0xee,
0xee,0xe8,0x88,0x88,0x88,0xd8,0xee,
0xee,0x8d,0xcc,0xbb,0x8d,0xc8,0xee,
0xee,0xd8,0xaa,0xa9,0x8d,0x88,0xee,
0xee,0x84,0x4a,0x44,0x88,0xd8,0xee,
0xee,0xd8,0x5a,0x5f,0x88,0xd8,0xee,
0xee,0xe8,0x4a,0x4f,0xa8,0x88,0xee,
0xee,0xe8,0xaa,0xaa,0x98,0x8e,0x8e,
0xee,0x8e,0xe1,0xa9,0x1e,0x8e,0xee,
0xee,0xea,0xa1,0x31,0x3a,0xa8,0xee,
0xee,0xe9,0x33,0x33,0x39,0xae,0xee,
0xee,0xee,0x33,0x33,0x1a,0xae,0xee,
0xee,0xee,0x93,0x31,0x0a,0xae,0xee,
0xee,0xee,0xe1,0x19,0xaa,0x9e,0xee,
0xee,0xee,0xec,0x9a,0xa9,0xee,0xee,
0xee,0xee,0x48,0x49,0x94,0xee,0xee,
0xee,0xee,0x48,0x84,0x84,0xee,0xee,
0xee,0xee,0x99,0x84,0x88,0xee,0xee,
0xee,0xee,0xaa,0x9a,0xaa,0xee,0xee,
0xee,0xea,0xaa,0x99,0xaa,0xee,0xee,
0xee,0xea,0xa9,0xee,0x9a,0xae,0xee,
0xee,0x44,0x9e,0xee,0x9a,0xae,0xee,
0xee,0x84,0x4e,0xee,0x94,0x4e,0xee,
0xee,0xe8,0x8e,0xee,0x44,0x4e,0xee,
0xee,0xee,0xee,0xee,0x88,0x8e,0xee,
},
{14, 26, /*width, height*/
0xee,0xee,0xee,0xee,0xee,0xee,0xee,
0xee,0xee,0xe8,0x88,0x88,0xee,0xee,
0xee,0xee,0x8d,0xd8,0xdd,0x8e,0xee,
0xee,0xe8,0x88,0x88,0x88,0xd8,0xee,
0xee,0x8d,0xcc,0xbb,0x8d,0xc8,0xee,
0xee,0xd8,0xaa,0xa9,0x8d,0x88,0xee,
0xee,0x84,0x4a,0x44,0x88,0xd8,0xee,
0xee,0xd8,0x5a,0x5f,0x88,0xd8,0xee,
0xee,0xe8,0x4a,0x4f,0xa8,0x88,0x8e,
0xee,0x88,0xaa,0xaa,0x98,0x8e,0xee,
0xee,0xee,0xe1,0xa9,0x1e,0x88,0xee,
0xee,0xee,0x93,0x33,0x39,0xae,0xee,
0xee,0xee,0x39,0xa3,0x9a,0xae,0xee,
0xee,0xee,0x3a,0x9a,0xaa,0xee,0xee,
0xee,0xee,0x91,0xa9,0x9a,0xee,0xee,
0xee,0xee,0xe1,0x11,0x0e,0xee,0xee,
0xee,0xee,0xec,0xb4,0x4e,0xee,0xee,
0xee,0xee,0x48,0x48,0x84,0xee,0xee,
0xee,0xee,0x48,0x84,0x84,0xee,0xee,
0xee,0xee,0x49,0x4a,0x94,0xee,0xee,
0xee,0xee,0xaa,0x8a,0xae,0xee,0xee,
0xee,0xee,0xaa,0x99,0xaa,0xee,0xee,
0xee,0xe4,0xa9,0xee,0x99,0xae,0xee,
0xee,0x44,0x4e,0xee,0xe4,0x44,0xee,
0xe8,0x44,0x4e,0xee,0xee,0x44,0x4e,
0xee,0x88,0xee,0xee,0xee,0x88,0x8e,
}
};
const uint8_t rock[]={16, 18, /*width, height*/
0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,
0x77,0x77,0x65,0x67,0x77,0x77,0x77,0x64,
0x77,0x77,0x76,0x77,0x77,0x77,0x77,0x75,
0x67,0x77,0x76,0x77,0x77,0x67,0x77,0x75,
0x66,0x67,0x66,0x77,0x76,0x76,0x77,0x65,
0x56,0x66,0x66,0x67,0x77,0x77,0x66,0x65,
0x55,0x66,0x65,0x66,0x66,0x66,0x66,0x65,
0x55,0x55,0x55,0x66,0x66,0x66,0x66,0x54,
0x66,0x66,0x54,0x56,0x66,0x66,0x54,0x66,
0x56,0x66,0x65,0x45,0x66,0x64,0x46,0x66,
0x65,0x66,0x55,0x54,0x54,0x45,0x55,0x65,
0x66,0x55,0x55,0x54,0x44,0x55,0x55,0x56,
0x55,0x55,0x55,0x45,0x54,0x45,0x55,0x55,
0x55,0x55,0x44,0x55,0x55,0x44,0x45,0x55,
0x44,0x44,0x44,0x55,0x55,0x54,0x44,0x44,
0x56,0x44,0x44,0x45,0x55,0x54,0x44,0x44,
0x55,0x54,0x44,0x44,0x44,0x44,0x44,0x44,
0x44,0x44,0x44,0x44,0x44,0x44,0x45,0x44,
};
```
1 Like

It does seem to be a bit janky. I’ll take a look at it later today.

Nice animation !

@adekto Do you mind if I tweet these fantastic little trials?

Edit now it seems quite smooth. I will increase the framerate and see what happens to the smoothness

1 Like

yea sure no problem sharing, i realy hope to make this a full platformer

3 Likes

Who is this character, Lara Pixelcroft?

you know what, yea sure chara pixelcoft

3 Likes

lol can’t wait to meet and play with Chara soon![quote=“adekto, post:10, topic:164, full:true”]
you know what, yea sure chara pixelcoft
[/quote]

1 Like

Can you tell me what software you use to draw this

i used photoshop since i know it well and it has a timeline,
there are free alternatives i think you can do the same with paint.net fairly easly

ok now you can walk
NOTE: code is terrble and unoptimized, i know its crap physics im working on it :runner::walking:

im doing like 18 collision checks every frame, lol i need to optimize badly

oh yea the map data is actualy an image, thats maybe why its so terrible

1 Like

Thanks for sharing your code but may I suggest using Github Gist for sharing code?
This way we don’t have to download and unzip your code but we can view it from our browser. :wink:

Just a friendly suggestion :blush:

sure thing will do in future, did not know that existed.
well i did cuz multiple files
and realy realy dont look at that mess XD

You can just view it on github with syntax highlight in the browser, or use raw.github for plain text. No need to use gists for that. Host source code on Github, textual code snippets on Gist. The way it is intended.

i already did that,
anyone got a ideas on how to improve walking and jumping?

If you mean speedwise? I guess that the game.update() call clears the screen internally as well? How about only redrawing changed parts? E.g. if you implement camera follow with delay, you don’t need to draw the full map. Or iy you don’t move on x axis you only need to draw about 14 * (26 * 1.5). On a static screen same goes for x if you don’t move vertically.
Should make a bit of a difference. You don’t even need that much calculation for it.

no not realy a problem with the screen buffer, im just unsure about any of the pysics, i kinda have it now that the inital jump is fine, but falling down is like feather falling
i had allot of dificulty with the map compression, wich probebly is also slowing things down though im not noticing any lag

i guess if anyone wants it i could rip out and refine the level drawing using an image as the level data, if you only using 15 tiles in your level you can basically use this technique and convert using one of the converters.