Browser game version May 07, 2009, 07:51:34 pm 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. Quote Selected
Re: Browser game version Reply #1 – May 07, 2009, 08:08:15 pm 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. Quote Selected
Re: Browser game version Reply #2 – May 07, 2009, 10:09:53 pm 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. Quote Selected
Re: Browser game version Reply #3 – May 08, 2009, 09:36:40 am 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. Quote Selected
Re: Browser game version Reply #4 – May 08, 2009, 01:28:42 pm 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. Quote Selected
Re: Browser game version Reply #5 – May 08, 2009, 02:39:45 pm Of course it depends on actual implementation, but Flash has the same language inside... I've read it compiles it for target cpu though. Quote Selected
Re: Browser game version Reply #6 – May 10, 2009, 12:54:11 pm 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. Quote Selected Last Edit: May 10, 2009, 12:58:35 pm by ernobius
Re: Browser game version Reply #7 – May 10, 2009, 07:01:23 pm Quote from: ernobius – on May 10, 2009, 12:54:11 pmAnd what do you think about PHP?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 Quote Selected
Re: Browser game version Reply #8 – May 12, 2009, 07:58:10 am It seems that many of us were thinking about creating a game Quote Selected Last Edit: May 12, 2009, 07:10:08 pm by ernobius
Re: Browser game version Reply #9 – May 18, 2009, 02:15:27 pm Quote from: ernobius – on May 12, 2009, 07:58:10 amIt seems that many of us were thinking about creating a game Sadly thinking about it isn't enough Quote Selected
Re: Browser game version Reply #10 – May 28, 2009, 02:12:25 pm Absolutely true Thinking about something is not enoughLately and for a week or two I simply haven't got time to think at other things, but I'll soon do something Quote Selected
Re: Browser game version Reply #11 – May 28, 2009, 02:17:14 pm What kind of game do you have in mind? Quote Selected
Re: Browser game version Reply #12 – May 29, 2009, 03:20:15 pm Quote from: Hajo – on May 28, 2009, 02:17:14 pmWhat 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 Quote Selected
Re: Browser game version Reply #13 – June 22, 2009, 02:34:54 am 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? Quote Selected
Re: Browser game version Reply #14 – June 22, 2009, 04:34:17 am Sounds difficult to write in HTML. ;-) Quote Selected
Re: Browser game version Reply #15 – June 22, 2009, 05:54:45 am 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. Quote Selected
Re: Browser game version Reply #16 – July 06, 2009, 02:20:47 pm 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)... Quote Selected
Re: Browser game version Reply #17 – July 06, 2009, 04:21:08 pm Quote from: Isaac.Eiland-Hall – on June 22, 2009, 04:34:17 amSounds difficult to write in HTML. ;-)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 thingsOfcourse some sort of server application (written in any language) should be runningActually I was thinking/dreaming something like this a while ago Quote Selected
Re: Browser game version Reply #18 – July 30, 2009, 08:35:01 pm 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. Quote Selected
Re: Browser game version Reply #19 – July 30, 2009, 09:26:48 pm 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. Quote Selected
Re: Browser game version Reply #20 – July 31, 2009, 09:04:02 am Quote from: ernobius – on July 30, 2009, 08:35:01 pmOK, 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 JavaAnd 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. Quote Selected
Re: Browser game version Reply #21 – July 31, 2009, 09:09:48 am Quote from: Michael 'Cruzer' – on July 31, 2009, 09:04:02 am- Perl - Very OldOld 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. Quote Selected
Re: Browser game version Reply #22 – July 31, 2009, 09:31:32 am 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. Quote Selected
Re: Browser game version Reply #23 – August 04, 2009, 09:57:34 am Quote from: vilvoh – on July 31, 2009, 09:31:32 amMulti-thread server?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 Quote Selected