Programming:Idea dump

From Post-Apocalyptic RPG wiki

Jump to: navigation, search

Idea dump.png This article is an idea dump!

Idea dumps are utilized by the different departments to keep their department starting pages clean. The idea dumps can be used to dump notes at the wiki and flesh out work in progress articles. Once the articles have been fleshed out in detail, make sure you properly categorize them and remove them from the idea dump article.

Welcome to the idea dump of the programming department!



The Adonthell project has a fairly sophisticated dialog system that is very similar to our own. We should take a look and see what kind of features they implement, and how they deal with dialogs in general.


When to use a singleton


Fixme.png Please help FIXME: At some point, this idea dump should be fleshed out into a full-fledged proposal.

Recently, there has been a lot of on-going discussion about how character statistics should be implemented. Below is a summary of the most recent and productive discussions. To get a better understanding of the ideas proposed and see things in full context, it is recommended that you both read the full logs, and check out each implementation.

Implementation prototypes

IRC discussion I

Summarized from this IRC log.

Technomage on complexity of his implementation
Ignore the metaclass nonsense - that's just for checking that subclasses met the interface requirements. Only way I could figure to check class attributes
I wanted to leverage Python inheritance, just to keep the system flexible. So each stat follows a general hierarchy.
Technomage on the necessity of objects that share state, and those that don't
Stats need to be instance factories (i.e. classes) to do that, and there needs to be shared state like min/max values (class attributes)
Well, minimum/maximum values for a particular stat are always the same for all instances. But a particular value for a particular character would differ from all the others
A python class just seemed to be the natural canidate, since it has both shared state and individual state as class and instance variables

IRC discussion II

Summarized from this IRC log.

Taldor on Statistic vs Statistic Level
-> 'Strength' is a statistic, and my 'strength level' is 80
strength = Statistic('Strength', ...) ; my_strenght = StatisticsLevel(80, strength)
Taldor on why Statistic Level isn't just an integer
because it may evolve in certain cases
or temporary effect may be present
StatisticsLevel.addExperience() -> to be precise

IRC discussion III

We hashed out actual code in a seperate #parpg-code channel, here's the logs: File:Parpg-code 2011-01-18.txt

And a link to the prototype code: pastebin#ydgMURbJ

Python Is Not Java

Personal tools