Is this too much for an browser game?

Need help with an engine or coding not on the list? Need help with a game or the website and forums here? Direct all questions here.
Post Reply
User avatar
OldRod
Posts: 1320
Joined: Sun Sep 20, 2009 4:26 pm

Is this too much for an browser game?

Post by OldRod »

I am starting to wonder if I am pushing the limits of what a browsergame can handle, or maybe I'm not going about it the right way

Here's a (simplified) example of what I'm wanting to do: the player has a city/settlement that they are building and expanding. Later on in the game, they may have more than one such city. These cities attract settlers over time. The player sets up tasks that they want accomplished, like building a new house on a given spot, or gathering wood from an area, or clearing a plot of land, etc. Any of the settlers can do the job, but some are better than others and some have other priorities of their own that they may want to pursue instead. For instance, one may like to do fishing as a hobby when he's not assigned to another task. So when he's idle, he may be working on building a fishing pole, or searching for a good place to fish, for example. But if a task comes up that he can do while looking for a good fishing spot - like gathering some herbs - then he will do it.

I'm trying to set up a state system so that at any given time a settler is in a certain state ("gathering", "building", etc.) and these states are stored in a table. If I start getting very many settlers, with very many different priorities, I'm wondering if HTML5/PHP/Javascript will be able to handle all of this very well especially if I add multiplayer eventually, which I'm hoping to do.

Am I starting to stretch what a browser game can handle? Or am I approaching it the wrong way as far as handling the entity states? Anyone got advice on this?
User avatar
hallsofvallhalla
Site Admin
Posts: 12023
Joined: Wed Apr 22, 2009 11:29 pm

Re: Is this too much for an browser game?

Post by hallsofvallhalla »

a browser game can definitely handle it as a little while back I built a javascript AI system that were basically colored dots on the screen. It ran on a Rasberry Pi and were basically "people" on a canvas that would make their own choices on building, hunting, fighting, ect.. it was very basic and low level but was very fun to watch. Had I not lost the code I would still be working on it. But yes it is very possible.
User avatar
OldRod
Posts: 1320
Joined: Sun Sep 20, 2009 4:26 pm

Re: Is this too much for an browser game?

Post by OldRod »

Ah, that's good to know. Thanks :)
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: Is this too much for an browser game?

Post by Jackolantern »

Browser JS engine technology has advanced rapidly in the last few years, and most sources say they are over 10x faster than they were in 2008. There really aren't too many kinds of 2D games you can't do in the browser today.
The indelible lord of tl;dr
Post Reply

Return to “Advanced Help and Support”