7 Replies - 4593 Views - Last Post: 05 September 2009 - 12:05 AM

#1 likpippo  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 15-July 09

What programming language for a browser-game?

Post icon  Posted 15 July 2009 - 03:39 PM

Hello everybody,
With some friends i'm planning to code a web-based multiplayer amatorial game. For those who played it, it's something like Travian but as complicated as Civilization .
I have a good programming knowledge with Java, assembler and C, a bit of PHP but never coded a web application.
The application has a complicated design, and for sure need threads, but is not computationally heavy. I also need a programming language that is highly stable and have as few runtime problems as possible.
That's why i'd go for a web application model (say, a core that manages everything and a GUI that may be written in a scripting language like PHP and connect to the core throught XML-RPC).
The problem is: what's the best language for coding the core? Somebody suggested me Python cause it's very powerful and clean. I've read something about Python, and everything sounds very good. Everything but this duck-typing. With duck-typing, you can't detect errors at compile-time: if you invoke a method that does not exist, you get an exception. This way, i guess that you may have a lot of run-time exceptions, while, e.g. with a Java interface you are forced at compile-time to implement the methods of an object. I'm a Python newbie, but that's what I've understood as far as I've read.
An alternative is Java, but Java is heavy, consumes a lot of memory, the code is not always clean and I'd like to learn something new.

What would you suggest? Have I misunderstood something about duck-typing in Pyhton? Do you think mine is a prejudice against Java? May you suggest any other programming language that suits my needs?

Uh, forgot to say: i definitely want to use an open source langage, so don't suggest me any .NET platform (I've tried that though, and i didn't find any advantage).

Thanks!

Is This A Good Question/Topic? 0
  • +

Replies To: What programming language for a browser-game?

#2 paperclipmuffin  Icon User is offline

  • Disassembling...
  • member icon

Reputation: 13
  • View blog
  • Posts: 944
  • Joined: 16-April 09

Re: What programming language for a browser-game?

Posted 16 July 2009 - 12:46 AM

Java. Or, if you are prepared to spend money, perhaps flash.

But yeah, java. :)
Was This Post Helpful? 0
  • +
  • -

#3 AnduA  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 19-July 09

Re: What programming language for a browser-game?

Posted 20 July 2009 - 03:32 PM

Java is ok if you have enough money for hosting, because it consumes a lot of resources. If you go for java, you can implement your view tier in something more compatible to java and easier to integrate, like JSF + a framework, or if you want animation & design, you can choose Adobe Flex for presentation tier, it integrates well with Spring framework.
Was This Post Helpful? 0
  • +
  • -

#4 kewlkreator  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 38
  • View blog
  • Posts: 1,065
  • Joined: 25-March 09

Re: What programming language for a browser-game?

Posted 20 July 2009 - 03:38 PM

If it's browser based, try silverlight (it's costs a lot tho)
Was This Post Helpful? 0
  • +
  • -

#5 chili5  Icon User is offline

  • D.I.C Lover

Reputation: 19
  • View blog
  • Posts: 1,144
  • Joined: 28-December 07

Re: What programming language for a browser-game?

Posted 20 July 2009 - 03:47 PM

Maybe flash?

But you can do quite a bit with a server side language and javascript.
Was This Post Helpful? 0
  • +
  • -

#6 C++Matrix  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 41
  • Joined: 01-September 09

Re: What programming language for a browser-game?

Posted 02 September 2009 - 09:39 AM

I'd say Java would be the easiest, but isn't Sherwood written in C++?
Was This Post Helpful? 0
  • +
  • -

#7 dsherohman  Icon User is offline

  • Perl Parson
  • member icon

Reputation: 226
  • View blog
  • Posts: 654
  • Joined: 29-March 09

Re: What programming language for a browser-game?

Posted 03 September 2009 - 04:32 AM

View Postlikpippo, on 15 Jul, 2009 - 10:39 PM, said:

The application has a complicated design, and for sure need threads, but is not computationally heavy. I also need a programming language that is highly stable and have as few runtime problems as possible.
That's why i'd go for a web application model (say, a core that manages everything and a GUI that may be written in a scripting language like PHP and connect to the core throught XML-RPC).
The problem is: what's the best language for coding the core?


If you really need to have a daemon (what you called the "core") that runs continuously to manage the game, regardless of whether any users are currently connected or not, and then a separate web layer (in PHP or whatever) which allows the users to interact with it, then I'd really just say to use whatever language you're most comfortable with to write the daemon. Pretty much any "real" language is capable of it.

I do question, though, whether that's really needed or not. A daemon-based design complicates things a bit and unnecessary complication is generally a bad thing. Unless you've got processes that need to be running continuously, 24/7, you're generally going to be better off with creating an event queue and using cron (or the Windows equivalent) to schedule something to run every minute (or however often) to service the queue and exit. If you write the queue servicing code properly, switching it back and forth between scheduled runs and daemonization, depending on your current needs and activity level, can also be an option.
Was This Post Helpful? 0
  • +
  • -

#8 ultimateweb  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 37
  • Joined: 24-May 09

Re: What programming language for a browser-game?

Posted 05 September 2009 - 12:05 AM

I vote for flash but you should get a freelancer to build one.
Try looking at frameworks.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1