Special Stage Development

Discussion in 'Sonic 2 HD (Archive)' started by Canned Karma, Mar 22, 2010.

Thread Status:
Not open for further replies.
  1. Canned Karma

    Canned Karma

    S2HD Project Manager Member
    806
    0
    0
    Sonic 2 HD, various 3D work
    It'll be in the documentation with the game.
     
  2. Conan Kudo

    Conan Kudo

    「真実はいつも一つ!」工藤新一 Member
    477
    0
    16
    <!--quoteo(post=470987:date=Jun 22 2010, 06:14 PM:name=HeartAttack)--><div class='quotetop'>QUOTE (HeartAttack @ Jun 22 2010, 06:14 PM) <a href="index.php?act=findpost&pid=470987"><img src="public/style_images/retro/snapback.png"></a></div><div class='quotemain'><!--quotec-->Perhaps the installer (in the future) could include a link to the DX runtime update download on Microsoft's website? Or possibly even a redistributable version included in the installer? Perhaps I'm looking too far into the future, but I meant the installer for the full game itself once that comes around :p<!--QuoteEnd--></div><!--QuoteEEnd-->

    Or perhaps we won't NEED to download a full DX runtime to play the game, hmm? The Special Stage engine will probably be rewritten to use OGL and DX8 libraries for non-graphics stuff. That way you don't have to depend on the latest DirectX.
     
  3. <!--quoteo(post=470740:date=Jun 22 2010, 02:33 AM:name=Hamneggs)--><div class='quotetop'>QUOTE (Hamneggs @ Jun 22 2010, 02:33 AM) <a href="index.php?act=findpost&pid=470740"><img src="public/style_images/retro/snapback.png"></a></div><div class='quotemain'><!--quotec--><!--quoteo(post=470728:date=Jun 21 2010, 11:55 PM:name=lotharstar)--><div class='quotetop'>QUOTE (lotharstar @ Jun 21 2010, 11:55 PM) <a href="index.php?act=findpost&pid=470728"><img src="public/style_images/retro/snapback.png"></a></div><div class='quotemain'><!--quotec-->...stuff I said that was very similar to Hamneggs suggestion...<!--QuoteEnd--></div><!--QuoteEEnd-->
    Now, when I said it everyone, including yourself I believe, hated it.
    <!--QuoteEnd--></div><!--QuoteEEnd-->I see the light now! While technically different, we are more on the same page now - the problem with the idea is the "extra logic" bit. Additionally, we can't put it on the same quad (more likely a triangle fan would work better here) as the skybox/background diamond texture because having it render partially through a turn would look strange. In order for it to look right in 3D (which honestly I don't think it will anyway) it probably has to stop when it comes to a curve and start blending away as sonic moves to reveal the curve. Even then, it's a crazy idea that should be attempted only after the simplest ones are exhausted.
     
  4. Synergy

    Synergy

    Member
    90
    0
    0
    UK
    <!--quoteo(post=471043:date=Jun 23 2010, 03:46 AM:name=Conan Kudo)--><div class='quotetop'>QUOTE (Conan Kudo @ Jun 23 2010, 03:46 AM) <a href="index.php?act=findpost&pid=471043"><img src="public/style_images/retro/snapback.png"></a></div><div class='quotemain'><!--quotec-->Or perhaps we won't NEED to download a full DX runtime to play the game, hmm? The Special Stage engine will probably be rewritten to use OGL and DX8 libraries for non-graphics stuff. That way you don't have to depend on the latest DirectX.<!--QuoteEnd--></div><!--QuoteEEnd-->

    If this goes into S2HD then there will be an OpenGL pathway for graphics, but for the DirectX route you'll still need to make sure your runtimes are up-to-date, like you would normally do anyway for drivers on your system and so on.
     
  5. LOst

    LOst

    Tech Member
    4,889
    1
    16
    <!--quoteo(post=471212:date=Jun 23 2010, 08:16 PM:name=Synergy)--><div class='quotetop'>QUOTE (Synergy @ Jun 23 2010, 08:16 PM) <a href="index.php?act=findpost&pid=471212"><img src="public/style_images/retro/snapback.png"></a></div><div class='quotemain'><!--quotec--><!--quoteo(post=471043:date=Jun 23 2010, 03:46 AM:name=Conan Kudo)--><div class='quotetop'>QUOTE (Conan Kudo @ Jun 23 2010, 03:46 AM) <a href="index.php?act=findpost&pid=471043"><img src="public/style_images/retro/snapback.png"></a></div><div class='quotemain'><!--quotec-->Or perhaps we won't NEED to download a full DX runtime to play the game, hmm? The Special Stage engine will probably be rewritten to use OGL and DX8 libraries for non-graphics stuff. That way you don't have to depend on the latest DirectX.<!--QuoteEnd--></div><!--QuoteEEnd-->

    If this goes into S2HD then there will be an OpenGL pathway for graphics, but for the DirectX route you'll still need to make sure your runtimes are up-to-date, like you would normally do anyway for drivers on your system and so on.
    <!--QuoteEnd--></div><!--QuoteEEnd-->

    The problem with all the d3dx9 DLLs that keep getting updated with each new SDK, is that when you compile your game using the newer SDKs, you are linked to the newer d3dx9 DLLs by default. This is extremely difficult when you have multiple development machines (like I do), and move the code base around. And at one point one machine have another SDK setup.
    And the DLLs take many MB, so you don't really want them to be part of the whole game experience.

    S2HD's main engine dynamically links to D3D9.DLL (for the Direct3D 9 object) and D3DX9.DLL (for shader compiler), and this choice was made so that the engine will not need Direct3D pre-installed to run S2HD, as it then settles for OpenGL (if it finds those DLLs) or no render at all is done if no API can be detected (renderless is good for servers).
    When dynamically linking to D3DX9.DLL, D3DX9 will load the newest installed DLLs automatically. So there is no need to have the latest runtimes to play S2HD, and you are not forced to have Direct3D on your computer while playing S2HD.
    Also since Direct3D and DirectDraw are COM objects, they are so easy to dynamically link to, as the interfaces do all the work for you. For OpenGL, you need to keep track of every single API call address and cast to the right function (so that took a while).
     
  6. RamiroR

    RamiroR

    Member
    355
    0
    16
    Wow.. I recall having made some suggestion like one year ago :P

    So, has this been through the whole DirectX vs OpenGL thing?

    Laaate question, but is it going to be ported to linux?I know people must have asked this before.. but, this can't hurt anyone, can it?
     
  7. GerbilSoft

    GerbilSoft

    RickRotate'd. Administrator
    2,891
    24
    18
    USA
    rom-properties
    <!--quoteo(post=471287:date=Jun 23 2010, 02:33 PM:name=LOst)--><div class='quotetop'>QUOTE (LOst @ Jun 23 2010, 02:33 PM) <a href="index.php?act=findpost&pid=471287"><img src="public/style_images/retro/snapback.png"></a></div><div class='quotemain'><!--quotec-->Also since Direct3D and DirectDraw are COM objects, they are so easy to dynamically link to, as the interfaces do all the work for you. For OpenGL, you need to keep track of every single API call address and cast to the right function (so that took a while).<!--QuoteEnd--></div><!--QuoteEEnd-->
    Since you are a C++ programmer, I assume you've heard of "header" files. Header files contain definitions for functions found in system libraries. <GL/gl.h> contains the OpenGL function definitions.

    Have you considered using these headers?

    EDIT: I reread your statement. By "every single API call address", are you linking to the specific entry point in the DLL, I.e. a memory address?
     
  8. LOst

    LOst

    Tech Member
    4,889
    1
    16
    <!--quoteo(post=471915:date=Jun 25 2010, 09:22 AM:name=GerbilSoft)--><div class='quotetop'>QUOTE (GerbilSoft @ Jun 25 2010, 09:22 AM) <a href="index.php?act=findpost&pid=471915"><img src="public/style_images/retro/snapback.png"></a></div><div class='quotemain'><!--quotec--><!--quoteo(post=471287:date=Jun 23 2010, 02:33 PM:name=LOst)--><div class='quotetop'>QUOTE (LOst @ Jun 23 2010, 02:33 PM) <a href="index.php?act=findpost&pid=471287"><img src="public/style_images/retro/snapback.png"></a></div><div class='quotemain'><!--quotec-->Also since Direct3D and DirectDraw are COM objects, they are so easy to dynamically link to, as the interfaces do all the work for you. For OpenGL, you need to keep track of every single API call address and cast to the right function (so that took a while).<!--QuoteEnd--></div><!--QuoteEEnd-->
    Since you are a C++ programmer, I assume you've heard of "header" files. Header files contain definitions for functions found in system libraries. <GL/gl.h> contains the OpenGL function definitions.

    Have you considered using these headers?

    EDIT: I reread your statement. By "every single API call address", are you linking to the specific entry point in the DLL, I.e. a memory address?
    <!--QuoteEnd--></div><!--QuoteEEnd-->
    Yep, dynamically linking is what I do.

    And you are right about gl.h having the prototypes and typedefs. But only version 1.x (don't remember). After that you need glext.h, and there are so many different versions written by people out there, and most of them are hand written and some needs other GL libraries to check for extensions. So I did my own library so that it can be completely controlled by me and my ego (mostly my ego).
     
  9. Conan Kudo

    Conan Kudo

    「真実はいつも一つ!」工藤新一 Member
    477
    0
    16
    <!--quoteo(post=471985:date=Jun 25 2010, 07:00 AM:name=LOst)--><div class='quotetop'>QUOTE (LOst @ Jun 25 2010, 07:00 AM) <a href="index.php?act=findpost&pid=471985"><img src="public/style_images/retro/snapback.png"></a></div><div class='quotemain'><!--quotec--><!--quoteo(post=471915:date=Jun 25 2010, 09:22 AM:name=GerbilSoft)--><div class='quotetop'>QUOTE (GerbilSoft @ Jun 25 2010, 09:22 AM) <a href="index.php?act=findpost&pid=471915"><img src="public/style_images/retro/snapback.png"></a></div><div class='quotemain'><!--quotec--><!--quoteo(post=471287:date=Jun 23 2010, 02:33 PM:name=LOst)--><div class='quotetop'>QUOTE (LOst @ Jun 23 2010, 02:33 PM) <a href="index.php?act=findpost&pid=471287"><img src="public/style_images/retro/snapback.png"></a></div><div class='quotemain'><!--quotec-->Also since Direct3D and DirectDraw are COM objects, they are so easy to dynamically link to, as the interfaces do all the work for you. For OpenGL, you need to keep track of every single API call address and cast to the right function (so that took a while).<!--QuoteEnd--></div><!--QuoteEEnd-->
    Since you are a C++ programmer, I assume you've heard of "header" files. Header files contain definitions for functions found in system libraries. <GL/gl.h> contains the OpenGL function definitions.

    Have you considered using these headers?

    EDIT: I reread your statement. By "every single API call address", are you linking to the specific entry point in the DLL, I.e. a memory address?
    <!--QuoteEnd--></div><!--QuoteEEnd-->
    Yep, dynamically linking is what I do.

    And you are right about gl.h having the prototypes and typedefs. But only version 1.x (don't remember). After that you need glext.h, and there are so many different versions written by people out there, and most of them are hand written and some needs other GL libraries to check for extensions. So I did my own library so that it can be completely controlled by me and my ego (mostly my ego).
    <!--QuoteEnd--></div><!--QuoteEEnd-->

    Yes, the OpenGL import libraries and headers that come with Microsoft Visual Studio only go to OpenGL 1.1, including glext.h. If you want OpenGL 2.1 (which is definitely what you want), you have to use different IMPORT LIBRARIES as well as headers.

    The MinGW compiler toolchain includes an OpenGL import library for OpenGL 2.1, even though the headers included were brutally stripped of everything above OpenGL 1.2. You can add the OpenGL 2.1 headers back into MinGW by downloading the <a href="http://www.4shared.com/file/QE2kVpm3/MinGW-full-OpenGL-headers.html" target="_blank">full OpenGL headers</a>. These headers also include GLew, but GLee isn't included.

    P.S.: If you are interested, I'd be willing to port the codebase over so that it can be compiled on both MSVC and MinGW easily. I've got plenty of experience on buildsystem stuff, and I even have <a href="http://code.google.com/p/lugaru/" target="_blank">one public project</a> where the majority of the buildsystem maintenance is done by me.
     
  10. kazade

    kazade

    Member
    64
    0
    0
    A 2D Physics Engine
    <!--quoteo(post=471287:date=Jun 23 2010, 02:33 PM:name=LOst)--><div class='quotetop'>QUOTE (LOst @ Jun 23 2010, 02:33 PM) <a href="index.php?act=findpost&pid=471287"><img src="public/style_images/retro/snapback.png"></a></div><div class='quotemain'><!--quotec-->And you are right about gl.h having the prototypes and typedefs. But only version 1.x (don't remember). After that you need glext.h, and there are so many different versions written by people out there, and most of them are hand written and some needs other GL libraries to check for extensions. So I did my own library so that it can be completely controlled by me and my ego (mostly my ego).<!--QuoteEnd--></div><!--QuoteEEnd-->

    What you want is GLew[1] or GLee[2] which have both had this problem sorted out for years.

    [1] <a href="http://glew.sourceforge.net/" target="_blank">http://glew.sourceforge.net/</a>
    [2] <a href="http://elf-stone.com/glee.php" target="_blank">http://elf-stone.com/glee.php</a>

    P.S. LOst if you are interested I'd be happy to do code reviews of the source and give you feedback, I've got plenty of GL/game programming experience. I don't have much time to contribute code, but adding an extra pair of eyes to give the code a once over are a way I could help. Just an idea.
     
  11. Synergy

    Synergy

    Member
    90
    0
    0
    UK
    As quite a few people seemed quite fond of the idea in principle, I took a brief detour into seeing how transparency would look if it were to be applied. This also shows the previously-discussed opacity fade at the end to mask the draw distance, along with the suggestion of setting the default draw distance to the "far" setting from the prototype; new pieces at the end fade gradually into view, so no more unexpected popping into existance.

    <img src="http://www.alaunus.com/s2tube/tube_trans.png" border="0" class="linked-image" />

    Transparency test aside, it also still uses the distance scaling on the blobs as you can see, though I'll convert the blobs and decorations to just stay a constant size and fade in along with the tube as it looks more natural. However, I think the scaler should be kept (and set to an appropriate distance) for rings and mines because with the added draw distance, you can see them coming on a straight stretch from miles off. On a similar note about ease of seeing distant items or not, with transparency you can see even more such as roughly were items are around an oncoming bend, which may or may not be considered a good thing: just things to mull over.
     
  12. Gambit

    Gambit

    Sonic 2 HD Staff - Level Artist Member
    711
    0
    0
    Sonic 2 HD
    Damn, I dunno about the whole transparency stuff yet, but I think I kinda like seeing how the tube curves around in the background.
     
  13. HeartAttack

    HeartAttack

    is a smug hipster, brah! Member
    567
    0
    0
    Cali
    I'm really loving the way that looks, transparency and all.
     
  14. W.A.C.

    W.A.C.

    Member
    4,537
    1
    18
    Not sure if transparency is a good idea, but I like being able to see the tubes in the background.
     
  15. MaximusDM

    MaximusDM

    Sonic 2HD - Concept Artist Member
    I'm not sure how this would look with the actual background. And seeing it as a screen looks really cool. But seeing all these tubes in the background while in motion could leave things looking cluttered and frantic. So judging it now is a bit premature, because it really needs to be seen in motion to be judge.

    But at the same time whether it was game limitations or not, the special stage give an abrupt feel to curves and seeing what is ahead could completely change that for better or worse.
     
  16. zemulii

    zemulii

    Member
    312
    0
    0
    It looks beautiful to me. The long draw distance seems like a great way to bring it up to date visually at least. The transparency is nice when it's very subtle like that. So I really hope it doesn't end up affecting the challenge all that much...
     
  17. DigitalDuck

    DigitalDuck

    Arriving four years late. Member
    4,825
    34
    28
    Lincs, UK
    TurBoa, S1RL
    Being able to see the track ahead isn't a problem, especially if you can't see rings/mines - after all, the game negotiates the track for you. I think it's a much-needed update that should stay in the HD version.

    Also, the screenshot kinda reminds me of Rollcage:

    <img src="http://i47.tinypic.com/msfa4l.png" border="0" class="linked-image" />
     
  18. Love the transparency and fading, but I'm not big on the elongated draw distance. I'm trying to work out in my brain a good way to make those turn into uphill slopes appear as surprising as in the original (one of the things that made collecting the rings on them hard) without them popping into view. Draw distance doesn't even really fix this problem since you can still see an uphill section coming at a turn.

    Then again, it looks like I'm in the minority with the opinion on the "surprise" element. I'm just worried the special stages as they were designed in S2 will be a snooze fest if you can see all the obstacles that far ahead of time.
     
  19. Synergy

    Synergy

    Member
    90
    0
    0
    UK
    Quite a difference of opinion then. You can solve the "seeing the track in the distance" problem by narrowing the field-of-view and raising the height of the up/down pieces just a tad. For instance, below is the same point on the stage as the above, but with a 30 degree field-of-view as opposed to the original 40 (probably a bit too narrow, but it's just to illustrate a point).

    <img src="http://www.alaunus.com/s2tube/tube_narrow.png" border="0" class="linked-image" />

    This field-of-view more closely matches the original, but using a narrow field-of-view with real 3D doesn't feel particularly fast-moving because of how field-of-view affects perception of movement (in the prototype, pressing the "1" key to switch between narrow (35), normal (40) and wider angle (45) views shows how the same movement speed is affected, and this is exaggerated the more wide/narrow you go).
     
  20. steveswede

    steveswede

    Member
    5,032
    1
    16
    Ask my hand
    Fighting against the Unitary State of Europe
    <!--quoteo(post=474295:date=Jul 2 2010, 02:02 AM:name=Synergy)--><div class='quotetop'>QUOTE (Synergy @ Jul 2 2010, 02:02 AM) <a href="index.php?act=findpost&pid=474295"><img src="public/style_images/retro/snapback.png"></a></div><div class='quotemain'><!--quotec-->However, I think the scaler should be kept (and set to an appropriate distance) for rings and mines because with the added draw distance, you can see them coming on a straight stretch from miles off. On a similar note about ease of seeing distant items or not, with transparency you can see even more such as roughly were items are around an oncoming bend, which may or may not be considered a good thing: just things to mull over.<!--QuoteEnd--></div><!--QuoteEEnd-->

    I'm kinda in agreement with what you say and do take your word for it about the rings and bombs affecting gameplay difficultly. But I really want to pass judgement when I get to see it in action when playing it. The transparency might not become an issue when playing because people might be more focused on getting rings and not losing them by avoiding bombs. Not only that but when the final art is put in it might make things more busy and distract the player better from far coming objects. I'm not against scaling in the objects. I just don't want to see the visuals crippled before seeing if it does affect the final version.


    Also just had an idea. It would be neat to see shooting stars coming down the tube towards the screen for added flare.
     
Thread Status:
Not open for further replies.