Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 16 Apr 2007
Offline Last Active Today, 01:37 AM

#5017466 Javascript / HTML5 best practices

Posted by sirpalee on 04 January 2013 - 10:53 AM

Hi guys!


Recently I had some free time, and decided to dive into javascript and html5 stuff. I'm looking for some book / series of articles that are talking about how to write efficient code, or what are the best practices, especially centered around html5 and game development.


I looked around the web, found a huge amount of resources, but it's really hard to decide where to begin. I have several years of experience with c++, so learning the syntax is simple, so I know how to organize my code or do anything I want. But I understand, that developing for browsers, or working with script languages like JS is different. I just don't want to follow some random tutorial that pops up in my google search and learn bad practices.


So, in short do you know any good javascript / html5 resources about game development?




#4814638 Hints for my new engine (v3)

Posted by sirpalee on 23 May 2011 - 10:25 AM

The level editor, the scripting and the asset pipeline is part of any game engine. (and maker3d is basically with your engine, without a native API and with some limitations - so the API design, the scripting is important for your users)

And don't write anything yourself, there are a lot of already great opensource / multiplatform tools, that are heavily tested and used in many application. For example you can use OpenImageIO for texture caching / loading in the system ram (you can specify the amount of memory it uses etc... and pretty fast too!), or instead of using your own "shader language", Open Shading Language is there for your raytracer (since I guess it's cpu only, or with some modifications even for the GPU).

Is there any game in development with Maker3D?

#4814561 Hints for my new engine (v3)

Posted by sirpalee on 23 May 2011 - 06:43 AM

Can you list even one game, what has been made with your engine, and available for download (free or not that doesn't matter)?

If not, just make a simple game (even a tetris would do), and you will realize what do game developers want from a game engine.

#4794739 Maker3D

Posted by sirpalee on 05 April 2011 - 02:05 PM

As smart people say, all good things come free. Like blender ;)

quotation from the maker3d site :

The software has NO PRICE.

#4761843 saving and loading a structure - serialization

Posted by sirpalee on 20 January 2011 - 08:12 AM

An easier way to do things, would be:

        template< class T >
    	void write( std::ofstream &  output, T const & instance )
         				reinterpret_cast<const char*>( &instance ),
     					sizeof( T )

 		template< class T >
    	void read( std::ifstream &  input, T & instance )
                    	reinterpret_cast<char*>(  &instance ),
                    	sizeof( T )

The input and output files are binary (you can't just open them and read them like you would for a text file). There are many advantages in using binary files: the book "How to Program in C++" by Deitel & Deitel has a very enlightening chapter on this topic.

It's not nice to give people bad code design ideas...