Strike Commander with Oculus Rift (Virtual Reality Headset) project.

Discussion in 'Off-topic Zone' started by fabiensanglard, Dec 9, 2013.

  1. delMar

    delMar Rear Admiral

    Messages:
    326
    Likes Received:
    57
    Trophy Points:
    22,935
    Gender:
    Male
    Location:
    Austria
    Awesome
     
  2. Shades2585

    Shades2585 none

    Messages:
    611
    Likes Received:
    22
    Trophy Points:
    26,785
    Ok, I have to ask, did you build a viewer that puts the layers together or did you just extract the layers and Photoshop them together? I've had fun doing the latter but if you have figured out how to do the former then I'm sure delMar will be vary grateful to find out how you did that.
     
    Last edited by a moderator: May 24, 2018
  3. fabiensanglard

    fabiensanglard Master Chief Petty Officer

    Messages:
    40
    Likes Received:
    11
    Trophy Points:
    1,285
    Gender:
    Male
    @Shades2585 I am not using photoshop. The program I wrote opens the TRE from Strike Commander and then makes sense of the IFF and PAK in order to extract the ressources (object list, distance from object, objects, textures, background). The objects are viewed exactly in the order they were in the original Strike Commander.

    Then it renders them on the screen:

    Note that I don't have the buttons functional yet.

    It is not reverse engineering of the code yet: Only the assets for now since I believe understanding the assets will make understand the assembly easier.

    The code can be found here: https://github.com/fabiensanglard/libRealSpace (of course you will have to use your own purchased copy of SC assets to use it).
     
    Last edited by a moderator: May 24, 2018
  4. Shades2585

    Shades2585 none

    Messages:
    611
    Likes Received:
    22
    Trophy Points:
    26,785
    Very COOL well done. Hopefully some of that will be helpful for delMar on his WC1 decoding, as well.
     
  5. wcnut

    wcnut Rear Admiral

    Messages:
    466
    Likes Received:
    44
    Trophy Points:
    24,135
    I think what I love most is that you got this all this all to work using OSX :)
     
  6. fabiensanglard

    fabiensanglard Master Chief Petty Officer

    Messages:
    40
    Likes Received:
    11
    Trophy Points:
    1,285
    Gender:
    Male
    Working on Unix is great but XCode crashes a lot unfortunately. I haven't taken the time to create a VS project and a Makefile for Windows and Linux but I will soon. The important thing is that I am not using anything that is not portable and use SDL so recompiling should take just a few minutes.
     
  7. fabiensanglard

    fabiensanglard Master Chief Petty Officer

    Messages:
    40
    Likes Received:
    11
    Trophy Points:
    1,285
    Gender:
    Male
    Spent an other day on trying to make sense of the 3D maps to no avail. I wonder if Chris Robert or Jason Templeman could remember the basic idea of how that worked.....
     
  8. fabiensanglard

    fabiensanglard Master Chief Petty Officer

    Messages:
    40
    Likes Received:
    11
    Trophy Points:
    1,285
    Gender:
    Male
    I tried to estimate the total effort to reverse engineer a game as massive as Strike Commander. Based on previous experience, a man working with IDA one hour each day and 4 hours/weekend can reverse engineer ASM to C/C++ at a rate of 10KB / month.

    So for all of Strike Commander that gives us an estimate of:

    Code:
    INSTALL.EXE       7,793 bytes : RETE  2 weeks
    MKTERR.EXE      203,744 bytes : RETE  1.5 years
    SC.EXE           20,000 bytes : RETE  1 month
    MKGAME.EXE      131,696 bytes : RETE  1 year
    OPTTEST.EXE     870,528 bytes : RETE  7 years
    STRIKE.EXE      746,304 bytes : RETE  6 years
    =============================================
    15 years, 7 months and 2 weeks.
    Hm.
     
  9. fabiensanglard

    fabiensanglard Master Chief Petty Officer

    Messages:
    40
    Likes Received:
    11
    Trophy Points:
    1,285
    Gender:
    Male
    OMG, I reverse engineered the maps !!!!!

    [​IMG]

    [​IMG]

    Only missing the colors and textures :) !

    And a slightly photoshopped version with motion blur and desaturation :

    [​IMG]
     

    Attached Files:

    Last edited by a moderator: May 24, 2018
    FekLeyrTarg and delMar like this.
  10. fabiensanglard

    fabiensanglard Master Chief Petty Officer

    Messages:
    40
    Likes Received:
    11
    Trophy Points:
    1,285
    Gender:
    Male
    The in-flight palette :

    [​IMG]

    I love how colors are arranged:

    Pick a color from [0-15] then get a gradient of it by adding gradient*256 (gradient is also within [0-15] ). So clever.
    Notice how the palette has a lot of space for green, blue and brown in order to perform nice gouraud shading....and unfortunatley the infamous HAZE/FOG !
     

    Attached Files:

    Last edited by a moderator: May 24, 2018
  11. fabiensanglard

    fabiensanglard Master Chief Petty Officer

    Messages:
    40
    Likes Received:
    11
    Trophy Points:
    1,285
    Gender:
    Male
    An other cool palette trick:

    In Strike Commander, if you pull too much and take too much G, your vision goes grey and then dark. That is why the IFF containing the color palette also features a Black and White palette:

    [​IMG]

    Rendering is done as usual but the palette is recalculated with interpolation between the color and bw palette.

    When the vision goes dark, the color palette values are interpolated with RGB(0,0,0) instead.
     

    Attached Files:

    Last edited by a moderator: May 24, 2018
  12. Shades2585

    Shades2585 none

    Messages:
    611
    Likes Received:
    22
    Trophy Points:
    26,785
    Nice progress.

    Keep up the good work.
     
  13. delMar

    delMar Rear Admiral

    Messages:
    326
    Likes Received:
    57
    Trophy Points:
    22,935
    Gender:
    Male
    Location:
    Austria
    It will always be a miracle to me, how one could be able to extract information like this from just zeroes and ones :)
    Amazing, looking forward to getting to know more about that
     
  14. fabiensanglard

    fabiensanglard Master Chief Petty Officer

    Messages:
    40
    Likes Received:
    11
    Trophy Points:
    1,285
    Gender:
    Male
    I made some good progress this evening. I am now able to parse the map terrain type and shade level:

    ARENA with its cool deep canyons that could be followed up to the mountains. I haven't managed to understand how to draw the city yet :/ ![​IMG]


    SANFRANCISCO
    [​IMG]

    ANDMAL1
    [​IMG]

    Even without gouraud shading they look pretty neat :) !!!

    I still have to figure out the textures. It seems there are two kind in a map:
    - Those used for transition between terrain type (beach for SEA -> GROUND or port for SEA->CITY).
    - Those that are used randomly anywhere on the map (this is how the city in ARENA is done).

    I have also managed to parse the .OBJ file which describe the objects for each block on a map !
     

    Attached Files:

    Last edited by a moderator: May 24, 2018
  15. fabiensanglard

    fabiensanglard Master Chief Petty Officer

    Messages:
    40
    Likes Received:
    11
    Trophy Points:
    1,285
    Gender:
    Male
    One more evening of work and i now have the texture for transitions, city, fields and everything:

    [​IMG]

    I have also fully reverse engineered the OBJECT. After I add them and also add gouraud shading for the map, I will have 100% jets and 100% map.

    I think I am on evening away from taking the Oculus Rift and being able to fly in Strike Commander environment....I wonder if I can find where the crop circles are :p !
     

    Attached Files:

    Last edited by a moderator: May 24, 2018
  16. fabiensanglard

    fabiensanglard Master Chief Petty Officer

    Messages:
    40
    Likes Received:
    11
    Trophy Points:
    1,285
    Gender:
    Male
    An other one with a quick gradient for the sky, before I get started on shading the ground with beautiful modern 888 colors:
    [​IMG]
     

    Attached Files:

    Last edited by a moderator: May 24, 2018
    FekLeyrTarg likes this.
  17. delMar

    delMar Rear Admiral

    Messages:
    326
    Likes Received:
    57
    Trophy Points:
    22,935
    Gender:
    Male
    Location:
    Austria
    this is really cool.
    do you think creating terrains would be easy for modders or is it quite complicated?
     
  18. fabiensanglard

    fabiensanglard Master Chief Petty Officer

    Messages:
    40
    Likes Received:
    11
    Trophy Points:
    1,285
    Gender:
    Male
    @delMar Creating new terrains would be very easy. There is nothing hard-coded in the EXE, everything comes from the terrain.PAK and the texture PAK (TXMS.PAK). The terrain could be created via any tool/editor and then transformed into SC format since we now understand it. We could totally import a map from Flight Simulator or Skyrim.

    I wonder who will do that though: Posting here it seems Strike Commander is a forgotten game contrary to the Wing Commander serie.
     
  19. Quarto

    Quarto Unknown Enemy

    Messages:
    11,918
    Likes Received:
    285
    Trophy Points:
    69,385
    Location:
    Poland
    Above all, I think Strike Commander is just difficult to enjoy. For me personally, Strike Commander is a game I really want to play again, especially because somehow I never got around to finishing it. I also want to give Wings of Glory a proper go, and I'd love to replay Pacific Strike. But I can't do these things, because these games seem to have very poorly stood the test of time. The terrain graphics are terribly dated, lacking in detail and difficult to make out (they do actually look a lot nicer in your screenshots than in the actual game engine), the steering is poor and unresponsive (my fault: I'm not a joystick gamer, and even if I were, I simply do not have a joystick here I could play with).
     
  20. delMar

    delMar Rear Admiral

    Messages:
    326
    Likes Received:
    57
    Trophy Points:
    22,935
    Gender:
    Male
    Location:
    Austria
    I just asked out of curiosity, because I know next to nothing about displaying or persisting 3D data.

    Maybe your research about terrain data could be relevant for those Wing Commander games with planet-side missions?
     

Share This Page