Introducing Rockbot - a Megaman clone

Discuss the development of software, tools, libraries and anything else that helps make ps2dev happen.

Moderators: cheriff, Herben

Post Reply
protomank
Posts: 59
Joined: Thu Dec 18, 2008 1:41 am
Location: Porto Alegre, RS, Brazil
Contact:

Introducing Rockbot - a Megaman clone

Post by protomank »

http://www.upperland.net/rockbot/

News in the page are still in Portuguese, I did not had the time for translations - feel free to use google translator - but you can have a little idea of how the project is.

Image

Game is made in SDL, and with some adjustments is portable to PS2. It is still in early development and I plan to put the code on sourceforge as soon as I finish the process of creating self-made graphics, because I can't use ones that are copyright from Capcom :)
protomank
Posts: 59
Joined: Thu Dec 18, 2008 1:41 am
Location: Porto Alegre, RS, Brazil
Contact:

Post by protomank »

The code and a Windows build are on sourceforge page already.

I'll post a PS2 build once I find out how to load files independently from the place (CD, DVD, HD, MC or MASS) you run the elf.
cosmito
Posts: 307
Joined: Sun Mar 04, 2007 4:26 am
Location: Portugal
Contact:

Post by cosmito »

I'll post a PS2 build once I find out how to load files independently from the place (CD, DVD, HD, MC or MASS) you run the elf.
You can parse the argv[0] path/filename string to figure out from which device your program was started. For the HDD case, the things are trickier, since it's reported as from 'host:'...

There are almost infinite ways of doing this, but if you want to spare some dev time, you can use my solution I implemented for ps2doom (and if you spot some bug, warn me please :) ) :

Code: Select all

void GetElfFilename(const char *argv0, char* deviceName, char* fullPath, char* elfFilename)
{
    int i;

    int lenght = strlen(argv0);
    int doispontosIndex = 0;
    int slashIndex = 0;
    int isFileOnRoot = 0;

   
    // locate '/' from the end of path
    for(i=lenght-1; i>=0; i--)
    {
        if (argv0[i] == '/')
        {
            slashIndex = i;
            break;
        }
    }
    if (slashIndex == 0)
        isFileOnRoot = 1;       // elf is located on root of device

    // locate ':' from the start of path
    for&#40;i=0; i<lenght; i++&#41;
    &#123;
        if &#40;argv0&#91;i&#93; == '&#58;'&#41;
        &#123;
            doispontosIndex = i;
            break;
        &#125;
    &#125;

    // set deviceName to device name &#40;ex&#58; 'mass&#58;', 'host&#58;', 'mc0', etc&#41;
    strncpy&#40;deviceName, argv0, doispontosIndex+1&#41;;
    deviceName&#91;doispontosIndex+1&#93; = 0;

    // set fullPath to full path &#40;ex&#58; 'mass&#58;directory/', 'mass&#58;directory1/directory2/', etc &#40;no limit over depth&#41;&#41;
    if &#40;isFileOnRoot&#41;
        strcpy&#40;fullPath, deviceName&#41;;   // fullPath = deviceName actually
    else
    &#123;
        strncpy&#40;fullPath, argv0, slashIndex+1&#41;;   
        fullPath&#91;slashIndex+1&#93; = 0;
    &#125;

    // set elfFilename
    if &#40;isFileOnRoot&#41;
        memcpy&#40;elfFilename, argv0 + doispontosIndex + 1, lenght - doispontosIndex&#41;;
    else
        memcpy&#40;elfFilename, argv0 + slashIndex + 1, lenght - slashIndex&#41;;
&#125;
Hope this helps. This should work for every device except HDD.
protomank
Posts: 59
Joined: Thu Dec 18, 2008 1:41 am
Location: Porto Alegre, RS, Brazil
Contact:

Post by protomank »

Yep, helps a lot. I'm about to implement this unity detection, but first I have a major blocker to solve: the TV image flickering a LOT when running SDL/PS2 apps :-(
protomank
Posts: 59
Joined: Thu Dec 18, 2008 1:41 am
Location: Porto Alegre, RS, Brazil
Contact:

Post by protomank »

Well, beta3 was just released, including builds for PS2 USB and CDROM besides Windows and Linux builds. See information and download it in: http://rockbot.upperland.net

On the PS2 front, the things that need work or are missing:
- find a way to build a decent timer on PS2 that counts milisseconds to fix SDL_Timer
- HDD support
- fix SDL_Mixer
- add a way for SDL to disable bilinear filter in gsKit

Any help is appreciated in those fronts :)
protomank
Posts: 59
Joined: Thu Dec 18, 2008 1:41 am
Location: Porto Alegre, RS, Brazil
Contact:

Post by protomank »

Some screenshots of it running on Linux:

Image

Image

Image
User avatar
Ameen
Posts: 10
Joined: Sun Jun 14, 2009 6:28 am
Location: Bahrain
Contact:

Post by Ameen »

Hi,

I just found a bug in your game! Just to let you know I downloaded the Win32 version of the game and when first level came, all I did is move the player to the left of the screen and it was like his was falling from there.

By the way, you did a nice job!
protomank
Posts: 59
Joined: Thu Dec 18, 2008 1:41 am
Location: Porto Alegre, RS, Brazil
Contact:

Post by protomank »

Yes, known bug.
Sadly I did rushed beta3 because I was tired of waiting for people being able to test it, and let it out with 4 or 5 bugs I knew about - shame on me :)

Thanks anyway, the first thing I need to work on beta4 is the collision verification, because of this bug, and one more that allows player to walk in the middle air, because he gets locked into a platform. I did the beta3 in less than a month, beta4 is planned to take 2 or 3 months, and this includes my vacation period, so it should be pretty solid :)
Post Reply