Skip to main content
Topic: Browser game version (Read 9760 times) previous topic - next topic

Browser game version

I've been wondering about how would it be to make a browser game which would have some similarities with Simutrans (but, as browser games have to be, may be simpler), but I don't want to make a copy.
Although I mentioned only Simutrans, I'm open to other ideas too (for example Lincity, but original ideas are even better). If anyone is interested, please write to me at ernobius @ yahoo. com (don't write the spaces...)
or I've just created a forum at http://alterea.forumotion.net/ (that could be the game's name, but that's not a must either). feel free to post your ideas, concerns, anything you've got.

Re: Browser game version

Reply #1
Well, as I have no clue whatsoever... how would you do it? Simulations of worlds are quite resource hungry, so you would probably have to shy away from the original paradigm somewhat.

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

Re: Browser game version

Reply #2
This is actually something I've given some thought to recently. With the advances in Javascript engines which have been made recently and the addition of things like the new HTML 5 Canvas element it's starting to become a possibility to write these kind of sprite based games in the web browser. Javascript is actually a surprisingly capable language if you have a fast enough interpreter.

One idea I played with was creating a clone of Command and Conquer, or a transport sim game. Sadly the sheer magnitude of a project like this tends to put me off. It's definitely possible though and I'd be interested in discussing your ideas further with you.
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

Re: Browser game version

Reply #3
I am not sure that some structures like ordered heaps or binary trees and so on could be efficently implemented in Javascript without pointers. Even more, simutrans uses its own memory allocations for almost every structure. Think of it: A 256*256 map has already 65536 tiles and easily 200000 objects. I am not sure how well javascript handles that.

For that the OpenTTD approach with a fixed structure per tile (like 12 Byte which are interpreted differently for different types) and less OOP would be probably helpful to avoid too much action of the garbage collector.

Re: Browser game version

Reply #4
Flash is the hype lately for browser based games. Javascript is not suitable for bigger projects, but there are quite a lot Flash based games out there, so it seems to work.

Re: Browser game version

Reply #5
Of course it depends on actual implementation, but Flash has the same language inside... I've read it compiles it for target cpu though.

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

Re: Browser game version

Reply #6
Well, I know that it's not exactly the easiest thing to make a game, so I think it should be started as simple as possible (but still being a game), and it would be developed on the way. But I can't decide how an open source browser game could work... it seems to me as strange as open source antivirus software. But as there are open source antivirus softwares, a game shouldn't be impossible either.
So as a beginning, I wouldn't expect Simutrans being completely rewritten in Flash, for example, but something simpler.
And what do you think about PHP? I know a game, Pardus, which works even on my mobile's Opera, because uses PHP, and it's graphics aren't bad.
By the way, let's clear what type of online game are we talking about? Something "long-term", like Ogame, or Pardus, Travian, whatever, or something like those Flash games, that last a couple of minutes?
I'm glad you're interested :)

P.S.: Are there any open source online games? Or anything like that? I don't mean MMORPG, where you have to fight with pigs, of course  :) You know what I mean.

Re: Browser game version

Reply #7

I think it can work if there isn't so much communcation going on between client and server and/or the communcation is only needed infrequently. You won't get a shooter or so done this way I think, but overall PHP can and will work for some sorts of games.

Board games, card games, slow paced adventure/role playing and simulation games all should work.

I've been pondering the use of PHP for collaborative games a while, but I was too lazy to actually do more than dreaming  ;D

Re: Browser game version

Reply #8
It seems that many of us were thinking about creating a game :)

Re: Browser game version

Reply #9
It seems that many of us were thinking about creating a game :)

Sadly thinking about it isn't enough :)
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

Re: Browser game version

Reply #10
Absolutely true :) Thinking about something is not enough
Lately and for a week or two I simply haven't got time to think at other things, but I'll soon do something :)

Re: Browser game version

Reply #11
What kind of game do you have in mind?

Re: Browser game version

