Jump to content
  • entries
    503
  • comments
    1888
  • views
    335293

Porting Static:IT - C++ to HTML5

Sign in to follow this  
EDI

972 views

'lo again all.

I mentioned in my previous entry that I've been porting our 2009 release, Static: Investigator Training
which is a C++/Direct3D/lua fmv horror adventure; to html5/js (canvas)
using the base code from 96Mill and Revel Immortal as a starting point.

The process has been going well, however there have been some sticky spots.

  • extracting the original data from binary files
  • atlasing approximately 300mb of png compressed graphics
  • mimicking synchronous co-routine functions lua provided in JS
  • differences between the original engine and the new engine
  • re-re-remembering that everything takes way longer than you think it will

I attacked what I thought would be the hardest problem first, which was extracting the original binary data.

There were two forms of binary file classes.bin and game.bin; where classes.bin represented the data classes or 
'templates' that described static, shared (by flyweight pattern) attributes for all three object types; game, rooms and actors.

...and where game.bin was in the exact form of a save-game, that represented a new-game initial state. That is representing the 
actual objects, their relationships (game has rooms, room has actors), starting attributes (position, animation, alpha, etc.)

I used NodeJS to parse both of these files and export json equivalents of each file for easy access of data; I also took this opportunity
to have computer assistance for renaming/transforming members to better match what the new engine would expect.

 

Next I began to import the existing resources, which involved preparing them for a lot of atlasing

Audio was simple, save for the shear amount of it; when starting a new HTML5 project; you always take size and amount of 
resources into consideration; it's like climbing Everest (not that I ever have) but everything you include needs to be downloaded by the user
who is expecting a snappy game on their probably outdated tablet ...so you're careful.

I didn't have any such luxury in the port, the final sound effect atlas came to 10 minutes; which should be fine.
...thankfully voice files are not atlased, as there is over 500 of them.

In addition to atlasing, all of this data must be trans-coded as well, from source formats such as .wav, to deployment formats of .ogg and .mp3
...why both? because depending on which device/browser/version you encounter some are only  capable of running one or the other ...and some 
which are capable of playing both, are better at playing one than another ...and some devices outright lie.  But this has gotten better over the years.
 

 

Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

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
  • Advertisement
  • Advertisement
  • Blog Entries

  • Similar Content

    • By MakeIndieGreatAgain
      Game developers will be able to become pioneers in the development of decentralized games for the gambling industry using DAO.Casino protocol.
      On September 17, 2018, DAO.Casino is opening Sandbox for developers, independent teams and game development studios that choose to harness the power of the rapidly developing DApp industry.
      Starting today everyone may submit their application for Sandbox on the official Sandbox page.
      The Sandbox project is designed by DAO.Casino developers. Participants of Sandbox will learn the basics of decentralized applications development on DAO.Casino protocol. Developers participating in Sandbox will learn to create, design and deploy decentralized games and applications on Ethereum blockchain.
      DAO.Casino is planning to reward most active developers for their constructive feedback on the improvement and optimization of the SDK and related documentation. The company will separately announce the details of the rewards program later this fall.
      “We are confident that the Sandbox project will play an important role in our collaboration with studios and independent game developers. We cannot wait to see our product helping developers unleash their creative and entrepreneurial talents and apply those to one of the most groundbreaking technologies of the XXI century. — states Ilya Tarutov, CEO, DAO.Casino. – I am sure that the products we’re developing will transform the online gambling into a fair and transparent industry for all of the involved parties: casino operators, developers, and affiliate marketers. “
      “We are launching the Sandbox with the goal of enabling as many developers as possible to learn to create decentralized games. We have achieved an important milestone by starting to accept applications from developers all around the world who share our idea to make online gambling fair and transparent. With our technology, developers can take the whole gambling industry to the next level” – says Alexandra Fetisova from DAO.Casino.
      DAO.Casino is disrupting the online gambling industry by developing the protocol based on Ethereum blockchain technology. The protocol ensures the automation of transactions and facilitates interactions between all the industry participants: casino operators, game developers, and affiliate marketers. DAO.Casino team is fully dedicated to developing the best products and making the gambling industry a better place.

      View full story
    • By MakeIndieGreatAgain
      Game developers will be able to become pioneers in the development of decentralized games for the gambling industry using DAO.Casino protocol.
      On September 17, 2018, DAO.Casino is opening Sandbox for developers, independent teams and game development studios that choose to harness the power of the rapidly developing DApp industry.
      Starting today everyone may submit their application for Sandbox on the official Sandbox page.
      The Sandbox project is designed by DAO.Casino developers. Participants of Sandbox will learn the basics of decentralized applications development on DAO.Casino protocol. Developers participating in Sandbox will learn to create, design and deploy decentralized games and applications on Ethereum blockchain.
      DAO.Casino is planning to reward most active developers for their constructive feedback on the improvement and optimization of the SDK and related documentation. The company will separately announce the details of the rewards program later this fall.
      “We are confident that the Sandbox project will play an important role in our collaboration with studios and independent game developers. We cannot wait to see our product helping developers unleash their creative and entrepreneurial talents and apply those to one of the most groundbreaking technologies of the XXI century. — states Ilya Tarutov, CEO, DAO.Casino. – I am sure that the products we’re developing will transform the online gambling into a fair and transparent industry for all of the involved parties: casino operators, developers, and affiliate marketers. “
      “We are launching the Sandbox with the goal of enabling as many developers as possible to learn to create decentralized games. We have achieved an important milestone by starting to accept applications from developers all around the world who share our idea to make online gambling fair and transparent. With our technology, developers can take the whole gambling industry to the next level” – says Alexandra Fetisova from DAO.Casino.
      DAO.Casino is disrupting the online gambling industry by developing the protocol based on Ethereum blockchain technology. The protocol ensures the automation of transactions and facilitates interactions between all the industry participants: casino operators, game developers, and affiliate marketers. DAO.Casino team is fully dedicated to developing the best products and making the gambling industry a better place.
    • By Gafami
      Dear community,
      I would like inform you that "War IOM" v2 have been re-work graphics and added more feature to serve user experience.
      Here is my banner screenshot: 

      You can access to the website and play it directly on your phone (Chrome mobile, Safari iPhone, iPad) or your Laptop
      Link to play: https://www.iomgame.com/wariom/
      ++++ Game description: 
      The rule to win the game is very simple: buy the soldiers, defeat the enemy army and then destroys the flag. Try to use fireball to wipe out the enemy. 
      The game had the shop to buy new soldier, upgrade soldier and choose the team out. 
      Game data be stored on both user's device and server so never lost data again.
       
      ++++ Here is the look and feel of War IOM icon on your Home-screen phone

       
      Rumor: You can get double gem receive if you beat the mini boss at level 3. Also win level 3 will give you a lot of Gem, use it to buy new solider and upgrade your army!
      My facebook page: https://www.facebook.com/Iomgame-245553622715070/
       
      /******** Change log update 08/26 ********/
      -- Add new game play for level 6.

      -- Improve camera.
      -- Improve game performance.
      /******** Change log update 08/31 ********/
      -- Improve sound load time. No painful for waiting sound loading any more!
      /******** Change log update 19/09 ********/
      -- Add level 7 with new game play.
      Regards,
      Gafami
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!