Jump to content
  • Advertisement
Sign in to follow this  

Starting my new game JS HTML

This topic is 882 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello guys , i  become very interest in a game creation so i had watched alot of videos about them youtube and done few tutorials .

So i going to make a game by using a javascript ant html , cuz my goal are browser online games . i so alot of post here about c++ games do not know if i get into right forum but maybe there is some other programmers who doing it in  javascript and html . I do not have much experience in a game creation but i am really interested and try to learn as much as i can , i also lack of information about game developing cuz i just started to do so but i think i will get everything i need in future .i watched videos about game creation with an enchant.js so i probably go with that and canvas .

so today i made a bones of my game this is just a start but still wanna know what u guys think , maybe some advice or tips what i did wrong or how to do it better .

window.onload = usercheck();

function usercheck(){
    $.post('checkcharacter.php', function(data){ 

function gamePlay(data){
    var game = new Game(1364,650);
    game.fps = 30;
    game.onload = function(){
        if(data == 1){
            var gameScene = new Scene();
            game.meesage = new Label("Game play scene");
            gameScene = game.rootScene;
        } else {
            game.meesage = new Label("Game Register scene");

so as i said  i am focus on browser online game o i will use mysql database to store user information and this is game start page where i am just checking if a game user are registered or not if player already have registered he will go to game scene witch is = to rootscene

if hes not registered yet i set root scene to register for him , i havent set anything yet there just a label to check that everything is okay but thats how i am going to go , so would like to get some tips or advices

Share this post

Link to post
Share on other sites

It's a start.


Insofar as your language choice, c/c++ isn't a prerequisite for game development at all, so don't feel pressured to learn something you don't feel your ready to undertake. Javascript is an excellent choice for browser based games, and to my knowledge that most used one for interfacing with Browser Based 3D API's such as WebGL.


Also no matter what language you choose usually the same schematics are employed for a Games underlying structure. That is, the game loop. The game loop is a conditional loop that performs all of the games necessary functions until a condition is met that ends the application lifecycle.


Kinda like this:

While (GameState != APP_CLOSE) do

Marcus Hansen

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!