Sonic and Sega Retro Message Board: The SX Engine - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
  • 7 Pages +
  • ◄ First
  • 2
  • 3
  • 4
  • 5
  • 6
  • Last ►
    Locked
    Locked Forum

The SX Engine Recreating the Sonic Xtreme executable (now open source!)

#46 User is offline Uhyve 

Posted 27 January 2011 - 11:05 AM

  • Master Procrastinator
  • Posts: 45
  • Joined: 08-November 10
  • Gender:Male
  • Location:Huddersfield, England
  • Project:SX Engine
Was messing around alittle with my code today, and I got frame based animation implemented:


The cleanup is pretty much done for now, so I'll probably start adding more features again soon. Though this animation is still kinda funky on some levels, can cause some memory access violations (Edit: fixed) and I've guessed an animation framerate of 30fps, which looks a bit fast.
This post has been edited by Uhyve: 27 January 2011 - 06:03 PM

#47 User is offline RGamer2009 

Posted 27 January 2011 - 12:17 PM

  • True Blue
  • Posts: 2403
  • Joined: 27-November 08
  • Gender:Male
  • Location:Wherever life takes me...
  • Wiki edits:3,086
That looks AMAZING! We are so close to a playable Xtreme its not funny!

Awesome job!

#48 User is offline Skeledroid 

Posted 27 January 2011 - 12:28 PM

  • Posts: 215
  • Joined: 17-November 06
  • Project:Platformer Engine
  • Wiki edits:1
QUOTE (RGamer2009 @ Jan 27 2011, 11:17 AM)
That looks AMAZING! We are so close to a playable Xtreme its not funny!

Awesome job!

thiiiiiiiiiiiiiiiiiiiiiiiis. so close to playing the 3d game we've always wanted (at least for me, I'd rather play this than sonic adventure).

#49 User is offline Andrew75 

Posted 27 January 2011 - 02:29 PM

  • Technical Artist
  • Posts: 1244
  • Joined: 12-December 09
  • Gender:Male
  • Project:Project AXSX(Sonic Xtreme) + Misc Projects
Seems our projects are working from opposite ends, you have all the visuals for the PC levels,
and we have a playable game engine with level rotations, and some E3 level layout recreations as well as a proper fisheye. and some of the boss engine done.
seems merging the 2 projects would be the thing to do. ^__^

#50 User is offline Uhyve 

Posted 27 January 2011 - 03:44 PM

  • Master Procrastinator
  • Posts: 45
  • Joined: 08-November 10
  • Gender:Male
  • Location:Huddersfield, England
  • Project:SX Engine
Hehe, thanks for the nice responses, it helps when programming, makes it seem less like I'm just burning time.
This post has been edited by Uhyve: 27 January 2011 - 03:56 PM

#51 User is offline True Dude 

Posted 27 January 2011 - 05:21 PM

  • Posts: 1191
  • Joined: 07-January 06
  • Gender:Male
  • Wiki edits:980
Wow, is it just me, or does Sonic X-treme resemble Minecraft?

....

Could someone with Minecraft begin working on converting Sonic X-treme levels over now? =P
This post has been edited by True Dude: 27 January 2011 - 05:21 PM

#52 User is offline SANiK 

Posted 27 January 2011 - 06:33 PM

  • Posts: 406
  • Joined: 21-September 04
  • Gender:Male
  • Wiki edits:6

I see you have restructured the code. It looks nice.

I was looking through some of it, and I wanted to say that you don't need to do the following,
CODE
int renderFlag = atoi(temp.c_str());

while (renderFlag >= 1)
{
        int tempPower = 1;

        while (tempPower * 2 <= renderFlag)
        {
                tempPower = tempPower * 2;
        }

        if(tempPower == 262144) // this is guessed, obviously.
        {
                System->usedCubes[System->currentCube].innerMirror = true;
        }

        if(tempPower == 256)
        {
                System->usedCubes[System->currentCube].mirrored = true;
        }

        if(tempPower == 16)
        {
                System->usedCubes[System->currentCube].transparent = true;
        }
        
        renderFlag = renderFlag - tempPower;
}


You can just do it like this,
CODE
int renderFlag = atoi(temp.c_str());

if(renderFlag  & 256)
{
  System->usedCubes[System->currentCube].mirrored = true;
}

if(renderFlag & 16)
{
  System->usedCubes[System->currentCube].transparent = true;
}


& in C is the binary 'and' operator.
0 & 0 = 0
0 & 1 = 0
1 & 0 = 0
1 & 1 = 1

It gives 1 when both sides have a 1 in the bit. So 16 in binary is 10000. If the renderflag is 11010100, and you do & 10000, you get:
11010100 renderflags anded with
00010000 the value 16
----------- gives you...
00010000


#53 User is offline Ollie 

Posted 27 January 2011 - 07:02 PM

  • DIGGY DIGGY HOLE
  • Posts: 1251
  • Joined: 28-May 06
  • Gender:Male
  • Location:Stoke-On-Trent, England, UK
  • Wiki edits:149
I'd love to see the playability side of things implemented recreating the full PC Version remade. How possible would that be though Andrew75? Assuming that your project isn't in the same programming language so you'd have to start pretty much from scratch right?

QUOTE (True Dude @ Jan 27 2011, 10:21 PM)
Wow, is it just me, or does Sonic X-treme resemble Minecraft?

