Welcome to Dream.In.Code
Getting Help is Easy!

Join 136,521 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,823 people online right now. Registration is fast and FREE... Join Now!




Persistent browser game development

 
Reply to this topicStart new topic

Persistent browser game development, Tips/suggestions/warnings/encouragements welcome!

unleash3d
9 Aug, 2008 - 08:50 PM
Post #1

New D.I.C Head
*

Joined: 9 Aug, 2008
Posts: 6

Hello,

No, this is not one of the umpteen 'I want to create a MMORPG game, so please do it for me' posts. Nor am I looking to gather a team for such a project; I plan to do it all myself. I hate to start off like this, but with a huge influx of these kind of posts on forums, I know not many of these are taken seriously.

Yes, I do plan to develop an online persistent browser game. I have been thinking about this for months (if not a year). Lack of time to spare had so far prevented me from even thinking about it. But now, I certainly will have a few hours to spare every day - which means around 15-20 hours every week. I plan to utilize them to the maximum.

I have already taken the first step towards the development - by creating a detailed game design. The gameplay, rough site layout, basic database design etc have already been pencilled down. I have also pretty much decided on the platform I shall be using. I have a background (just over 2 years) of developing web applications using ASP.NET and using SQL Server as the database, so I am obviously thinking of using these for the development (in spite of higher running costs). I am also thinking of using a little AJAX to enhance the user experience (not just for the sake of using AJAX).

I know the limits of my knowledge of web applications, limitations of my skills, capacity to put in a few hours everyday, and the fact that creating a browser game is not a matter of a few months of work. I still do want to go for it.

I have already written down a rough design document for the development. I am planning to go for it using iterations - the first few will revolve around basic functionalities, while the later will add extra features.

The reason I am posting this is - I need help with any information/suggestions anyone can provide before I step into this huge task.
There may be people here who have 'been there, done that' and could provide excellent suggestions/tips on how to do certain things.
There may also be a few here who 'tried, but failed/gave up'; these could help me stay away from making the same mistakes they did.
There would also certainly be many others like me who are attempting something very similar; they could help me with any material, books, links to some good information about all this.
And of course, there will be lots of those who have never even thought about such a thing, but still provide valuable knowledge and their own experience.

I most certainly need lots of information about things like security holes, performance issues etc; knowledge about which comes usually through years of experience. I do not have that experience, and is the only reason I am looking forward to others guiding me in areas like these.

In my opinion, knowing the potential problems, understanding limitations and realizing pitfalls beforehand will help me much more than experiencing those later and then coming here for help. I would appreciate saving time, energy and resources by doing things the right way right from the beginning.

So I shall be most grateful to everyone if you could reply with any information they could provide. Please do let me know what level of experience you do have with developing such an application. That would give me a better perspective of your opinions. Also, like I said before, any books or websites which could help me gain better understanding/knowledge of aspects of this development would be great too.

I thank you all in anticipation!

FJ




User is offlineProfile CardPM
+Quote Post

Martyr2
RE: Persistent Browser Game Development
9 Aug, 2008 - 09:54 PM
Post #2

Programming Theoretician
Group Icon

Joined: 18 Apr, 2007
Posts: 5,213



Thanked: 217 times
Expert In: C/C++, Java, VB, VB.NET, C#, PHP, Web Development, HTML & CSS, Javascript

My Contributions
Well since you have the documentation down and have a road map ahead of you, I just recommend that you keep a steady pace, don't get bogged down in the details, and setup a timeline for yourself. Then start small and grow the project out. Follow good coding schemes and conventions, document as you go along and stick to the plan. You are in the part of development where you need to just put your nose to the grindstone and follow the plan, no sidetracks or "extra wouldn't it be cool" features.

Security features and such should be part of your plan. If it is not, you are not ready. Do a bit of research into things like SQL injection attacks, cross site scripting hacks, and good logging of activity. Also put together a small trusted group of testers (when you get to that point) that can test and won't exploit your system until all kinks are worked out.

Just follow the plan and stick to your schedule. That way when you are finally finished with the schedule, then you can save it all, test the hell out of it, release it to the public and fix the problems they find. Then work on those "extra features" you thought would be cool.

smile.gif
User is offlineProfile CardPM
+Quote Post

unleash3d
RE: Persistent Browser Game Development
10 Aug, 2008 - 06:24 PM
Post #3

New D.I.C Head
*

Joined: 9 Aug, 2008
Posts: 6

Thank you very much for your quick reply Martyr2!

Yes, setting up a timeline & following it best, is something I am keen on. It will help me keep track of my progress, remind me when I am falling back and motivate me as I tick off work items that I have completed.

Security is part of my plan. I surely want to pay as much attention to it as possible. But honestly, I am not quite experienced with the steps I need to take. Other than validating every input on the server side, writing all the business logic in classes, writing all my SQL in stored procedures, granting the least possible permissions to users; I am really not aware of other things I need to do.
I did google up on some of that, but still don't have a list of steps to follow to make my application mal-proof (I believe that may not really be possible or people wouldn't be able to hack into hotmail with 3 lines of code).

