• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1701
  • Last Modified:

Browser-based web game in C# or PHP?

Hello,

I'm a C# developer and I have an idea for a browser-based web game. I checked a few existing similar games and found that most if not all of them are made in php. I'm wondering if it's reasonable to write that kind of games in C# or .NET at all? What possible problems I should expect if I decide to use C#?

Thanks,
Yurich
0
Yurich
Asked:
Yurich
  • 6
  • 5
  • 3
  • +2
3 Solutions
 
aibusinesssolutionsCommented:
What interface are you doing to use to display the game?  Most browser based web games are done in either Flash or Java, mainly because Flash and Java are installed on just about every PC now.

If you are using C#, you will probably want to use Silverlight to create your game, it's new but it's starting to get out there.
0
 
YurichAuthor Commented:
Thanks,

I'm not even sure that I will need to use either Flash or Java. The interface will be just as of a web page with graphics elements, but without any plug-ins. At least not if they're completely necessary. It will be a strategy game, so no walking around the map will be needed.
0
 
aibusinesssolutionsCommented:
Ok, I just made a post on your other question.  If you will not have flashy graphics for it, I would just use javascript and web services to update things on the page.

Here is an example that comes with code to download on how to create a web service, and how to connect to it using javascript: http://www.codeguru.com/vb/vb_internet/webservices/article.php/c7781
0
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
YurichAuthor Commented:
thank you. it's fine, but it's not sort of an answer I was expecting. I looking for reasons why C# or .NET is not used for great many online games we have. In fact, I haven't played to many, but every time I come across a game, I'd see what kind of language is used and I haven't seen C# even once!!

I understand that C# is more for corporative applications, but on the other hand, why not? MS SQL usualy out-performs MySQL (at least in my experience). They only thing that I can think of is that PHP is originally dynamic programming language (like silverlight), but that can be easily fixed with Java or AJAX (and silverlight now, but I'm not familiar with it).

The point is: I don't want to start developing a game, spend hours of my time and then find that this kind of games are not made in C# for: reason #1, reason #2, reason #3 :-\

Cheers,
0
 
daveamourCommented:
There are no reasons why you shouldn't use C# for such a game.  It is a powerful OO based language and is used within a powerful and flexible framework.
0
 
aibusinesssolutionsCommented:
There is no right answer for this.  Since the game will not include a 3D graphical interface, you can make it in whichever platform you feel most comfortable with.
0
 
daveamourCommented:
There is a right answer - the core quesion is "is it reasonable to write this in C#/" and the answer to that is yes.
0
 
aibusinesssolutionsCommented:
No, the core question is "Should I make a browser-based web game in C# or PHP"?

Either will work, the one that Yurich is more comfortable working with will work best.
0
 
daveamourCommented:
>>>>>>
I'm a C# developer and I have an idea for a browser-based web game. I checked a few existing similar games and found that most if not all of them are made in php. I'm wondering if it's reasonable to write that kind of games in C# or .NET at all? What possible problems I should expect if I decide to use C#?

The asker observes that he hasn't seen many in C#  - they have often been in PHP - he therefore asks if it is reasonable to write that kind of game in C#  - it doesn't say C# or PHP
He doesn't ever ask if he should write them in PHP - he simply states that others he has seen are in PHP.
0
 
YurichAuthor Commented:
thanks guys,

does anyone have any sample of an online web-browser game written in C#?

and there is no much choice for me - I don't know PHP and don't think it will be wise of me to start learning it only in order to write a game.

cheers
0
 
PieterVbCommented:
Your options:

* 'Classic' webdevelopement: PHP+SQL+JavaScript
The clientside (JavaScript) does not require any plugins and is supported by most browsers.
You can also add Flash/SilverLight to add some shinier graphics, that of course requires the appropriate plugins.

* Java (with applets/servlets)
Applets need a plugin but are supported by most browsers. They also require a Java Virtual Machine.
 
* C# (with .NET webservices)
.NET webservices require .NET to be installed. However, it's only supported by Internet Explorer.
this might get you started:
http://www.codeproject.com/KB/webservices/myservice.aspx
0
 
YurichAuthor Commented:
i don't think it's correct about C# option what you put there on all points: you need to install .net components only a server, which is not a problem; you don't need to use webservices unless you have to; and .net applications are supported absolutely by any browser as they're rendered as HTML.

cheers
0
 
aibusinesssolutionsCommented:
Yeah your right Yurich, he may be talking about a C# activeX object, or an executable program, then the .NET framework would need to be installed.. but in a browser based game everything would be rendered by the browser.
0
 
PieterVbCommented:
Yes, I ment sending through your ActiveX object, same as you send your applet through by using Java.
0
 
YurichAuthor Commented:
well, nobody exactly answered my question... I know that C# is a powerful language and I'm going to give it a go, but I expected more feedback...
0
 
bangokerCommented:
I think .Net in general (C#,VB,etc) is a great and powerful OO and Web (ASP.net) language, which you could use for your game. I would imagine most games out there are PHP-prone because A)PHP/Flash was popular way before .Net/Silverlight started to get as notorious as they are now, and B) because PHP is free. You can set up a linux/apache server, with out paying any fee,  and there's plenty of free tools to work with. .Net on the other hand would require you to have a (not free) Windows Server to run the ASP code, and the "good/powerful" tools come mostly from MS, for a cost.

Yes, there are the express editions, but I believe they wont give you license to produce commercial products..

Just my 2 cents
0
 
YurichAuthor Commented:
Well, that's a part that confuses people. I'm going to host my game using some web-hosting company. As I need to run a windows service, I'll have to get a dedicated server, which will be more expensive, but other than that, it's not much different from having PHP (Apache) server. You just buy a "Microsoft/.NET" plan from a web-hosting company, which is usually 20-30% more expensive, but when you count like $5 vs $6 a month, it doesn't really matter. Than you request to make settings on the server for it to be compatible with .NET 1.0, 2.0, or 3.0 and that's it. No extra fees - I'm saying becuase I had a website before that was pure C#/.NET and I didn't have to do a lot more things then I'm doing for some of my PHP sites now. Setting a database is not much different for MS SQL than MySQL.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 6
  • 5
  • 3
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now