....

Could someone with Minecraft begin working on converting Sonic X-treme levels over now? =P


Don't give me ideas like that sad.png
This post has been edited by Ollie: 27 January 2011 - 07:04 PM

#54 User is offline Uhyve 

Posted 27 January 2011 - 07:19 PM

  • Master Procrastinator
  • Posts: 45
  • Joined: 08-November 10
  • Gender:Male
  • Location:Huddersfield, England
  • Project:SX Engine
QUOTE (SANiK @ Jan 27 2011, 11:33 PM)
I was looking through some of it, and I wanted to say that you don't need to do the following,
CODE
Code


You can just do it like this,
CODE
Better code


& in C is the binary 'and' operator.
0 & 0 = 0
0 & 1 = 0
1 & 0 = 0
1 & 1 = 1

It gives 1 when both sides have a 1 in the bit. So 16 in binary is 10000. If the renderflag is 11010100, and you do & 10000, you get:
11010100 renderflags anded with
00010000 the value 16
----------- gives you...
00010000

Ohh, that's super useful. It wasn't until I started this project that I released how little I knew about programming.

Huh, I don't remember why I had that innermirror variable... oh, it was for the trees on Crystal, I couldn't figure out how they were symmetrical, so I kinda guessed, probably should take another look at that now that you've explained the level format pretty thoroughly.

QUOTE (Ollie @ Jan 28 2011, 12:02 AM)
I'd love to see the playability side of things implemented recreating the full PC Version remade. How possible would that be though Andrew75? Assuming that your project isn't in the same programming language so you'd have to start pretty much from scratch right?

Yeah, probably pretty difficult, seems like the best way of doing things would be for me to work on the exporting function alittle more so he could just use the levels without having to deal with the DEF and PCX files. I mean, there'd still be a fair amount of work turning the outputted models into levels but still, would be cool.

Edit: Oh, and thank you for those clean up suggestions SANiK.
This post has been edited by Uhyve: 27 January 2011 - 07:40 PM

#55 User is offline Skeledroid 

Posted 27 January 2011 - 07:25 PM

  • Posts: 215
  • Joined: 17-November 06
  • Project:Platformer Engine
  • Wiki edits:1
personally, I think it's really neat using the original DEF/PCX files -- makes it feel more official. not really the best route with modern technologies though. :P

#56 User is offline Uhyve 

Posted 27 January 2011 - 07:38 PM

  • Master Procrastinator
  • Posts: 45
  • Joined: 08-November 10
  • Gender:Male
  • Location:Huddersfield, England
  • Project:SX Engine
Hehe, I'll admit, I partially went this route because I'm useless when it comes to arty kinda stuff, so I figured it's all already there, might aswell use it. But yeah, I kinda like using all of the original files, though it'd actually be a very easy edit to make the engine check for a HD PNG file before looking for the old PCX based textures, so I suppose at least HD texture packs are a possibility.

#57 User is offline Skeledroid 

Posted 27 January 2011 - 07:46 PM

  • Posts: 215
  • Joined: 17-November 06
  • Project:Platformer Engine
  • Wiki edits:1
QUOTE (Uhyve @ Jan 27 2011, 06:38 PM)
Hehe, I'll admit, I partially went this route because I'm useless when it comes to arty kinda stuff, so I figured it's all already there, might aswell use it. But yeah, I kinda like using all of the original files, though it'd actually be a very easy edit to make the engine check for a HD PNG file before looking for the old PCX based textures, so I suppose at least HD texture packs are a possibility.

well, once you've got everything down as far as loading the PCX files or whatever... you could add the hq4x or scale4x algorithm. so if the user enables a scaling algorithm, it just applies to the PCX textures (as well as texture packs). by default, I imagine everyone would prefer the original look. I know I do. :O
This post has been edited by olaf: 27 January 2011 - 07:47 PM

#58 User is offline Uhyve 

Posted 29 January 2011 - 08:40 PM

  • Master Procrastinator
  • Posts: 45
  • Joined: 08-November 10
  • Gender:Male
  • Location:Huddersfield, England
  • Project:SX Engine
Hadn't thought of that, texture scaling could be interesting. But yeah, I'd probably end up preferring the original look aswell, so used the blocky textures now.

PS Dunno if people are interested at this point, but I've uploaded a compiled build:
http://code.google.com/p/sx-engine/downloads/list
This post has been edited by Uhyve: 29 January 2011 - 08:43 PM

#59 User is offline Mad Echidna 

Posted 30 January 2011 - 10:55 PM

  • Gone
  • Posts: 5217
  • Joined: 13-January 03
  • Gender:Male
  • Wiki edits:4
Brilliant, absolutely brilliant. You've done beautiful work. Finally seeing the game alive is so amazing! Finally a dream realized

#60 User is offline kazade 

Posted 31 January 2011 - 12:17 PM

  • Posts: 64
  • Joined: 16-March 10
  • Project:A 2D Physics Engine
If anyone wants to try this under Wine, you need to install the D3DX dlls using Winetricks. I got as far as attempting to load from the folder that I don't have. Where do I get the level files?

  • 7 Pages +
  • ◄ First
  • 2
  • 3
  • 4
  • 5
  • 6
  • Last ►
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users