Working only on the core functionalities and saving the 'look-good' and 'nice-to-have' features for later is something I shall surely follow. Thank for that suggestion.

Thank you once again for your insight into this. I do hope more users provide their thoughts too.

-FJ

QUOTE(Martyr2 @ 9 Aug, 2008 - 10:54 PM) *

Well since you have the documentation down and have a road map ahead of you, I just recommend that you keep a steady pace, don't get bogged down in the details, and setup a timeline for yourself. Then start small and grow the project out. Follow good coding schemes and conventions, document as you go along and stick to the plan. You are in the part of development where you need to just put your nose to the grindstone and follow the plan, no sidetracks or "extra wouldn't it be cool" features.

Security features and such should be part of your plan. If it is not, you are not ready. Do a bit of research into things like SQL injection attacks, cross site scripting hacks, and good logging of activity. Also put together a small trusted group of testers (when you get to that point) that can test and won't exploit your system until all kinks are worked out.

Just follow the plan and stick to your schedule. That way when you are finally finished with the schedule, then you can save it all, test the hell out of it, release it to the public and fix the problems they find. Then work on those "extra features" you thought would be cool.

smile.gif


User is offlineProfile CardPM
+Quote Post

girasquid
RE: Persistent Browser Game Development
10 Aug, 2008 - 06:33 PM
Post #4

Barbarbar
Group Icon

Joined: 3 Oct, 2006
Posts: 1,266



Thanked: 14 times
Dream Kudos: 650
My Contributions
I'd like to second Martyr2's recommendations - seeing as you've already got a plan in place, you should definitely focus on just getting that done and not adding anything to it until everything that was in the plan initially has been completed.
User is offlineProfile CardPM
+Quote Post

unleash3d
RE: Persistent Browser Game Development
10 Aug, 2008 - 08:21 PM
Post #5

New D.I.C Head
*

Joined: 9 Aug, 2008
Posts: 6

Thank you girasquid!

The thing with working on the work list off my iteration schedule is - if later I happen to fall in trouble with issues such as security or performance, I shall have to back up a lot of work. That is why I still feel I should either read up on, or gain some better understanding of these things before starting the actual development.
And these are just somethings that came to mind. There could potentially be a few more things I am totally unaware of. That is the reason I would surely like more replies from members who have even distantly worked on or thought of working on such a project.

Thanks again!


QUOTE(girasquid @ 10 Aug, 2008 - 07:33 PM) *

I'd like to second Martyr2's recommendations - seeing as you've already got a plan in place, you should definitely focus on just getting that done and not adding anything to it until everything that was in the plan initially has been completed.


User is offlineProfile CardPM
+Quote Post

girasquid
RE: Persistent Browser Game Development
10 Aug, 2008 - 08:41 PM
Post #6

Barbarbar
Group Icon

Joined: 3 Oct, 2006
Posts: 1,266



Thanked: 14 times
Dream Kudos: 650
My Contributions
Typically when I build a game, I start with the registration/login system and sort of go from there. You need to keep security in mind at all times - validating your input, escaping your SQL queries, and so on.

You don't really need to worry about performance anywhere near as much as you think you do. Whatever language/database combination you're using(I assume PHP/MySQL as it's arguably the most common) has already been optimized to run efficiently. Unless your game suddenly spikes to 100k users overnight, you'll have time to work on making your game more performant as your usercount climbs.
User is offlineProfile CardPM
+Quote Post

unleash3d
RE: Persistent Browser Game Development
10 Aug, 2008 - 09:15 PM
Post #7

New D.I.C Head
*

Joined: 9 Aug, 2008
Posts: 6

Actually it's ASP.NET/SQL as I have mentioned in my first post. Not because I don't know it will cost me a lot more, but only because that's what I know.

I am going to work on the following, security wise :
a ) validate every single input control
b ) write all SQL only in stored procedures
c ) write all my code only in classes (most probably using a 3 tier architecture)

Other than these, I really need someone to throw ideas at me as to how to make it better secure.

Performance wise, yes, unless the game is a big hit *rolls eyes*, it won't count for much. But I still would like to work on these things before they become a problem.

With my first iteration, I shall be working on some base classes, table designs, master pages etc. And my 2nd iteration does work on the login, registration pages. Great (let me bask in some self-proclaimed glory) minds think alike? tongue.gif

Thanks again!

QUOTE(girasquid @ 10 Aug, 2008 - 09:41 PM) *

Typically when I build a game, I start with the registration/login system and sort of go from there. You need to keep security in mind at all times - validating your input, escaping your SQL queries, and so on.

