Population[title WIP!]

Games in development by members. Discuss testing, design, ect.. Each game has its own section
Post Reply
User avatar
Ark
Posts: 427
Joined: Wed Jun 01, 2011 10:25 pm

Population[title WIP!]

Post by Ark »

Hi everyone, i've decided to make my entry with a pbbg! I've always found pbbg's to be special and really fun, and i've always had the desire to make one and that lead me to halls tutorials and this awesome commnity.

So enough of that.

A. Working name of Game

Population (may change in future).

B. Technology behind the game.

- Node.js: with other node packages such as socket.io, mongo-lite and momentJs

- ImpactJS html5 engine: I find it way easier drawing things on the canvas element, instead of using lots of divs and nesting imgs or text inside of them and impact is just simply amazing.

- MongoDB: As my database

- PHP: will use very little though, for now it's just for the login/authentification stuff.

C: Story

Coming soon!

D: Some features

- A full browser multiplayer game.
- Dyamic interface with no refreshing the page.
- RTS like game with lots of action.
- lots of resources from apples to gold which you can exchange with your allies and some are necessary for building powerful units!
- real time combat system which can be crucial on decisive battles. You could be fighting a huge battle against your enemies and calling you allies for reinforcement can change history.
- momentum: is a bonus value that will make your armies stronger, and you can only increase it by winning battles and crushing enemies, but you can lose it by losing a battle.
- Alliances: you can team up with 2, 10 or more allies to take over the lone and weak ones.
- fog of war. Working hard on this, but hopefully, will be implemented.

Some features may change and some may be added!

If any great feature or idea just came to your mind right now, go ahead and feel free to comment it. The game is made from scratch and there're lots of things that could be added.

Working on a playable alpha so stay tuned!
Orgullo Catracho
Torax
Posts: 169
Joined: Sun May 13, 2012 2:38 pm

Re: Population[title WIP!]

Post by Torax »

Sounds like a great layout. Good luck
User avatar
Ark
Posts: 427
Joined: Wed Jun 01, 2011 10:25 pm

Re: Population[title WIP!]

Post by Ark »

Thanks! i'll work hard on this game.
Orgullo Catracho
User avatar
janiksxxl
Posts: 16
Joined: Sun Feb 28, 2010 8:02 pm

Re: Population[title WIP!]

Post by janiksxxl »

Could be interesting. Wish You to succeed.
Image
User avatar
hallsofvallhalla
Site Admin
Posts: 12031
Joined: Wed Apr 22, 2009 11:29 pm

Re: Population[title WIP!]

Post by hallsofvallhalla »

Good luck!
User avatar
Ringmaster
Posts: 29
Joined: Tue Nov 13, 2012 10:28 pm

Re: Population[title WIP!]

Post by Ringmaster »

Nice to see Node JS and Mongo on your list.
Good Luck
User avatar
Callan S.
Posts: 2043
Joined: Sun Jan 24, 2010 5:43 am

Re: Population[title WIP!]

Post by Callan S. »

How's progress on the game going?
User avatar
Ark
Posts: 427
Joined: Wed Jun 01, 2011 10:25 pm

Re: Population[title WIP!]

Post by Ark »

Hi community, I haven't updated this post but the game is progressing. Thanks ringmaster those technologies are great ^^. Thanks callan for the reminder, here's the progress so far!

Devlog 1

So far so good, managed to get things from paper to the browser

Image

already got to manage to center your city to the camera and understand mongodb.

Mongo it's pretty easy. This is a pretty simple registration and authentification code.

Code: Select all

if($_POST['intro'] == 'register') {
            $user = mysql_real_escape_string($_POST['username']);
            $pass = mysql_real_escape_string($_POST['password']);
            $pass2 = mysql_real_escape_string($_POST['password2']);

            $m = new Mongo();
            $db = $m->population;
            $playerInfoColl = $db->playerinfo;

            if($playerInfoColl->findOne( array(
                    "name" => $user
                ))) {
                die('The name is already taken');
            }

            if($pass != $pass2) {
                die('passwords doesn\'t match');
            }

            $document = array(
                    "name" => $user,
                    "password" => $pass
                );
            $playerInfoColl->insert($document);

            $randPosX = mt_rand(0, 1200);
            $randPosY = mt_rand(0, 1200);
            $cityName = $user . '\'s city';
            require_once 'functions.php';
            $entityId = randId(8);
            $document = array(
                    'cityName' => $cityName,
                    'cityOwner' => $user,
                    'cityPos' => array(
                            'x' => $randPosX,
                            'y' => $randPosY
                        ),
                    'cityGold' => 500,
                    'entityId' => $entityId,
                    'capital' => true,
                    'entity' => 'EntityCity'
                );
            $citiesColl = $db->cities;
            $citiesColl->insert($document);

            echo '<script type=\'text/javascript\'> alert(\'register complete\') </script>';
            // go to game.php ?
        }
        else {
            $user = mysql_real_escape_string($_POST['username']);
            $pass = mysql_real_escape_string($_POST['password']);

            $m = new Mongo();
            $db = $m->population;
            $playerInfoColl = $db->playerinfo;

            if($playerInfoColl->findOne( array(
                    "name" => $user,
                    "password" => $pass
                ))) {
                session_start();
                $_SESSION['player'] = $user;
                echo 'login success';
                header("Refresh: 2; url='game.php'");
            }
            else {
                echo 'login failed';
            }
        }
    }
 
Mongodb simplicity makes it great, instead of tables they're collections. And you don't need to create a database beforehand, the database will only be created if you store data in it.

Also for the example above you need php_mongo extension installed on your php (A special thanks to Elvar for showing me mongo and helping me installing).

Would write more but i'm in a hurry, more progress will come!

Bye and thanks for reading.
Orgullo Catracho
User avatar
hallsofvallhalla
Site Admin
Posts: 12031
Joined: Wed Apr 22, 2009 11:29 pm

Re: Population[title WIP!]

Post by hallsofvallhalla »

great update.
User avatar
Jackolantern
Posts: 10893
Joined: Wed Jul 01, 2009 11:00 pm

Re: Population[title WIP!]

Post by Jackolantern »

Glad to see some nice updates, and I like that you posted some images of your work :)
The indelible lord of tl;dr
Post Reply

Return to “Members Games”