Jump to content
  • Advertisement
  • entries
    503
  • comments
    1888
  • views
    335487

Porting Static:IT - C++ to HTML5

Sign in to follow this  
EDI

1002 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 therax1986
      Hi everyone. For the last few months I’ve been working on a simple HTML5 2D side scrolling action game called Theraxius. It's nothing new and revolutionary, it's more like an evolution of different technology (combination of HTML5, PHP, MySQL). The game also includes a level editor so you can create your own levels. The game and the level editor is written almost completely in JavaScript, no download is required. Just load and play. Here are a few screenshots and the link to the page.
      In the next weeks I’ll try to post some videos, try to add registration (for newsletter and later for public test).
      Release date: when it's done
      theraxius.com



    • By genieee
      Top HTML5 game developers

      The spry march of digital technology has ushered a radical transformation in the entertainment segment, the way it was perceived and consumed. The over dramatic daily soaps replaced by more relevant web series, the noisy news channels are muted for the tailored-to-taste news feed and child’s play time has shifted from the outdoor parks to the computer deck. With the heroic stunts and captivating sequences of the virtual world, browser games have taken the world by a thundering storm.

      There is no two say that today’s ground breaking source of entertainment for the millennials is the craze for HTML 5 games coupled with the captivating graphics, enchanting characters, and intriguing strategies that keeps the players glued to their screen. It’s not just the millennials infatuating over the flashy games and challenging strategies but even the adults can’t keep off these instantly addictive games.

      With such a diverse palette of consumers and their manifold tastes, it creates a huge vent in the gaming world pushing the boundaries to create custom made game strategies that could address the appetite of the cohorts of different realms. The consumer today demands flexibility and portability of their favourite games which paves the way for HTML5 games to create waves across the globe.

      Catering to this unflinching demand for more challenging, more interesting and more target oriented tailored gaming concepts we’ve witnessed quantum-shift levels of improvements in every aspect of the games from its audio/video quality to concepts over the past few years. Today, the web offers an ocean of gaming options right from educative, engaging, entertaining or challenging. From Barbie dressing to counter strike, crime scenes to investment puzzles there is a game for anything and everything.

      Customers urge for choices of platform where in they can plug into their current level from any device, be it their smart phone, laptop or desktop. As such, HTML5 is unanimously favoured by web developers and game developers as it provides cutting-edge features, of 2D and 3D graphics, audio APIs, offline asset storage, and combined support for the most popular web browsers. From online casinos to fun games, this mobility-friendly technology is just the perfect match for today’s game consumers.


      Benefits of Developing Games in Html5


      Cross Platform Accessibility:

      HTML 5 offers the flexibility and portability of the games in multiple devices without a tweak in the code. It stands true to its promise of coding once and deploy everywhere that means the same piece of code would run on any device (hardware) and operating system (software).

      Ease of Framework:

      HTML 5 is the most preferred gaming tool for the versatility, flexibility and compatibility it offers that allows the developers to tap into uncharted territories with the best tools at disposal.

      No plug-ins needed

      Dodge the nagging pop ins requesting to download the plug-ins with HTML5 gaming engine. There’s no need for extra plug-ins in HTML5 as that of Flash or Unity. A brief preload is all it takes to boot the game.

      It’s the future

      HTML5 is not going anywhere anytime soon. With more and more elements getting adopted more and more companies will start to develop in HTML5. It is indeed the future.

      Given these scintillating advantages of the budding platform more and more companies and game developers are making their way to learn and implement HTML5 in their books of code. Considering the market flooded with all the itsy-bitsy games, it becomes a daunting task to choose a high-quality brain stimulating concept of game that not just focus on engagement but actually delves deeper to hone the skills of strategic thinking, reflex reactions, decision making, confidence boosting and many such personality traits.

      Creating an engrossing game is no amateur thing mastered in a day by the naive programmers binging on the html5 gaming tutorials but it is a piece of art created by experts of different talents who come together to paint the canvas. In the list of top Browser Game Development Studios Genieee secures an admirable position for its commendable work in developing and deploying HTML5 browser games leading the way for its competitors unveiling new possibilities of the arena.

      Genieee is one of the Top Browser Game Development Studios worldwide that has been serving some of the best quality and concept-driven gaming strategies for more than 10 years. Whether you craze for the fast-paced racing games, heart-pounding first person shooters, or edge-of-your-seat tower defense games, Genieee has to offer quite a diverse collection of games that would keep you on the toes with the unforeseen twists and twirls along the way.

      Genieee’s strategic masterminds behind each game focus on tantalizing the cognitive functioning of your brain by throwing unfathomable challenges and hindrances that are not just fun to decode and conquer but also forces you to ace your thinking, speed and decision making tactics.

      Genieee is a powerhouse of artistic talents and out-of-the-box strategists who come together to design and code some of the best pieces of entertainment. The company’s R&D team rigorously analyses the market and experiments with the cutting-edge technology for tomorrow’s browser games, ensuring that the company continues to set trends in the future.

      Their diverse portfolio of games is painted with many categories like Puzzle & Strategy Games, Action & Arcade Games, Educational & Sports Games and much more that caters to a wide audience. Keeping up with the pace of the changing demands and choices of the consumers, Genieee keeps an eagle-eye on the latest updates on the technology and market and comes up with the latest trend setters in its realm.

      Being a Top Browser Game Development Studios Genieee strives to be a path-breaker and leader in delivering the best experience of the virtual reality. With their great flow of streamlined processes, exemplary management of each project, and an army of exceptional talents, Genieee offers the best resources to turn your idea into a concept and a concept into a virtual reality.

    • By jimon
      Hi There! I would like to present to you our newest game, Coal Burnout!
      Play the demo version in your browser here https://beardsvibe.com
       



      Beat your competition in Multiplayer PVP, throw coal in the rhythm game, upgrade trains, get first in the leaderboard, and all this while listening to awesome chiptune soundtrack written by skybox!
      The game features iconic trains from steam era:
      - Flying Scotsman
      - DHR 778
      - 4468 Mallard
      - GER Class Y14
      - BR Standard Class
      Available now in the AppStore and the Google Play.
      - https://itunes.apple.com/us/app/coal-burnout/id1200548201?mt=8
      - https://play.google.com/store/apps/details?id=com.beardsvibe.stoker
      - https://skyboxchip.bandcamp.com/
×

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!