Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm trying to build a website based game in which various pages of the site act as different areas of the game. I am wondering what you would recommended as a design structure. Which languages would be best if building what will hopefully becomes a massive system able to scale to massive amounts of users.

I am wondering if and how various elements from differing languages could be meshed to interact with each other. For example could I use html5, javascript, and PHP? What about asp.net how might that factor in? I'm a newbie programmer but I've been working on this idea for years and I want to build it to reality. Your comments and suggestions are appreciated.

P.S.: The game is not all graphics and animation (though flash like appearance and some animation would be nice). What I am thinking of is essentially a heavily gamified system of forms. And LOTS of data in many different categories cross referencing each-other. I'm not sure how to go about structuring the collection of data. Also while I know javascript can be used to process some functions, I'm wondering what sort of base system I would need to handle the server side processing of what I am expecting to be some pretty significant algorithm processing. That is to say I expect to have many many many functions and I'm not sure how to mange this using javascript. I feel like they would be forgotten, mixed up, disorganizes as they essentially only exist where they are coded. I guess I need to learn something of libraries?

OK, Thank you! Is enough from me for now.

share|improve this question

closed as not a real question by Sean Middleditch, Josh Petrie, Maik Semder, Trevor Powell, Tetrad Jan 5 '13 at 23:58

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
GDSE is not about questions regarding "How to make (or start making) a particular type of game" gamedev.stackexchange.com/faq Wish you luck though! –  Markus von Broady Oct 14 '12 at 14:45

3 Answers 3

could I use html5, javascript, and PHP?

Yes you can and you definitely will need to do so. While html will mostly define the look and feel of your page you will need php (which run server side BEFORE the page loads http://en.wikipedia.org/wiki/Server-side_scripting) to get your forms filled up and use javascript to modify the page on run time. Maybe you want to dive down in ASP.net, which allows you to script your logic in an .net language and has proven itself to me as much more powerful (personal opinion).

And LOTS of data in many different categories cross referencing each-other

For your data you may want to check out SQL. It stores data in a database and with its queries you can access, combine and alter the data really quick. http://www.mysql.com/ It has interfaces for nearly every other language so you can use it from php, javascript and asp.net.

I guess I need to learn something of libraries?

Libraries are definitely a good starting point. Maybe you want to look for an "all-in-one" solution, which will keep you a bit limited, but will keep you also away from all the deep programming logic.

Here are some quick results:

Stackoverflow question regarding php game engines

Very good list of JavaScript game engines

Regards floAr

share|improve this answer

Even if you aren't a seasoned developer, I feel I can suggest you to think about HTML5-NodeJS-NOSQL(mongodb or couchdb) triptych. I told you this because the era of centralized server side computing is slowly fading in favour of a different way to think in a scalable way.

Today a simple multiplayer game can be done in a single html page that does not refresh but its state is updated using async communications and DOM changes; libraries such as Socket.io would let you to push events into your clients when other clients perform some action in a Near-realtime fashion.

This is the architecture that I would use right now if I were asked to do such a thing:

Client

Modelling the game internals using Backbone.js: This library implements the famous Model View Controller pattern, so Models are objects that hold the status of your game parts and are able to send Events when they changes.

Using some library such as Crafty.js or similary to provide some higher level of abstraction over common task related to game development.

Server

Developing server that is a thin wrapper over a Document Based Database. It basically serves the static pages that contain the client-side logic; orchestrates the communication with clients (see later); compiles documents containing chunks of information related to state that is needed to be persistent and saves them into a Document Based Database.

Client/Server communications

The clients send async messages using Socket.io when they needs to notify the server about their internal state updates; they ask for resources asynchronously (images, animations, sound, interface chunks ect).

You can write controllers that observe the state of models(by registering callbacks on model events) and react by sending messages to the server when needed. Conversely models can register callback to socket.io incoming messages so that they will simply update its state accordingly to the content of the received message.

When the server receives Socket.io messages from a client and send it back to other clients in order to update their state if this is needed; when persistence is needed the information can be saved in JSON document to save into a couchdb database (for example). For example, if you want to save the state of the player, the server can simply update de player status json document on the databse and retrive it when the player logs back in.

If tomorrow you want to add some features to your player profile - i.e. add information to store within its database record - you do not need to alter tables as you did in relational database, but simply store new information in the updated document; old version of your software may simply ignore the new infos while other can take advatage from them.

Obviously the server has to validate the communications since the game logic resides into the client. In this architecture, the messages are the outcome of the game progession as computed into the clients, so the server need to check and certificate the validity of a message before send the conseguent messages to related client.

share|improve this answer

The first step is to flesh out the actual game idea. Only then shop around for technical how.

You have a story? Can you make a flow for it? Pay particular attention to the multi-player aspect; can players be in the same 'room' as other players, how will their actions be reflected in the views of other players, and so on?

Typically you end up with a whole load of 'player' objects in a server and having to use ajax/websockets to update players. When you're ready to start coding, look for the various 'chat' examples in server-side scripting languages.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.