don't click here

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
    478
    1
    18
    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. 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
    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,891
    8
    18
    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,972
    85
    28
    USA
    rom-properties
    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,891
    8
    18
    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
    478
    1
    18
    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 full OpenGL headers. 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 one public project where the majority of the buildsystem maintenance is done by me.
     
  10. kazade

    kazade

    Member
    64
    0
    0
    A 2D Physics Engine
    What you want is GLew[1] or GLee[2] which have both had this problem sorted out for years.

    [1] http://glew.sourceforge.net/
    [2] http://elf-stone.com/glee.php

    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]

    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. Willie

    Willie

    Each day the world turns Laugh 'til it all burns Member
    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
    5,417
    492
    63
    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]
     
  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]

    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
    2
    16
    Ask my hand
    Fighting against the Unitary State of Europe
    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.