Chara pixelcroft in the shrine of dusty artifacts

Sorry if that came off as a bit accusitive/angry/whatever. There was originally a secondly and thirdly, but I cut a load of stuff out because I have a habit of writing text walls :P.

It’s certainly possible, it’s just a really really big task.

As it is I ‘cheated’ by resorting to splitting the templates across several files and abusing preprocessor defines so I could auto-generate a large number of functions instead of writing them myself :P.

1 Like

this project is still alive, but its pretty much back from zero since i found that most my old code is ether a mess or not compliant with the newer pokitto library. heres the new run sprite its a bit bigger and allot smoother

still a thing i dont understand and i cant find much info on is the SD card reading files (level data for this game) if anyone knows how that works plz pm me cuz it lies at the core of this game (this game is only going to be playable with a sd card cuz im intending it to be metroidvania and thats not going to fit in flash)

6 Likes

ok i hear you!

1 Like

testing out high res mode

pixelcroft.bin (30.0 KB)

main problem i am dealing with is background fill in
this also means no image background just a single color

its sort of working but i need to be aware of what pixels have to be updated and wich dont to avoid flicker

4 Likes

i think i got a solution using 8x8 tiles and having a 4by5 tile sector buffer

atm all other objects are static and at most i think only of adding small tile based enemies maybe i can get away with making these sector buffer a full 8bit buffer. the advantage there is that every sprite in that buffer can use there own color pallets

the red rectangle in image would take about 1.25kB in memory

1 Like

I just checked this out on hardware and it is really impressive looking

I think @Hanski has already solved your problem with the sprite functionality he has added

oh neat lol
my bad i wasnt aware that was implemented yet

1 Like

I am in the middle of combining all work by @Hanski and @spinal and syncing the mbed online ide and github. Almost done.

awsome i will grab that, is there any guide on how to set there systems up?

Look at Hanskis and Spinals postings on the forum. There’s some really neat stuff. There is also a 8-bit (256 color) mode.

I am just in the middle of testing the functionality in mbed online ide

I was unaware this project was still being worked on. Just tested out your demo from last month. You’re drawing everything direct to the screen? That’s some hardcore stuff right there. Keep at it :smiley:

2 Likes

Commiting changes now. All the @Hanski and @Spinal goodies will be available on the online mbed PokittoLib in a moment. GitHub repo and mbed PokittoLib are in sync

1 Like

@Adekto : Hanski’s very impressive Sprites library demo here:

https://os.mbed.com/teams/Pokitto-Community-Team/code/Sprites/

iv been looking at it and i see its limited to 2bpp wen im looking at 565 to deal with the overlap
my current spites basically don’t render, so it seems i have to persue my own version afterall

1 Like

I cannot wait to play his game.

got tile refresh and small buffer drawing working
heres a test
pixelcroft.bin (47.9 KB)

1 Like

looks really nice, and moving very smooth :grinning:

1 Like

small update today
had a very odd glitch in the bottom left corner that lagged the game thats now fixed.

added map loading from sd card, it worked first try which I’m amazed at
still need to work on a more proper map data structure to add additional data like doors and entity placement

since scrolling is really slow in this unbuffered high resolution mode, and the hardware scrolling is currently not implemented in the lib, the game is going to be single screen rooms (think original Zelda)

filetest.zip (33.9 KB)

1 Like

keeping up with small updates, and also just a way for me to talk about the game development process in general
i know anyone reading this tread will be confused, dont worry you do not have to read this hole thing.

i like to talk a bit about my map process and what tools im using
to design the layouts im using tiled a very well known tile editor and im exporting the single layer levels as csv wich gives a clean list of numbers representing my tile indexes
i than add this just in an array inside a very small c program:

#include <stdio.h>

char mapdata[] = {
//map 0
0,7,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,5,
0,7,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,5,
0,7,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,1,2,9,9,9,5,
0,7,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,4,0,2,9,9,5,
0,0,6,6,6,6,6,6,6,6,6,6,2,9,9,9,9,9,9,9,9,9,9,4,3,9,9,5,
0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,6,2,9,9,9,9,9,9,9,9,9,5,
0,8,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,7,9,9,9,9,9,9,9,9,9,5,
7,9,9,9,4,8,8,0,0,0,0,0,0,0,0,0,0,7,9,9,9,9,9,9,9,9,9,5,
7,9,9,9,9,9,9,4,0,0,0,0,0,0,0,0,0,7,9,9,9,9,9,9,9,9,9,5,
7,9,9,9,9,9,9,9,5,0,0,0,0,0,0,0,0,0,6,6,6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	
	fwrite(mapdata, sizeof(char), sizeof(mapdata), myfile);
	
	fclose(myfile);
        printf("job done!\n");
	return 0;
}

as you can see i basically hard code the data in this little program just for simplicity
(i compile and run this using: gcc main.c ; ./a.out )

this will make a file called MYMAP.DAT, the file type has no real meaning apart from letting users know its data, i assume its the convention for the pokitto

on the pokitto side im using code that @wuuff made

heres the version im using specific to my map format of 22 by 28 tiles, im calling initMap once in main.

#define MAP_SIZE 616
uint8_t mapdata[22][28];

void loadMap(uint8_t index){
    fileSeekAbsolute(index*MAP_SIZE);
    for(int Y =0; Y<22; Y++){
        fileReadBytes(mapdata[Y],28);
    }
}

void initMap(){
    getFirstDirEntry();
    uint32_t myFile = fileOpen("MYMAP.DAT", FILE_MODE_READONLY);
    if( !myFile ){ //is file is open
      loadMap(1);
    }
}
4 Likes

i added doorways and crappy physics, tiles that don’t intersect with physics can be a different pallet (currently using 2 pallets)

pixelcroft_maptest.zip (34.7 KB)

1 Like