[Haskell-cafe] Re: Getting my feet wet - small browser game

Joachim Durchholz jo at durchholz.org
Tue Dec 19 07:02:33 EST 2006


Marc A. Ziegert schrieb:
>> Comments and suggestions welcome :-)
> hi Joachim.
> 
> i have some suggestions:
> 
> apache:
> use fastcgi instead of hacking an own http-server.
> <http://www.cs.chalmers.se/~bringert/darcs/haskell-fastcgi/doc/>
> <http://www.cs.chalmers.se/~bringert/darcs/cgi-compat/doc/>

Ah, that's excellent. The server in question will have FastCGI installed 
anyway (actually fcgid, so I'll see what the incompatibilities are).

> server: there are virtual linux servers out there, free to rent. some
> of them are even cheaper than the power-usage of one's old pc (at
> least compared to speed). if you intend to write a game for thousands
> of users, who play it 24/7, then it may be comfortable to rent one. 
> (friends of me rented one.)

I'm with a small webhosting company, so the server is there already :-)

Of course, if the game ever attracts thousands of players and CPU and 
RAM usage start to affect other web presences, it should move to its own 
dedicated server.

> software upgrades:
> use Read/Show classes instead of Foreign.Marshal,
> and combine them with version counting data-structures:
> 
> [code]
> data MyData = V1 String deriving (Show,Read)
> read_v1 :: MyData -> String
> ---------
> data MyData = V1 String
>             | V2 [String] deriving (Show,Read) 
> read_v1 :: MyData -> String
> read_v2 :: MyData -> [String]
> ---------
> data MyData = V1 String
>             | V2 [String]
>             | V3 [(String,Int)] deriving (Show,Read) 
> -- obsolete: read_v1 :: MyData -> String
> read_v2 :: MyData -> [String]
> read_v3 :: MyData -> [(String,Int)]
> [/code]

I'll try that out and let everybody know how well that worked. Thanks.

> i've thought about writing a browsergame in haskel, too;
> but atm, i have no time for (writing) games.

I've known that feeling for quite a while :-)

Regards,
Jo



More information about the Haskell-Cafe mailing list