You don't really need to worry about performance anywhere near as much as you think you do. Whatever language/database combination you're using(I assume PHP/MySQL as it's arguably the most common) has already been optimized to run efficiently. Unless your game suddenly spikes to 100k users overnight, you'll have time to work on making your game more performant as your usercount climbs.


This post has been edited by unleash3d: 10 Aug, 2008 - 09:16 PM
User is offlineProfile CardPM
+Quote Post

girasquid
RE: Persistent Browser Game Development
10 Aug, 2008 - 09:35 PM
Post #8

Barbarbar
Group Icon

Joined: 3 Oct, 2006
Posts: 1,266



Thanked: 14 times
Dream Kudos: 650
My Contributions
Based on my experience with ASP.Net, it sounds like you've got a decent plan.

When it comes to optimization, the advice I have essentially boils down to two things: don't worry about it until it's actually a problem, and don't do stupid things. What exactly defines a 'stupid thing' varies language to language, but quick ideas that spring to mind are while(1) loops, retrieving massive amounts of data you don't need, and not executing loops quickly enough.

Because you're using ASP.Net, one slight performance increaser that you may want to look into is publishing your project - when you publish it, everything gets compiled down to component .dll's and .ascx's. Because this negates the need for Just-In-Time(JIT) compilation, there is a speed increase - although you'd have to Google for actual benchmarks.

Based off of what you've mentioned for iterations, this is what I would recommend:

* initial table structure, database design, master pages/templates, etc.
* authentication
* game-specific pieces - things that make your game unique
* user-requested or additional features
* performance optimizations

User is offlineProfile CardPM
+Quote Post

unleash3d
RE: Persistent Browser Game Development
10 Aug, 2008 - 09:40 PM
Post #9

New D.I.C Head
*

Joined: 9 Aug, 2008
Posts: 6

Thanks again girasquid!

Nice tips I would say. But I am still wary of how easy it would be to change things later when they 'actually become a problem'. But you are right in a way. I guess I should get the basic game running first and see how much it becomes popular before worrying about later things.

My iteration schedule is a bit similar but with many more smaller iterations. I like having 'landmarks' more often, even though they might just be psychological. But yes, the layout would be kind of similar.

Okay, its almost midnight now, and I need to be up for work tomorrow, so shall check up on this tomorrow.

Thanks again!

QUOTE(girasquid @ 10 Aug, 2008 - 10:35 PM) *

Based on my experience with ASP.Net, it sounds like you've got a decent plan.

When it comes to optimization, the advice I have essentially boils down to two things: don't worry about it until it's actually a problem, and don't do stupid things. What exactly defines a 'stupid thing' varies language to language, but quick ideas that spring to mind are while(1) loops, retrieving massive amounts of data you don't need, and not executing loops quickly enough.

Because you're using ASP.Net, one slight performance increaser that you may want to look into is publishing your project - when you publish it, everything gets compiled down to component .dll's and .ascx's. Because this negates the need for Just-In-Time(JIT) compilation, there is a speed increase - although you'd have to Google for actual benchmarks.

Based off of what you've mentioned for iterations, this is what I would recommend:

* initial table structure, database design, master pages/templates, etc.
* authentication
* game-specific pieces - things that make your game unique
* user-requested or additional features
* performance optimizations


User is offlineProfile CardPM
+Quote Post

mocker
RE: Persistent Browser Game Development
11 Aug, 2008 - 10:58 AM
Post #10

D.I.C Regular
Group Icon

Joined: 14 Oct, 2007
Posts: 258



Thanked: 15 times
Dream Kudos: 25
My Contributions
QUOTE(girasquid @ 10 Aug, 2008 - 10:35 PM) *

When it comes to optimization, the advice I have essentially boils down to two things: don't worry about it until it's actually a problem, and don't do stupid things.


That's not entirely true. Some planning here should definitely be done up front, mainly your database table design. Make sure they are keyed properly and separated logically. As long as you have keys on them making further changes isn't so bad, but as soon as you get the database to a decent size, going back and THEN putting keys on them will be a huge pain. Also simple things like making any fields that store date information datetime or timestamp fields.

It sounds like you are more than prepared to start writing it. Any more and you will probably be overplanning, so start working on the first steps, and then re-evaluate your plan after that point. A lot of security issues revolve around your login and authorization system so you may want to revisit this after you have designed your first version of it.
User is offlineProfile CardPM
+Quote Post

girasquid
RE: Persistent Browser Game Development
11 Aug, 2008 - 11:09 AM
Post #11

Barbarbar
Group Icon

Joined: 3 Oct, 2006
Posts: 1,266



Thanked: 14 times
Dream Kudos: 650
My Contributions
I suppose that I should clarify slightly: doing things like moving ahead without a plan for your initial version, or without keys on your database, both also qualify as "stupid things".

I'm not saying move ahead at breakneck speed; I'm saying don't spend any more time thinking about it than you have to right now.
User is offlineProfile CardPM
+Quote Post

unleash3d
RE: Persistent Browser Game Development
11 Aug, 2008 - 06:31 PM
Post #12

New D.I.C Head
*

Joined: 9 Aug, 2008
Posts: 6

@mocker

Thanks for the suggestions. Yes, I won't forget keys on my tables smile.gif
I didn't understand the datetime/ timestamp thing. Could you kindly explain? (I tend to be slow after work biggrin.gif)

@girasquid

I guess both of you meant the same thing - do the basic planning right and jump into coding without spending too much time (and brains) on extreme detailed plans.

Thanks again both of you.


User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 09:34PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month