Author Topic: How do you start a game?  (Read 1832 times)

Offline Sinzygy

  • Level 28
  • **
  • Posts: 420
  • Reputation: +11/-0
    • View Profile
How do you start a game?
« on: May 10, 2007, 12:35:38 PM »
I'm wondering as to how you approach a new game.

For me it mostly follows the same routine:
I sit somewhere, I get an idea, I write it down (Yeah, I always carry a notebook with me. I call it the "Legonomicon" <- ? :D)
Then I usually think 2-3 days about it, flesh it out and stil only put my thought into the notebook.
When I think it might be worth a shot, I start on the actual game.
It's usually the player class that gets created as the first thing. I'm making stuff up/change it on the fly.
When I think this might work as a prototype I start the databases. Usually the player, some items and some other things that are needed.
Things I usually do in this time are: battle script and some controls (buying stuff, upgrading,etc)
When I got this working, I'm usually bored with the project, so I start with designing the basic website layout. I mostly use either a 2-row or a 2-column/3-column layout.
Either I start from scratch or salvage all the usable parts form earlier game. Most of the time it's the latter one. I'm lazy :D
Then when I have the website I usually start adding content. (usually having the meaning here: on rare occasions if I haven't started something new in the mean-time)

yeah, that's about it for me. As you might have noticed: I'm not much into design documents and rather just add stuff as it comes to my mind.

How do you go about it?

Offline Zeggy

  • Global Moderator
  • Level 35
  • *****
  • Posts: 1,187
  • Reputation: +13/-4
    • View Profile
Re: How do you start a game?
« Reply #1 on: May 10, 2007, 12:49:53 PM »
I open up a text document and type up all my ideas :) I try not to start working on anything before I got a good plan down on what I want in the game.
Then, unlike you, I start with the layout and design :P I just get a simple nice design first, then I start coding the admin panel. I do this first because I want to populate my database tables first, and usually that requires a few more operations than what phpmyadmin can do for me.
Then I get the classes going and start with login, registration, etc, and go on from there with my plan :)

I work on a local server, so when I finally upload anything it means a bit more debugging to make it work on the internet :P (broken links, different directory paths, etc)

I'm a perfectionist so I first get a page exactly the way I want it before I go onto developing the next part, so I tend to spend a lot of time on simple stuff like registration and login.

Offline Sinzygy

  • Level 28
  • **
  • Posts: 420
  • Reputation: +11/-0
    • View Profile
Re: How do you start a game?
« Reply #2 on: May 10, 2007, 12:56:38 PM »
...
then I start coding the admin panel. I do this first because I want to populate my database tables first, and usually that requires a few more operations than what phpmyadmin can do for me.

bah, I never used an admin panel before. I used to write all my items(or whatever i needed to insert into a table) into an excel file and then convert it into a sql query with a nice online tool which I cannot find anymore :'(


Then I get the classes going and start with login, registration, etc, and go on from there with my plan :)

Heh, I always use the same registration system. I just copy my last game folder with the whole folder structure and just work on this


I work on a local server, so when I finally upload anything it means a bit more debugging to make it work on the internet :P (broken links, different directory paths, etc)

I'm a perfectionist so I first get a page exactly the way I want it before I go onto developing the next part, so I tend to spend a lot of time on simple stuff like registration and login.

yeah, I work on my local server as well, before anything goes online. The stuff that I do put online is usually playable with only minor bugs to fix. And before anything goes to the open public I have a test period. Either brief or long, depends on how well the game is already balanced..

[?∂??]
how long does it take you before you say: "yeah, this game is playable"? For me it really depends on how motivated I am. I can make a game that's playable within a week without any major flaws, but this is usually stretched over a very long time-period. Either no time due to Real Life or just no motivation...
« Last Edit: May 10, 2007, 12:59:12 PM by Sinzygy »

Offline Zeggy

  • Global Moderator
  • Level 35
  • *****
  • Posts: 1,187
  • Reputation: +13/-4
    • View Profile
Re: How do you start a game?
« Reply #3 on: May 10, 2007, 01:50:13 PM »
Heh, I'm also lacking in motivation and free time :)

I call a game playable once a user can login and do something :P If it's an RPG, it's the battle page that's most important for me.

