Homebrew MineDS

Wolfgange

Well-Known Member
Member
Joined
Feb 9, 2012
Messages
231
Trophies
1
XP
248
Country
United States
:unsure:When the new version will be? :sad:

I really don't know :( like I said before, only the saving bug needs to be fixed (I have to compile the last few builds, place one on, test the saving and loading functionality, mark whether it works, retry for each build, and then figure out what changed between builds that caused the load feature to break), but the task is so tedious, I haven't gotten motivation to do it.
 

Toaster23456

New Member
Newbie
Joined
Jun 21, 2014
Messages
4
Trophies
0
XP
49
Country
United States
I really don't know :( like I said before, only the saving bug needs to be fixed (I have to compile the last few builds, place one on, test the saving and loading functionality, mark whether it works, retry for each build, and then figure out what changed between builds that caused the load feature to break), but the task is so tedious, I haven't gotten motivation to do it.

Fixed.
 
  • Like
Reactions: Wolfgange

Wolfgange

Well-Known Member
Member
Joined
Feb 9, 2012
Messages
231
Trophies
1
XP
248
Country
United States
I have tested this, and can verify control saving + loading works flawlessly. On the other hand, when loading worlds, only the foreground for a small chunk is loaded. It is as if it is loading a preview world (What is used to display the top image on startup). Let me look into this.
 

Wolfgange

Well-Known Member
Member
Joined
Feb 9, 2012
Messages
231
Trophies
1
XP
248
Country
United States
I have tested this, and can verify control saving + loading works flawlessly. On the other hand, when loading worlds, only the foreground for a small chunk is loaded. It is as if it is loading a preview world (What is used to display the top image on startup). Let me look into this.

I've done some testing and here's what I've found:
-Saving a world without the file MineWorld.bin being there results in only the foreground for the first 32 blocks being saved in the new file. The inventory and background (And blocks beond 32) are not saved
-If you save over another world file, everything works fine.

So in shorter words, here are the problem:
-When creating a new MineDSWorlds file, it fails to save everything

Potential Solutions:
-Require the user to copy a default MineWorld file to the SD card before playing
-Find the source of the problem and fix it
 

Toaster23456

New Member
Newbie
Joined
Jun 21, 2014
Messages
4
Trophies
0
XP
49
Country
United States
So in shorter words, here are the problem:
-When creating a new MineDSWorlds file, it fails to save everything

I can't seem to reproduce that bug. :\
-Tried saving then loading.
-Tried placing a block then saving then loading.
-Tried saving then restarting then loading.
-Tried placing a block then saving then restarting then loading.
-On both the DS lite and 3DS XL.

Try my MineDS.nds.
 

Wolfgange

Well-Known Member
Member
Joined
Feb 9, 2012
Messages
231
Trophies
1
XP
248
Country
United States
I can't seem to reproduce that bug. :\
-Tried saving then loading.
-Tried placing a block then saving then loading.
-Tried saving then restarting then loading.
-Tried placing a block then saving then restarting then loading.
-On both the DS lite and 3DS XL.

Try my MineDS.nds.
Hmm, have you tried deleting the MineWorld.bin file from the SD card and then saving a new world? And what flashcard are you using? I'm using an R4i-sdhc which is not as advances as something like the DSTwo or Acekard 2i.

I tried your file and the same things occured (Although a few times it did work, so the glitch is inconsistent). You probably already did this, but just in case here's the steps I follow to reproduce it:
1. On computer, delete all the files created by MineDS
2. Load up MineDS
3. Click Single Player->Survival
4. Destroy 2 block types or more and maybe 2 of each type (ex. 2 dirt + 2 Wood)
5. Click menu->Save Game
6. Click menu->Single Player->Creative. Basically to change the blocks to identify whether MineDS actually loads the data from the file
7. Click menu->Load and check the following:
-Are the background blocks present?
-Are the blocks correct 33 blocks to the right?

And then if I save and load the game ~5 times, one of the times it will corrupt the save file and insert stone blocks into the inventory. Thinking about it, let me try a new SD Card...
 

Wolfgange

Well-Known Member
Member
Joined
Feb 9, 2012
Messages
231
Trophies
1
XP
248
Country
United States
Acecard 2i



It loads fine for me.
Try r444. It sets fopen to binary mode.
We definitely want to write in binary mode, so that was what caused some of the corruption (I think).
Hmm... This is what I get now:
1st save after deleting file saves and loads blocks perfectly, but nothing is loaded into the inventory. The second save and load of the same world after destroying blocks, saves blocks perfectly again, and nothing in the inventory saved. The third time and on, everything worked flawlessly. So I deleted the files again and tried it and the exact same thing happened.
 

Wolfgange

Well-Known Member
Member
Joined
Feb 9, 2012
Messages
231
Trophies
1
XP
248
Country
United States
We definitely want to write in binary mode, so that was what caused some of the corruption (I think).
Hmm... This is what I get now:
1st save after deleting file saves and loads blocks perfectly, but nothing is loaded into the inventory. The second save and load of the same world after destroying blocks, saves blocks perfectly again, and nothing in the inventory saved. The third time and on, everything worked flawlessly. So I deleted the files again and tried it and the exact same thing happened.
I fixed it :D. (Or at least for me) I just added the + to the file open parameters (The update file flag). It was hard to find the documentation for the flags for some reason, but I found theme here: http://pubs.opengroup.org/onlinepubs/009695399/functions/fopen.html
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    SylverReZ @ SylverReZ: Large creep