Author Topic: Getting started  (Read 4829 times)

Offline bbgames

  • Level 16
  • *
  • Posts: 138
  • Reputation: +1/-0
    • View Profile
    • Building Browsergames
Re: Getting started
« Reply #25 on: November 27, 2009, 11:29:00 AM »
A lot of the time involved comes out in relation to the scope of your game - if you want to have a massive game with lots of options(think something neopets-sized), you'll be working on it for years.

If you want to build something small(like click me to get points), you can do it in 24 hours - so a big part of how long it will take to build your game is just defining how big you want your game to be.

Offline zolacat999

  • Level 8
  • *
  • Posts: 41
  • Reputation: +1/-0
    • View Profile
Re: Getting started
« Reply #26 on: November 27, 2009, 12:08:13 PM »
I was estimating it to be around 6 months to a year. It was going to be a medium to small sized game, I would rather it was small but quality than a large poor game. Although once it has been created and released I see no reason why It cannot continue to be expanded thus keeping players happy with new features and drawing in more new players. If all goes well it will never really be complete   

Offline ignace

  • Level 3
  • *
  • Posts: 8
  • Reputation: +1/-0
    • View Profile
Re: Getting started
« Reply #27 on: November 30, 2009, 09:41:04 AM »
If you want to create your own game it is going to take a little more then just setup your environment and learn a language. I have seen many open-source browser games with an incredible bad coding and am assuming that those closed-source aren't any much better altough there are exceptions ofcourse.

Therefor I want to encourage you to read these books while your learning PHP:

Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and Iterative Development 3rd Edition;
Extreme Programming for Web Projects (as an extension on the previous);
(Head First | Grady Booch) Object-Oriented Analysis & Design (for a more in-depth on the first book);

Afterwards I would suggest:
Patterns of Enterprise Application Architecture (by Martin Fowler)
Design Patterns (Gang of Four)

Just because you need to KNOW design patterns.

Reference manuals I recommend (to ease lookup):
PHP Pocket Reference
PHP Phrasebook

These books WILL make a difference both in the development of your game as in your further career and will make sure you will always be able to get to bed early instead of pulling all nighters!
« Last Edit: November 30, 2009, 09:43:09 AM by ignace »

Offline zolacat999

  • Level 8
  • *
  • Posts: 41
  • Reputation: +1/-0
    • View Profile
Re: Getting started
« Reply #28 on: November 30, 2009, 01:00:19 PM »
Well Im defiantly going with PHP now and I have posted a very brief game overview in the projects section, thanks everyone for the help and advise 

Offline zolacat999

  • Level 8
  • *
  • Posts: 41
  • Reputation: +1/-0
    • View Profile
Re: Getting started
« Reply #29 on: November 30, 2009, 01:02:44 PM »
With the first tutorial the database one, what are you using to create that in 

Offline Harkins

  • Level 28
  • **
  • Posts: 420
  • Reputation: +11/-2
  • Coder, blogger, entrepreneur.
    • View Profile
    • Push CX - Blog
Re: Getting started
« Reply #30 on: November 30, 2009, 01:52:05 PM »
I think the PHP books are good, but the rest of the theory is probably overkill.

And Design Patterns is 90% workarounds of missing language features and 10% singleton, which should never be used.

Visit #bbg on irc.freenode.net to talk browser games anytime.

Offline JGadrow

  • Level 35
  • **
  • Posts: 1,133
  • Reputation: +23/-2
    • View Profile
Re: Getting started
« Reply #31 on: November 30, 2009, 02:46:05 PM »
... and 10% singleton, which should never be used.
Unless, of course, you have a very good reason for it. An Application class, for instance, that registers an error handler (you may only define one error handler).

However, in most cases, I agree that Singletons are not-necessary and, indeed, shorten the possibility of code extensibility.
Idiocy - Never underestimate the power of stupid people in large groups.


Offline Harkins

  • Level 28
  • **
  • Posts: 420
  • Reputation: +11/-2
  • Coder, blogger, entrepreneur.
    • View Profile
    • Push CX - Blog
Re: Getting started
« Reply #32 on: November 30, 2009, 11:28:37 PM »
Wanting only one of a thing (error handler, database connection, logger, gui, etc.) is not a good reason to make a singleton. Job security, sure, singleton away. :)

Visit #bbg on irc.freenode.net to talk browser games anytime.

Offline JGadrow

  • Level 35
  • **
  • Posts: 1,133
  • Reputation: +23/-2
    • View Profile
Re: Getting started
« Reply #33 on: November 30, 2009, 11:45:46 PM »
It's not really a case of wanting one error handler than it is the inability of PHP to chain error handler functions. Probably because they set it up as a singleton in the parser I'm betting! lol

See what I mean about it hurting extensibility? Singletons, and every other design pattern, exist only because they solve specific problems. Basically, the only "real" reason to create a singleton is because the system will die a horrible, fiery death if you accidentally do something twice.

In this case, you would utilize Singletons so that yourself, other developers, or developers coding extensions onto your program have a quick way of going, "Oh! I can't do that! I got'cha."

