Sign in to follow this  
  • entries
    557
  • comments
    1237
  • views
    422057

Untitled

Sign in to follow this  

210 views

Ok, I'm a little more calm now.

I've not updated this journal in a while, I've been exceptionally busy with work, too many projects, not enough people, etc.
I've also been playing Guild Wars an almost unhealthy amount in the free time I have, but meh.

For the people who have asked, I will be continuing my D3D tutorials, but I can't say when - soon I hope (As in, in the next month or two). I'm still not really sure what sort of content I should have in the next tutorial; things that pop into my head include:
  • Audio - some classes to play .wav sound effects and .ogg music
  • A replacement ID3DXSprite class, which handles texture atlasing
  • Asset managment - A virtual filesystem (Basic .pak file really), and associated resource manager.

    Ideally, I'd like to get the first two points done, and then look at doing something like a basic space shooter game (See my TA Contest Entry in my GDNet Showcase for instance).


    Sometimes I love working on DS. I was looking at getting some debug menu code working for one of the artists here, and when I finally got it working (After going to-and-fro over 4 or 5 different bugs) he jokingly asked me to make it "bounce around the screen and colour cycle like those old Amiga demos". People around here should know better than to put ideas into my head. So, 2 minutes later:

    static int nTicks = 0;
    ++nTicks;
    int nScroll = ((nTicks/3)%16);
    if(nScroll > 8) nScroll = 16-nScroll;

    #define RGB(r, g, b) (u16)((r) | ((g)<<5) | ((b)<<10))
    u16 nPalette[] =
    {
    RGB(31, 31, 31),
    RGB(31, 16, 16),
    RGB(31, 0, 0),
    RGB(31, 16, 0),
    RGB(31, 31, 0),
    RGB(16, 31, 0),
    RGB(0, 31, 0),
    RGB(0, 16, 16),
    RGB(0, 0, 31),
    RGB(0, 16, 31),
    RGB(0, 31, 31),
    RGB(16, 16, 31),
    RGB(31, 0, 31),
    };
    const int nPals = sizeof(nPalette)/sizeof(nPalette[0]);
    int nPal = ((nTicks/4)%nPals);
    *(u16*)0x05000002 = nPalette[nPal];
    *(u32*)0x4000014 = (nScroll&0xffff);


    Oh the joys of being able to poke memory at various fixed addresses [smile]
  • Sign in to follow this  


    1 Comment


    Recommended Comments

    you woulda loved copperlists :-)

    (video hardware programs with a wait for scanline instruction and a register poke instruction, and due to the timing you could set a video hardware register to different value multiple times across one scanline - palette register poking, bitmap start position poking, and even blitter transfers running asynchronously to the cpu - with the CPU left to do fun things like re-write the copperlist on the fly. Jay Miner deserves a sainthood for services to the demo scene! </nostalgia>

    Share this comment


    Link to comment

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now