Blade Brothers Engine: Creating my first 2D Game Engine
Moderator: PC Supremacists
Re: Blade Brothers Engine: Creating my first 2D Game Engine
Already did :D
- LeonBlade
- Chaos Rift Demigod
- Posts: 1314
- Joined: Thu Jan 22, 2009 12:22 am
- Current Project: Trying to make my first engine in C++ using OGL
- Favorite Gaming Platforms: PS3
- Programming Language of Choice: C++
- Location: Blossvale, NY
Re: Blade Brothers Engine: Creating my first 2D Game Engine
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.
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.
There's no place like ~/
- combatant936
- Chaos Rift Newbie
- Posts: 39
- Joined: Wed Jul 29, 2009 11:11 pm
- Current Project: It's a secret!!
- Favorite Gaming Platforms: N64, SNES, PS2, PC
- Programming Language of Choice: C++, 65816 asm
- Location: Pennsylvania
- Contact:
Re: Blade Brothers Engine: Creating my first 2D Game Engine
No way I do!! xD AND I also had problems with the Wii at first for some reason...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.
What exactly is the problem? I had a hard time getting maps to work correctly for some reason.
- LeonBlade
- Chaos Rift Demigod
- Posts: 1314
- Joined: Thu Jan 22, 2009 12:22 am
- Current Project: Trying to make my first engine in C++ using OGL
- Favorite Gaming Platforms: PS3
- Programming Language of Choice: C++
- Location: Blossvale, NY
Re: Blade Brothers Engine: Creating my first 2D Game Engine
I'm getting DSI exceptions out the damn ass. I'm not sure why...
There's no place like ~/
- combatant936
- Chaos Rift Newbie
- Posts: 39
- Joined: Wed Jul 29, 2009 11:11 pm
- Current Project: It's a secret!!
- Favorite Gaming Platforms: N64, SNES, PS2, PC
- Programming Language of Choice: C++, 65816 asm
- Location: Pennsylvania
- Contact:
Re: Blade Brothers Engine: Creating my first 2D Game Engine
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.
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.
- LeonBlade
- Chaos Rift Demigod
- Posts: 1314
- Joined: Thu Jan 22, 2009 12:22 am
- Current Project: Trying to make my first engine in C++ using OGL
- Favorite Gaming Platforms: PS3
- Programming Language of Choice: C++
- Location: Blossvale, NY
Re: Blade Brothers Engine: Creating my first 2D Game Engine
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);
There's no place like ~/
- GroundUpEngine
- Chaos Rift Devotee
- Posts: 835
- Joined: Sun Nov 08, 2009 2:01 pm
- Current Project: mixture
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++
- Location: UK
Re: Blade Brothers Engine: Creating my first 2D Game Engine
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
- combatant936
- Chaos Rift Newbie
- Posts: 39
- Joined: Wed Jul 29, 2009 11:11 pm
- Current Project: It's a secret!!
- Favorite Gaming Platforms: N64, SNES, PS2, PC
- Programming Language of Choice: C++, 65816 asm
- Location: Pennsylvania
- Contact:
Re: Blade Brothers Engine: Creating my first 2D Game Engine
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..
- LeonBlade
- Chaos Rift Demigod
- Posts: 1314
- Joined: Thu Jan 22, 2009 12:22 am
- Current Project: Trying to make my first engine in C++ using OGL
- Favorite Gaming Platforms: PS3
- Programming Language of Choice: C++
- Location: Blossvale, NY
Re: Blade Brothers Engine: Creating my first 2D Game Engine
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.
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.
There's no place like ~/
Re: Blade Brothers Engine: Creating my first 2D Game Engine
Man that sucks, what do you mean across the network? Like loading the code through the network? Cause that would be cool
- LeonBlade
- Chaos Rift Demigod
- Posts: 1314
- Joined: Thu Jan 22, 2009 12:22 am
- Current Project: Trying to make my first engine in C++ using OGL
- Favorite Gaming Platforms: PS3
- Programming Language of Choice: C++
- Location: Blossvale, NY
Re: Blade Brothers Engine: Creating my first 2D Game Engine
Debugging over a network.
Using GDB to debug over the Network
Using GDB to debug over the Network
There's no place like ~/
Re: Blade Brothers Engine: Creating my first 2D Game Engine
I see that's cool :D
- LeonBlade
- Chaos Rift Demigod
- Posts: 1314
- Joined: Thu Jan 22, 2009 12:22 am
- Current Project: Trying to make my first engine in C++ using OGL
- Favorite Gaming Platforms: PS3
- Programming Language of Choice: C++
- Location: Blossvale, NY
Re: Blade Brothers Engine: Creating my first 2D Game Engine
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
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
There's no place like ~/
- LeonBlade
- Chaos Rift Demigod
- Posts: 1314
- Joined: Thu Jan 22, 2009 12:22 am
- Current Project: Trying to make my first engine in C++ using OGL
- Favorite Gaming Platforms: PS3
- Programming Language of Choice: C++
- Location: Blossvale, NY
Re: Blade Brothers Engine: Creating my first 2D Game Engine
There's no place like ~/