However, this should always be looked into once the need changes. For instance, think of an application tracker application that runs multiple sub-applications. If the language (in this case, PHP) were able to support tying an error handler to a certain object instead of the entire system then you'd have a case for removing the singleton pattern from the Application class. Otherwise... the system dies a horrible death once you create a second application and it may be difficult to track the error down.

But, yes, I especially agree that Singletons must not be used in the case of database connections! Commonly you want to read from one database but write to another. Or, even read / write to a pool of databases. If you code it as a Singleton, this becomes impossible!
Idiocy - Never underestimate the power of stupid people in large groups.


Offline Marek

  • Level 17
  • *
  • Posts: 170
  • Reputation: +6/-0
  • XHTML, CSS, JS, PHP and MySQL are my pantheon.
    • View Profile
Re: Getting started
« Reply #34 on: December 01, 2009, 12:04:01 AM »
With respect to the book readings mentioned: as valuable as theory is, my advice would be to read some PHP tutorials, consult the PHP.net manual, and jump right into the programming.

All those books on design patterns and theory will only really stick once you are familiar with the kinds of problems they are meant to solve. For that, you need to learn by doing, not just reading.

I'm working on my current project in PHP (my dragon rpg), but when I was beginning the project, I considered choosing Python. I decided to stick with PHP because my host doesn't have mod_python. But that's pretty much the only reason. Python is elegant and simple. It has a great OO model and a fantastic standard library. It reads much more like English than PHP does, in my opinion. And has tons of documentation online, and there are powerful, mature web frameworks available such as Django. I would definitely recommend Python if anyone's curious about learning a new language (whether for web, or for general programming).

Offline zolacat999

  • Level 8
  • *
  • Posts: 41
  • Reputation: +1/-0
    • View Profile
Re: Getting started
« Reply #35 on: December 01, 2009, 12:29:22 PM »
Well I have now started to learn some basic PHP and so far so good, Still not sure how to do the first tutorial on this site   

Offline jannesiera

  • Level 35
  • **
  • Posts: 1,026
  • Reputation: +6/-1
    • View Profile
    • BBGameDesign
Re: Getting started
« Reply #36 on: December 01, 2009, 12:51:51 PM »
Well I have now started to learn some basic PHP and so far so good, Still not sure how to do the first tutorial on this site   

Just keep going, it will come :). Piece by piece you will start to understand what it means and you'll be moving on to the next tutorial before you know it ;).

Offline zolacat999

  • Level 8
  • *
  • Posts: 41
  • Reputation: +1/-0
    • View Profile
Re: Getting started
« Reply #37 on: December 01, 2009, 01:28:39 PM »
I just dont get in that first tutorial what that is being written in what application is being used

Offline ignace

  • Level 3
  • *
  • Posts: 8
  • Reputation: +1/-0
    • View Profile
Re: Getting started
« Reply #38 on: December 01, 2009, 02:20:48 PM »
I think the PHP books are good, but the rest of the theory is probably overkill.

And Design Patterns is 90% workarounds of missing language features and 10% singleton, which should never be used.

I didn't say you should read them all Applying UML and patterns would suffice but nevertheless its always good to extend your knowledge.

Design patterns are workarounds of missing language features? What's then the pattern to add interfaces and abstract classes to C++? Or the pattern that allows me to do: Integer $var; in PHP?

With respect to the book readings mentioned: as valuable as theory is, my advice would be to read some PHP tutorials, consult the PHP.net manual, and jump right into the programming.

Well I have to mention them once in a while most programmers start just like you say writing code become quite good at it most of their solutions hold until that high-risk project where they apply the same methodology all goes well, the client is impressed and starts pushing his previous-not-yet-achievable ideas/goals through and the application breaks because it wasn't modelled with tried-and-true solutions instead they used solutions that merely holded. They just didn't knew that until now.

Ok, this is a quite drastic example and it has a few holes nevertheless learning them and understanding them is vital to any project because they allow you to look in new ways at certain problems while an obvious solution may be at hand a less obvious solution may save you.
« Last Edit: December 01, 2009, 03:14:52 PM by ignace »

Offline ignace

  • Level 3
  • *
  • Posts: 8
  • Reputation: +1/-0
    • View Profile
Re: Getting started
« Reply #39 on: December 01, 2009, 02:38:56 PM »
were able to support tying an error handler to a certain object instead of the entire system

Why would you want to ty an error_handler to a certain object?

Offline JGadrow

  • Level 35
  • **
  • Posts: 1,133
  • Reputation: +23/-2
    • View Profile
Re: Getting started
« Reply #40 on: December 01, 2009, 03:22:23 PM »
If you could, then you would be able to store multiple applications that each handled their errors appropriately for that specific application.

For instance, you want one application to use the standard PHP error handler, you want another to utilize a custom error handler that simply transforms PHP errors into exceptions, and you want a third app to utilize one that transforms to excepts and logs the error into a log for later tracking.

