Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Note that this is not about graphics/physics/2D/3D/etc.! Rather I'd like to know whether there are dedicated solutions available for implementing custom rules/scoring on top of an existing framework, ideally addressing most common concepts already, for example players, matches, rule variations, game selection, preferences, high scores and the like?

Or is this functionality usually included in all those graphics oriented libraries/frameworks/engines? If so, are there any that stand out in this regard and do allow reusing the rules/scoring components easily without using the graphics part of the engine for example?

Alternatively, would you consider this topic to be better addressed by a standard Business rules engine instead, as suggested in Java Rule Engine for Game AI?

share|improve this question

closed as off-topic by Byte56 Nov 23 '13 at 15:48

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions that are about "which tech to use" are outside the scope of the site. For more information, see this meta post" – Byte56
If this question can be reworded to fit the rules in the help center, please edit the question.

add comment

4 Answers

I think you will have to write your own engine.

Have you ever looked at Zillions of Games? It's a commercial application that runs abstract games written in a script language called ZRF.

You can get some inspiration by looking at ZRF language specification. The best documentation I've found is here. Of course, you can take a look at the implementation of other games here and here.

share|improve this answer
    
This is an interesting starting point to explore the concept for a custom solution indeed, thanks for digging it up! –  Steffen Opel Sep 19 '10 at 17:50
add comment

I'd like to know whether there are dedicated solutions available for implementing custom rules

Yes, they're called programming languages. :)

Seriously though, to make truly custom logic, you typically need a system that allows arbitrary conditions and actions, which is pretty much what a programming language does. Or to look at it from the other direction, it would be hard to imagine a system that could encapsulate any large variety of game rules that didn't end up resembling a full programming language of some sort.

There isn't really any sort of standardisation in game rules or scoring mechanisms across games generally, so there's not much in the way of common functionality that you could meaningfully extract in this area.

share|improve this answer
    
Well, despite you and all other posters stating this pretty uniformly, I'm not fully convinced yet that there are no common grounds here and there (but might need to reconsider of course ;) - maybe this stems from me thinking more about 'older' and/or 'smaller' games like card and board games than full blown commercial 3D enabled titles or so; specifically, regarding your programming language analogy, I've been expecting more approaches via DSLs for example (like the one example pointed out by @jpbochi). Anyway, thanks for your insight! –  Steffen Opel Sep 22 '10 at 17:50
    
You can certainly find common ground across the more abstract games, as in jpbochi's answer. But for computer games in general, which are often more like simulations than puzzles, the systems are far more arbitrary and are often based on continuous measures of state rather than discrete ones. –  Kylotan Sep 23 '10 at 10:11
add comment

Networking solutions sometimes include sophisticated matchmaking rule systems. I can't think of anything else.

Games have a lot of common concepts, unfortunately not all of them can be supported very well using a plugin technology or middleware. Some game engines or game tools offer prefabricated systems for making menus and highscores, but there are no general purpose solutions to implement specific screens like Preferences, Level Selection and such. These are game-specific.

Even very well documented rule systems like AD&D do not have a standard implementation. There are just too many variations possible, and each game requires its own set of rules or needs to tweak them for gameplay purposes.

share|improve this answer
add comment

Depending on your language, I'd write my own. The typical game's rules are generally so straight-forward (make the number of people you've killed higher than the number of people they've killed, hold this item for longer than they hold it, etc) than the maintainance of a rules engine may outweigh just hardcoding the rules.

share|improve this answer
1  
What I think would be neat if there is a repository of examples showing how common data structures and algorithms can be used for game logic. One of the more complicated ones tend to be table-top RPGs and war-games, for example Warhammer 40K. Certain units have the abilities to change dice roll, or change the outcome depending on player's input. –  Extrakun Sep 19 '10 at 15:10
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.