Re: game engine (as in rules not graphics)
- From: Aaron Brady <castironpi@xxxxxxxxx>
- Date: Sat, 27 Dec 2008 16:21:33 -0800 (PST)
On Dec 27, 3:02 pm, Martin <mar...@xxxxxxxxxxxx> wrote:
Hello,
I'd like to get in touch with game development a bit. I'm not talking
about graphics but rather the game rules itself. Something likehttp://en.wikipedia.org/wiki/Monopoly_(game)#Rules, is there even a
general approach to that or should I just go sketch up my rules and
try to implement them. Being totally new to this topic I don't quite
now what to search for to get some decent results that let me make a
mental link between game rules and what the best practices are to
implement them in python (or any other programming language)
thanks,
martin
Not my expertise but here are my $0.02. You are looking for ways to
represent rules: buying a house is legal in such and such situation,
and the formula for calculating its price is something. You want
"predicates" such as InJail, OwnedBy, Costs.
Costs( New York Ave, 200 )
InJail( player2 )
OwnedBy( St. Charles Ave, player4 )
LegalMove( rolldie )
LegalMove( sellhouse )
There are rule-based languages out there, such as Prolog. They are
equally expressive as Python (you can write a Turing machine in them),
but they are more convenient for representing rules in a prog.
language.
Predicates are more or less equivalent to positive assertions about
something.
NewYorkAve.cost= 200
player2.injail= True...
rolldie.islegal= True
Some predicates have to be calculated, rather than stored, but Python
descriptors go easy on you for that. Someone else will have to tell
you how rule-based programming measures up against object-oriented
programming. <passes mic.>
.
- Follow-Ups:
- RE: game engine (as in rules not graphics)
- From: Phil Runciman
- RE: game engine (as in rules not graphics)
- References:
- [OT] game engine (as in rules not graphics)
- From: Martin
- [OT] game engine (as in rules not graphics)
- Prev by Date: Re: C API: array of floats/ints from python to C and back
- Next by Date: Re: C API: array of floats/ints from python to C and back
- Previous by thread: [OT] game engine (as in rules not graphics)
- Next by thread: RE: game engine (as in rules not graphics)
- Index(es):
Relevant Pages
|