After all that, you want to hold all of these applications open in an "always on" process. Right now that's just not possible.
Idiocy - Never underestimate the power of stupid people in large groups.


Offline ignace

  • Level 3
  • *
  • Posts: 8
  • Reputation: +1/-0
    • View Profile
Re: Getting started
« Reply #41 on: December 02, 2009, 04:58:08 AM »
Can you elaborate a little further? You mean every application runs on a different version of PHP and thus not all applications can benefit from Exception handling?

Offline JGadrow

  • Level 35
  • **
  • Posts: 1,133
  • Reputation: +23/-2
    • View Profile
Re: Getting started
« Reply #42 on: December 02, 2009, 07:51:13 AM »
I'm not certain much more is required for a plausible use-case scenario... But here goes.

Ok, you have a company and you sell software distributions and host them on a dedicated server. For some reason, you came up with a program that is "always on." Basically, you setup an infinite loop script that processes incoming connections and passes them to an application object. For the sake of the example, PHP has decided to allow multi-theaded scripts so that you can pass execution off to an object but still process incoming connections. But that's all that the threading changes.

Now, each application is for a different client. For the sake of argument, you develop the application at first and then the client is supposed to hire coders to take over the project but you will retain hosting. Let's say that one client requires VERY strict logging and error termination, one requires that the errors be transformed into exceptions for better ability to recover from failure, and the third just wants standard PHP handler (same as above example).

Well, that really sucks for you because you built this really cool script that is supposed to be able to handle MULTIPLE applications at once. Instead, you have to run three different versions of this forever script now: one with each error handler.
Idiocy - Never underestimate the power of stupid people in large groups.


Online Chris

  • Game Owner
  • Level 35
  • *
  • Posts: 2,133
  • Reputation: +26/-1
    • View Profile
Re: Getting started
« Reply #43 on: December 02, 2009, 11:28:07 AM »
Well, that really sucks for you because you built this really cool script that is supposed to be able to handle MULTIPLE applications at once. Instead, you have to run three different versions of this forever script now: one with each error handler.
That's what I love in making browser games. There are no clients to mess up with your code requirements! It simplifies sooo many things :D

Offline zolacat999

  • Level 8
  • *
  • Posts: 41
  • Reputation: +1/-0
    • View Profile
Re: Getting started
« Reply #44 on: December 08, 2009, 06:00:51 AM »
Anyone know any really good sites for learning PHP, I've made a start but could do with a good site for learning the basics, would be nice if it was simplified for the slow learning people  ;D

Offline Sagefire135

  • Level 14
  • *
  • Posts: 107
  • Reputation: +2/-0
    • View Profile
Re: Getting started
« Reply #45 on: December 08, 2009, 05:23:37 PM »
Anyone know any really good sites for learning PHP, I've made a start but could do with a good site for learning the basics, would be nice if it was simplified for the slow learning people  ;D

*EDIT* of course i leave out the one thin you asked for :P i started off using www.w3schools.com and occasionally looking at php.net for specifics

if you just want to learn basics there is no better way to learn than by actually doing it. just start off really simple (almost pointless to make in the first place simple) thats how i started and it helped me alot. Some things i did:
- quadratic formula solution (if you know it)
- code a page that chooses a random number between 1 and 100.
- make a page with a form box that displays whatever you typed in when you submit.
- expand on your number generator so it picks a random number between user inputs x and y.
- have a page print out random numbers until it matches a number you put in.
- choose 2 random number between 1 and 100 that arent the same.
- expand that like before.
- roll 2 dice and count how many times each number comes up

These wont help you with your game much, but you will learn plenty about if/then stuff, loops, variables, displaying, forms, ...

after i felt confidant in the easy stuff, i did the same thing with a DB attached. just simple stuff like display a name that was in the db, select the address of a name in the db, change a value in a db, create a new entry, ...

it all seems silly but it helps.

Offline zolacat999

  • Level 8
  • *
  • Posts: 41
  • Reputation: +1/-0
    • View Profile
Re: Getting started
« Reply #46 on: December 30, 2009, 06:26:08 PM »
I could do with some help setting up a local server on mac, has anyone any experience of this I discovered mamp this seems to be good but am having a few difficulties getting it going. 

Offline raestlyn

  • Level 29
  • **
  • Posts: 463
  • Reputation: +9/-5
    • View Profile
Re: Getting started
« Reply #47 on: December 31, 2009, 01:41:31 AM »
Use XAMPP for Mac. Its basicly MAMP but its easier to install and has some added features.


I can send you pics of my cocks if you want reference.


Offline zolacat999

  • Level 8
  • *
  • Posts: 41
  • Reputation: +1/-0
    • View Profile
Re: Getting started
« Reply #48 on: December 31, 2009, 11:10:12 AM »
I've got to admit that it was quite easy to set up. Thanks 

Offline zolacat999

  • Level 8
  • *
  • Posts: 41
  • Reputation: +1/-0
    • View Profile
Re: Getting started
« Reply #49 on: January 07, 2010, 12:32:13 PM »
well im on my way I know have a register page a login a basic shop and battle system set up. 

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal