Git Product home page Git Product logo

rmd's People

Contributors

bilwis avatar

Watchers

 avatar  avatar

rmd's Issues

Implement time and action systems

Preferably a flexible "generic action" approach, where specialized actions (such as "EatItem" or "OpenDoor" or even "Move") are all derived from a generic Action class, have their own (perhaps even dynamic) action cost and (see http://journal.stuffwithstuff.com/2014/07/15/a-turn-based-game-loop/) maybe even a smart system for suggesting "sensible alternative actions" on failure.
Time and speed, even though the game will block for player input are also essential, if somewhat trivial in the simple first iteration I have in mind.

Implement basic combat system

For now, let only the player target his attacks at bodyparts, let AI choose at random. Also, player can have "perfect vision" (see all Organs from any distance), but prepare to change that later. Also, work out basic item properties (weapon "impact" vs. organ resistance, perhaps). These will hopefully be much more detailed later (sharpness, mass, area, etc.; ref. Dwarf Fortress).

Implement basic AI

Actors should be assigned different implementations of an abstract AI class for certain behaviours (ex. RangedAi, CasterAi, MeleeAi etc.). For the first Alpha, a reasonably solid pathfinding and very basic attack logic should be implemented.

Implement saving/loading of game data

Preferrably by using boost::serialization into an XML file. This ensures good version control, easy extensibility and cross-platform compatibility as well as being human-readable (more than binary, at least...)

String copy in Part-subclass constructors may crop the null terminator

During construction of subclasses of Part (such as Organ and BodyPart), all char* parameters are copied with the following method:

char* buf = (char*)malloc(strlen(param));
buf = strcpy(param);
this->param = buf;
delete buf;

Since strlen() returns the length of a char array without the null terminator, it may be wise to use sizeof() instead or adding one(?) to the value. strcpy(), given enough memory, should copy the null terminator.

Possible memory leak with char[] in Part-derived classes

During construction of Part and its derived classes, strings are given as parameters. These are copied by allocating memory and copying the string into it. The dynamically allocated char arrays are referenced by a header-declared pointer variable, but (presumably) not automatically freed on destruction. In order to ensure memory integrity, all calls to malloc() in the constructor should be matched by calls to free() in the destructor.

Null-terminator crop during char[] parameter copy in Part construction.

During construction of Part (and its subclasses), string (or char*) parameters are copied to the internal variable using the following method:

char* buf = (char*)malloc(strlen(param));
this->param = strcpy(buf, param);
buf = NULL;

strlen() however returns the number of characters in a char[] without the null terminator. Therefore it allocated a byte less than needed and the terminator is cropped during strcpy(). It may be wise to use sizeof() instead or add one byte to the malloc() request.

Adding more than four toes creates an error during graph compiling

If the sum of the toes on both feet in the Body.XML is larger than eight, the program will crash during the subgraph creation phase of the BodyMap graph compiling. There does not appear to be a problem with parsing the XML itself and the internal representation of the body seems to be intact. There might be a problem with the ofstream handling or the recursive createSubgraphs function itself.

Implement simple stats

Health points, a speed stat tied into the action system (#7) and perhaps a simple "status" for every BodyPart (fine, injured, destroyed, severed; maybe).

Implement simple "buff/debuff" system

If possible, tied into the Actors Body state (ex. Leg severed = speed reduction, or Eyes destroyed = blind) and perhaps into simple magic items (scrolls, item stats etc.).

Implement map generation and saving

  1. Map generation
  2. Scrolling w/ player in center, (asynchronous) loading of chunks on edge passing
  3. No height information necessary (no 3D!)
  4. Saving seed + "delta" information (changed tiles) to file or db

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.