Please add a save function!
» Forum
> Your Projects
CaLc01234 wrote:
Please add a save function!
Unfortunately, it's not as easy as I had thought. The game will need significant reprogramming as far as the amount of blocks, something I'm not very motivated to do, along with being swamped with end-of-school-year projects and homework.
The problem is that the game takes up nearly all the RAM available to the user, so it isn't able to open an appvar to save it.
I should also mention that the code itself is fully uploaded on Github, but the /gfx folder is very incomplete. The game more than likely will not compile as-is.
Just when you thought (and I thought as well) that I gave up...
1. I solved the world saving problem. There is now exactly one world slot that you can save to. (98 more coming eventurally when I add a world select menu)
2. I'm figuring out exactly what does and doesn't need to be in the game. It will be much smaller soon when I break up the inventory screen into multiple pieces.
I will be uploading 0.10.0 shortly onto GitHub. Eventually I'll get around to uploading all the graphics onto the GitHub page as well. Thanks!
1. I solved the world saving problem. There is now exactly one world slot that you can save to. (98 more coming eventurally when I add a world select menu)
2. I'm figuring out exactly what does and doesn't need to be in the game. It will be much smaller soon when I break up the inventory screen into multiple pieces.
I will be uploading 0.10.0 shortly onto GitHub. Eventually I'll get around to uploading all the graphics onto the GitHub page as well. Thanks!
jasper7474 wrote:
So, for example, a 2D array in C would be something like:
uint8_t worlda[][] = [
[0,1,2,3,4,5,6],
[7,8,9,0,1,2,3],
[4,5,6,7,8,9,0]
];
So yes, a matrix like TI-BASIC. Another way to think of it is a list of lists.
This way, I can reference any block by just using worlda[x][y].
uint8_t worlda[][] = [
[0,1,2,3,4,5,6],
[7,8,9,0,1,2,3],
[4,5,6,7,8,9,0]
];
So yes, a matrix like TI-BASIC. Another way to think of it is a list of lists.
This way, I can reference any block by just using worlda[x][y].
You also said
jasper7474 wrote:
I suppose it's not super organized. I plan to add save files that can save a world bigger than 210x150, but that will be coming much later. Saving a world like that would require a chunk system, something I'm too lazy/busy to implement right now.
I mean a chunk system doesnt seem that hard.
Uhh, take this pseudocode? (I didnt look at the source at all, just keep that in mind):
Code:
struct mc_chunk = {
int8_t pos; // Position from center chunk, signed 8 bit int, -128 to 127, exists solely to be used during un/loading
uint8_t[150][25] chunk; // Matrix to store chunk itself
}
mc_chunk[9] world;
function unloadChunk(bool right) { // unloads chunk, default left chunk, right if passed true.
// Do C toolchain weird thingy to store world[right ? 0 : 8] in your world appvar
For (int i = right ? 0 : 8;right ? i>7 : i<1;right ? i++ : i--) {
world[right ? i+1 : i-1] = world[i];
}
world[right ? 0 : 8] = [empty chunk];
}
function loadChunk(int pos, bool right) { // pos corresponds to pos in chunk struct, loads chunk to the right by default
// C toolchain thingy to load chunk from world appvar, assuming the var is named just 'chunk'
unloadChunk(right);
world[right ? 0 : 8] = chunk;
}
// To see block in world from coord (more pseudo than code than above) (assuming chunk is loaded)
int x = whatever
int y = whatever
int chunkPos = int((x - (world[0].pos * 25))/25)
int blockID = world[y][x - chunkPos*25]
// It should be easy to adapt to writing blocks, now just dynamically load and unload chunks based on where the player is going and voila.
Wow, thanks for that code! I guess a progress update is due... I'll write it tomorrow.
As for the chunk system, we'll see. I've been debating on using structs to organize things like quantity in a slot, durability of tools, etc.
As for the chunk system, we'll see. I've been debating on using structs to organize things like quantity in a slot, durability of tools, etc.
Which files do I need to download to play? Just the .8xp or the pngs too? Edit: Nvm I figured it out
I downloaded the 0.10 version and ladders dont seem to work, not sure why unless there is a different button to climb and jump.
DragonKing77_146 wrote:
I downloaded the 0.10 version and ladders dont seem to work, not sure why unless there is a different button to climb and jump.
does this code work on TI-84 Plus C silver edition ThomasRobison wrote:
does this code work on TI-84 Plus C silver edition
Unfortunately, no. The CE and the C have two different processors.
DragonKing77_146 wrote:
I downloaded the 0.10 version and ladders dont seem to work, not sure why unless there is a different button to climb and jump.
It was a very rushed build and I didn't test it. 0.10.1, which I will be releasing soon, has a few bug fixes like that and some additional Survival mode functionality (not enough to warrant a new minor version like 0.11).
Are you still working on this project. I recently downloaded it to check it out and would love to see the full game or at least as much as you have completed.
Hello everyone!
I've been taking a break for a while from this project. I definitely plan to pick this back up eventually!
I've been taking a break for a while from this project. I definitely plan to pick this back up eventually!
What's the word on AI as far as mobs/animals/enemies? Actually mob AI isn't much but even having any other entities at all is a huge bit of progress from other versions of MC for the TI84
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.
» Go to Registration page
» Go to Registration page
» Goto page Previous 1, 2
» View previous topic :: View next topic
» View previous topic :: View next topic
Page 2 of 2
» All times are UTC - 5 Hours
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Advertisement