Reply #12
What kind of game do you have in mind?

Well, as the title suggests, I myself want to stick with the browser's limits. I love open source too, so my plan would be to start with something simple, but open source, and evolve in time. I think PHP would be good. And this game would last longer, like other browser games, like Ogame or Pardus. Of course, shorter versions and other extras could be created, but I know you can't start with everything, so I'll stay with the simple start.
This would be my idea in a couple of lines :)

Re: Browser game version

Reply #13
Why don't you make a game with a randomly generated 20x20 map,with 2 cities and some industry,with the same goal as simutrans?Maybe written in java?PHP?Html?
The Green Mage of Darkness living in the summer hell and in the country where it snows till May with -21 *C  ;D

Re: Browser game version

Reply #14
Sounds difficult to write in HTML. ;-)

Re: Browser game version

Reply #15
Not a bad idea either. Lately I didn't have too much time, but problems are going to be solved, so I will have time.

Re: Browser game version

Reply #16
Write it in java,please...My brother's got a new "Mini iPhone"(illegal duplicate,made in china,only accepts java programs).
I don't want to give him my new computer just because my parents **** me to hell because I'm playing computer games and am interested in programming...They call it "hacking"(maybe thats because I like Linux)... ;)
The Green Mage of Darkness living in the summer hell and in the country where it snows till May with -21 *C  ;D

Re: Browser game version

Reply #17

With HTML + javascript (mainly to communicate with the server) + canvas tag (only supported in latest browsers, but not in IE8) you could probably achieve nice things

Ofcourse some sort of server application (written in any language) should be running

Actually I was thinking/dreaming something like this a while ago

Re: Browser game version

Reply #18
OK, I've been only talking for a while, but slowly things will change :)
And an other question from you? What do you think, would Python be useful here too? I like it's clean, visible style.

Re: Browser game version

Reply #19
Python is a very nice language, you could use it for the server-side components. Look into the Twisted library, as well as web frameworks like Django.
Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.
Why not try playing Simutrans online? See the Game Servers board for details.

Re: Browser game version

Reply #20
OK, I've been only talking for a while, but slowly things will change :)
And an other question from you? What do you think, would Python be useful here too? I like it's clean, visible style.

Python isn't only a server-side language. With Python you could write server applications, but at client-side you had to use HTML or something else.

On client side you could only use:
- HTML - Only text and small graphic stuff, but the basic of everything!
- Javascript - Is for make HTML-Code more dynamical
- Java - Is for writting Applets, with it you could wirte small client side application
- Flash - Same as Java
- Silverlight - Same as Java

And for server-side componets:
- Perl - Very Old
- PHP - Widespread (but also very old)
- Python - Modern and very clean (not well known)


If you don't know what server-side and client-side means, forgot it to make a browser game.
Founder and Ex-Maintainer of pak192.comic. Provider of Simutrans Hosting rental service.

Re: Browser game version

Reply #21

Old should not be a problem. There are very powerful and well maintained libraries available for Perl. Lots, because Perl is old and there was much time to develop them  ;)

But Perl syntax can be obscure. This does not mean you will have a problem, it just means if you are not careful with your programming, it is easy to write code that is very hard to read later.

Re: Browser game version

Reply #22
IMHO, all depends on the load of the different parts of the system. I think it's clear that it needs a client-server approach, but exactly what kind? thin client? Multi-thread server? Will the server bear all the processing or will it be merely an intermediary that distributes the info between clients? You need to answer this questions before choosing the programming languages you're going to use.

Re: Browser game version

Reply #23

Almost all new PCs have dual cores or multi cores. So some degree of multithreading is almost a must have to make good use of such hardware.

Most languages allow this, though. I think the architecture questions can be solved independently from the language - tackling such a big project mostly means to use tools that one is good at working with, so it should be a language that one already has used in projects before and that one knows pretty well.

if someone has ideas for a peer-to-peer multiplayer architecture I'd be much interested :)