Offline Broda

  • Level 13
  • *
  • Posts: 97
  • Reputation: +2/-0
    • View Profile
    • Nightfall Games
Re: How do you start a game?
« Reply #4 on: May 10, 2007, 04:21:02 PM »
Since I'm working on my first game I don't really have a set way but this is how I started out:

One weekend on the road I decided I was going to make a PBBG. I've been playing quite a few of them lately and figured I'd give it a shot. I definitely wanted to start from scratch so I could actually learn PHP this time instead of just hacking stuff together. I sat down and decided what genre/setting the game would be and started brainstorming the different systems I would need.

Before I started coding, I worked on the DB structure. I went system by system and decided on which tables/fields would be needed and their interaction with each other. The DB is almost always the first thing I do as everything else builds from there.

I've been reading various game dev/design articles and trying to solve common problems before they pop up.

So far, I've got the registration/login working. I've got dynamic stat bubbles for hp, mana, energy, and xp working (this was pretty cool). I've got filler pages for most of the pages I'm going to need and I've almost got the messaging system done - hopefully I'll hit my milestone deadline for this one which is tomorrow evening.

Since I started, my idea of the game has changed a lot. As things change, I document my new ideas and if they replace something else I usually try and come up with a pros/cons list before I do it. My game started out with a single idea - Humans vs Vampires. I later decided to put a different spin on it and include the customary fantasy races - dwarves, elves, etc - and allow each the possibility of being turned into a vampire. I didn't want to let it turn into the regular old fantasy game so I've pushed the setting into the future - cyberpunk style. So how would I describe it now? Lord of the Rings meets Underworld meets Shadowrun :)

Offline Sinzygy

  • Level 28
  • **
  • Posts: 420
  • Reputation: +11/-0
    • View Profile
Re: How do you start a game?
« Reply #5 on: May 10, 2007, 04:55:51 PM »
I've got dynamic stat bubbles for hp, mana, energy, and xp working (this was pretty cool).

What's a 'dynamic stat bubbe'? Never heard this term before.

Your setting sounds really nice. lookign forward to trying it out ;)

Offline Broda

  • Level 13
  • *
  • Posts: 97
  • Reputation: +2/-0
    • View Profile
    • Nightfall Games
Re: How do you start a game?
« Reply #6 on: May 10, 2007, 08:20:22 PM »
What's a 'dynamic stat bubbe'? Never heard this term before.

I wrote a PHP script that dynamically creates an image based on the stat. The image source is button.php with a querystring instead of img.png or whatever. Here's what they look like:


Your setting sounds really nice. lookign forward to trying it out ;)

Thanks, I'll let you know as soon as I'm ready to test :)

Offline Sinzygy

  • Level 28
  • **
  • Posts: 420
  • Reputation: +11/-0
    • View Profile
Re: How do you start a game?
« Reply #7 on: May 11, 2007, 02:37:12 AM »
wow, that looks really nice.

I never tried my hand at image-creating via PHP. But I always wanted to but never cam around to reading up on it.

Would it be possible for me to take a peek into your button-file?

Offline Broda

  • Level 13
  • *
  • Posts: 97
  • Reputation: +2/-0
    • View Profile
    • Nightfall Games
Re: How do you start a game?
« Reply #8 on: May 11, 2007, 06:57:04 AM »
I created full color buttons in photoshop - 1 of each color plus a clear one. The code calculates the percent of the stat and crops the image to that amount and then crops the clear to remaining. I'm going to modify it later to combine the 2 images dynamically so it doesn't have to make 2 calls but it works nice right now.


This is all there is to it:

button.php
Code: [Select]
<?php

$src $_GET['src'];
$x $_GET['x'];
$y $_GET['y'];
$w $_GET['w'];
$h $_GET['h'];

if($src == "red") {
$image "../pics/red_btn.png";
} elseif($src == "green") {
$image "../pics/green_btn.png";
} elseif($src == "blue") {
$image "../pics/blue_btn.png";
} elseif($src == "yellow") {
$image "../pics/yellow_btn.png";
} elseif($src == "clear") {
$image "../pics/clear_btn.png";
} else {
$image "../pics/black_btn.png";
}

