Page 9 of 19
Re: Blade Brothers Engine: Creating my first 2D Game Engine
Posted: Thu May 13, 2010 4:31 pm
by eatcomics
Already did :D
Re: Blade Brothers Engine: Creating my first 2D Game Engine
Posted: Sat Jun 12, 2010 8:10 pm
by LeonBlade
Hello everyone,
It's been a while since I've posted here or on the site in general.
I've been going through personal stuff (aren't we all) and I haven't been motivated to do anything.
So far though, I've been trying to get back on track.
I'm trying to port what I have to the Wii and I'm running into issues loading the maps into memory on the Wii.
And, without a proper debugger, this is turning into a pain in the ass.
If anyone has any experience in Wii homebrew, please let me know.
I'll keep you updated on what I'm doing if you wish to know.
Re: Blade Brothers Engine: Creating my first 2D Game Engine
Posted: Sat Jun 12, 2010 9:59 pm
by combatant936
LeonBlade wrote:
If anyone has any experience in Wii homebrew, please let me know.
I'll keep you updated on what I'm doing if you wish to know.
No way I do!! xD AND I also had problems with the Wii at first for some reason...
What exactly is the problem? I had a hard time getting maps to work correctly for some reason.
Re: Blade Brothers Engine: Creating my first 2D Game Engine
Posted: Sat Jun 12, 2010 10:29 pm
by LeonBlade
I'm getting DSI exceptions out the damn ass. I'm not sure why...
Re: Blade Brothers Engine: Creating my first 2D Game Engine
Posted: Sat Jun 12, 2010 10:49 pm
by combatant936
Yeah... that was my problem too... after some tweaking to my code though it went away.
Could I maybe see how you are loading your maps and initializing? Like not the file loading function itself, but like how you set up your main game function to load and initialize everything.
Re: Blade Brothers Engine: Creating my first 2D Game Engine
Posted: Sat Jun 12, 2010 10:58 pm
by LeonBlade
Code: Select all
long lSize;
size_t result;
FILE* fileHandle = fopen(filename, "r");
Log::LogControl.Write("Opening filehandle to open map file...\n");
if (fileHandle == NULL)
{
Log::LogControl.Write("Error: fileHandle is NULL.\n");
return false;
}
// read in the magic
Log::LogControl.Write("Reading in magic...\n");
fread(&magic, 4, 1, fileHandle);
if (magic != 1179468354)
{
Log::LogControl.Write("Warning: Magic was not of the right type.\nMagic type found: %s\n", magic);
// return false;
}
// read the header
Log::LogControl.Write("Setting memory for the header...\n");
memset(&mapHeader, 0x00, sizeof(MapHeader));
if (&mapHeader == NULL)
{
Log::LogControl.Write("Error: %s\n", stderr);
return false;
}
Log::LogControl.Write("Reading in the header...\n");
result = fread(&mapHeader, sizeof(MapHeader), 1, fileHandle);
Log::LogControl.Write("Result: %u\n", result);
Log::LogControl.Write("Header info(for verification): Tiles X: %u & Tiles Y: %u\n");
unsigned int tileCount = mapHeader.tilesX * mapHeader.tilesY;
unsigned int tileBufSize = tileCount * sizeof(MapData);
Log::LogControl.Write("Going to malloc mapData...\n");
mapData = (MapData*)malloc(tileBufSize);
if (mapData == NULL)
{
Log::LogControl.Write("Error: MapData couldn't be mallocated.\n");
}
// read in map data
Log::LogControl.Write("Reading in mapData...\n");
fread(mapData, tileBufSize, 1, fileHandle);
fclose(fileHandle);
Re: Blade Brothers Engine: Creating my first 2D Game Engine
Posted: Sun Jun 13, 2010 11:24 am
by GroundUpEngine
Wii port? Ace bro! =)
Re: Blade Brothers Engine: Creating my first 2D Game Engine
Posted: Sun Jun 13, 2010 3:03 pm
by eatcomics
Thanks for asking that question Leon, I had this same problem first time I tried loading a Wii homebrew test... I went in edited some code and it worked fine but I have no idea why xD
Re: Blade Brothers Engine: Creating my first 2D Game Engine
Posted: Sun Jun 13, 2010 4:25 pm
by combatant936
Yeah.. I'm not sure how to help with your specific problem but just try different things and see if it fixes itself.. I know that's crap but I mean that's what I had to do..
Re: Blade Brothers Engine: Creating my first 2D Game Engine
Posted: Sun Jun 13, 2010 6:46 pm
by LeonBlade
Hahaha, no problem at all guys.
I didn't think you would be able to help me with this anyways.
I honestly have no idea what's wrong so... I don't know!
If only I had a debugger... I want to get it working across the network.
That's what those log calls are for, because I use them as a like stepping device to see where things went wrong.
Unfortunately, however, if it crashes none of the information is written out like it should be into the log.
Re: Blade Brothers Engine: Creating my first 2D Game Engine
Posted: Sun Jun 13, 2010 6:49 pm
by eatcomics
Man that sucks, what do you mean across the network? Like loading the code through the network? Cause that would be cool
Re: Blade Brothers Engine: Creating my first 2D Game Engine
Posted: Sun Jun 13, 2010 7:28 pm
by LeonBlade
Re: Blade Brothers Engine: Creating my first 2D Game Engine
Posted: Sun Jun 13, 2010 11:50 pm
by eatcomics
I see that's cool :D
Re: Blade Brothers Engine: Creating my first 2D Game Engine
Posted: Thu Jun 24, 2010 9:45 pm
by LeonBlade
We have lift off!
Click here to see in a new page.
You'll notice no transparency... yeah... fucking Wii and it's transparency bull shit.
I'll work on that next
Re: Blade Brothers Engine: Creating my first 2D Game Engine
Posted: Thu Jun 24, 2010 10:05 pm
by LeonBlade