Wolfenduino 3D

Advice on general approaches or feasibility and discussions about game design

Re: Wolfenduino 3D

Postby jonnection » Thu Oct 29, 2015 7:49 pm

@jhhoward:

it works for the most part, but occasionally I have a strange problem where the wrong data is loaded. I'm not sure if it is a hardware issue (i.e. my SD card or Gamebuino) or a bug in the Petit Fatfs implementation


I have seen similar things happening. In my case, it was caused by running out of RAM during program execution. What I was able to figure out was that somehow the PetitFS file stream buffer was overlapping other data. Freeing up RAM in other parts of the program solved the issues for me.

EDIT: the way I figured it out was that I was getting data from PetitFS that was actually other data structures that I recognized and I knew were in the memory.
User avatar
jonnection
 
Posts: 317
Joined: Sun May 04, 2014 8:21 pm

Re: Wolfenduino 3D

Postby jhhoward » Sat Oct 31, 2015 3:05 pm

jonnection wrote:@jhhoward:

it works for the most part, but occasionally I have a strange problem where the wrong data is loaded. I'm not sure if it is a hardware issue (i.e. my SD card or Gamebuino) or a bug in the Petit Fatfs implementation


I have seen similar things happening. In my case, it was caused by running out of RAM during program execution. What I was able to figure out was that somehow the PetitFS file stream buffer was overlapping other data. Freeing up RAM in other parts of the program solved the issues for me.

EDIT: the way I figured it out was that I was getting data from PetitFS that was actually other data structures that I recognized and I knew were in the memory.


The streaming issue is really bugging me, but I guess it is good to know that my hardware isn't faulty. I will have a look and see if I can run the game with lower RAM usage by temporarily disabling other parts. The strange thing is that when it occurs, it streams in data that makes sense for the map. There is a buffer that stores the currently loaded section of the map, but it doesn't sit next to the map streaming code in memory.

I might try writing a test program which is stripped down to just the streaming code and store a copy of the map in flash memory. That way I can perform reads and check if the result is correct, and it might give me some hints as to the exact situation that causes the bug.

Edit: just tested in Simbuino and the bug still occurs, so definitely looks like a software bug rather than being a hardware problem.
jhhoward
 
Posts: 13
Joined: Wed Jul 16, 2014 8:15 am

Re: Wolfenduino 3D

Postby superfreaky » Tue Dec 15, 2015 1:03 am

There may be a software glitch, but I swear there's still some sort of bug. I have played your demo plenty (on real hardware), and I have noticed some walls not appearing. First, it appears there's no wall, just a door. Then, when you walk through where the wall would be, it appears when you turn around and face it. If you walk far enough away that it disappears, the wall is perfectly normal when it appears again. Not a serious bug, but I did get trapped in a small room on the wrong side of the walls once.
superfreaky
 
Posts: 183
Joined: Wed Oct 28, 2015 1:46 am

Previous

Return to Project Guidance & Game development

Who is online

Users browsing this forum: No registered users and 17 guests

cron