$srcImage=imagecreatefrompng($image);

$destImage=imagecreatetruecolor($w,$h);

imagealphablending($destImage,FALSE);

imagesavealpha($destImage,TRUE);

imagecopy($destImage,$srcImage,0,0,$x,$y,$w,$h);

//output image
header("Content-type: image/png");
imagepng($destImage);

imagedestroy($destImage);
imagedestroy($srcImage);

?>

I then made this function to make it easy:

Code: [Select]
function GetGelStat($strUserName, $strStatName, $strColorBtn, $pctLeft)
{

$strSrc1 = "../pics/" . $strColorBtn . "_btn.png";
$strSrc2 = "../pics/clear_btn.png";

if($pctLeft >= 100)
{
return "<img src='" . $strSrc1 . "' border=0>";

} elseif($pctLeft <= 0) {
return "<img src='" . $strSrc2 . "' border=0>";

}

$info = getimagesize($strSrc1);
$w = $info[0];
$w = $w * $pctLeft / 100;
$h = $info[1];

$pctLeft = 100 - $pctLeft;
$info = getimagesize($strSrc2);
$w2 = $info[0] * $pctLeft / 100;

$strImages = "<img src='button.php?x=0&y=0&w=" . $w . "&h=" . $h . "&src=" . $strColorBtn ."' border=0>";
$strImages .= "<img src='button.php?x=" . $w . "&y=0&w=" . $w2 . "&h=" . $h . "&src=clear' border=0>";

return $strImages;

}

Then when I'm generating the page:

Code: [Select]
$strTbl .= "<tr class='statrow'><td class='outset'><font class='statname'>XP</font></td><td class='outset'>";
$strTbl .= GetGelStat($UserName, "xp", "green", $pct);
$strTbl .= "</td></tr>\n";
« Last Edit: May 11, 2007, 07:00:02 AM by Broda »

Offline Zeggy

  • Global Moderator
  • Level 35
  • *****
  • Posts: 1,187
  • Reputation: +13/-4
    • View Profile
Re: How do you start a game?
« Reply #9 on: May 11, 2007, 11:49:06 AM »
Cool function broda :)
The buttons look nice :D

Offline Broda

  • Level 13
  • *
  • Posts: 97
  • Reputation: +2/-0
    • View Profile
    • Nightfall Games
Re: How do you start a game?
« Reply #10 on: May 11, 2007, 10:34:46 PM »
Thanks :)

Offline Sinzygy

  • Level 28
  • **
  • Posts: 420
  • Reputation: +11/-0
    • View Profile
Re: How do you start a game?
« Reply #11 on: May 14, 2007, 02:40:47 PM »
Despite the danger of taking this even further offtopic:

HA! managed to get my first attempts with image creation to work!
I feel really good now.

That's what I like about PHP: I can always learn something new B)

Back to topic:

I decided to really put some effort into my next project. And ever since I made that decision, I started 3 time over again :)
But I'm slowly getting to the point where I can actually start doing some stuff.

Offline beam

  • Level 15
  • *
  • Posts: 132
  • Reputation: +2/-0
  • Dance Commander
    • View Profile
Re: How do you start a game?
« Reply #12 on: May 15, 2007, 02:54:54 AM »
Haha wow, you guys are way more procedural than I am. I do it weird, I start out by making a layout, and then making a game to fit the theme of the layout. I easily have like 40 games completed to different degrees on my harddrive, and maybe only 2 or 3 that are playable. The rest are just skeletons.

Offline Sinzygy

  • Level 28
  • **
  • Posts: 420
  • Reputation: +11/-0
    • View Profile
Re: How do you start a game?
« Reply #13 on: May 15, 2007, 04:49:42 AM »
Haha wow, you guys are way more procedural than I am. I do it weird, I start out by making a layout, and then making a game to fit the theme of the layout. I easily have like 40 games completed to different degrees on my harddrive, and maybe only 2 or 3 that are playable. The rest are just skeletons.

Yeah, it usually looks the same on my HD too. But i recently backed up all old stuff and started over fresh. If you want to start a new game, I'd suggest you do the same so you won't be tempted to work on another game when you hit a difficult part in your main-game.

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal