[Haskell-cafe] Re: Frag: a First Person Shooting game
Mun Hon Cheong
mhch295 at cse.unsw.EDU.AU
Tue Nov 22 21:37:27 EST 2005
Did you encounter any difficulties in your
development because of Haskell?
Well, Haskell is different compared with other languages
like C. I thought collision detection would be easier
if i could use some local or global variables, but i
managed to get around it.
Was lazy evaluation ever a problem?
I found some space leaks in the game, so i had to profile and
enforce strictness in some areas.
Why did you choose Yampa to program the game
entities? Did this give you a particular advantage?
Me and Sean Seefried thought it that would be interesting
to use FRP in the game. I thought the design of
the Space Invaders game in the paper "The Yampa Arcade"
would work for this game and it did.
We could use Yampa's parallel switchers to simulate game
entities simultaneously without much trouble. I felt
that Yampa offered good encapsulation. State information
could be kept inside the signal function used to define the game entity
and they were updated within that function. So with a
well designed interface we could add game entities without major
changes to the rest of the program.
Isn't your frame rate a bit low?
Yeah, it does run slower than Quake 3 which would run on
my Pentium II 350 and voodoo3 , currently i doubt my game could do
I'm sure there are optimisations that could be used to improve
the games performance.
On my machine with an Athlon 1900+ and a Geforce 4mx the game
runs at 60fps in "leveleg". If you find that the framerate
doesn't go above 60fps, its because its capped at 60.
I didn't find any missing features.
Perhaps a listing of functions that have changed significantly
from the original API could be made? ( I've forgotten which functions
that I had trouble looking for though, but it wasn't because their
gl prefixes were removed)
On Tue, 22 Nov 2005, Joel Reymont wrote:
> I hope this ushers the era of Haskell games! I, for one, was certainly
> looking for something like this.
> Did you encounter any difficulties in your development because of Haskell?
> Was lazy evaluation ever a problem?
> Why did you choose Yampa to program the game entities? Did this give you a
> particular advantage?
> Isn't your frame rate a bit low?
> Thanks, Joel
> On Nov 22, 2005, at 6:05 AM, Mun Hon Cheong wrote:
>> Frag is a 3D First Person Shooting game.
>> *Yampa, a domain-specific embedded language
>> for the programming of hybrid systems that
>> using the concepts of Functional Reactive
>> Programming (FRP) was used to program the
>> game entities.
More information about the Haskell-Cafe