Categories

Archives

DZgameEngine Project Update: Template Classes For Data Handling

Just pushed 9 new template classes for data management to the DZgameEngine repository on Github:

  • DZarray           mono-dimentional array
  • DZarray2D      bi-dimensional array
  • DZarray3D      tri-dimensional array
  • DZbitmap        bit map
  • DZlist               single linked list
  • DZdlist             double linked list
  • DZhash            hash table
  • DZqueue          queue
  • DZstack           stack

 

Games data handling

There is a number of data structure types that are useful within games: arrays, hash tables, vectors, linked lists, and so forth. And there are also a lot of publicly available implementations of such classes, first of all the Standard Template Library, for those who code in C++.

However, most of these libraries are designed with the concept in mind that they have to be useful to everybody and for whatever application. One result of this philosophy is that these classes end up being huge packages, bloated by the amount of features they have to add to make them general purpose. The other main result is that these libraries end up being slow in execution, at least from the perspective of a video game that needs to run in real time.

Based on the above considerations, I developed a set of template data classes aimed to be fast, rather than sophisticated, and simple. I plan to publish these template classes as part of my DZgameEngine, although they are independent from the rest of the engine and can be extracted and used with any other program or application.

My goal is to keep enhancing these classes to make them as fast as possible in terms of execution time. They will be published on the DZgameEngine repository in Github in the next few days. I will follow up with a description of each one template class in this blog, so to make it easier for everybody to use them. And since the classes will be open source, everybody will be free to make changes to them to improve their capabilities. I will be happy to work with anybody willing to help me achieve this goal.

More on this later.

DZgameEngine Project Update

Added the first class definition to the project on GitHub: DZlogger.

DZlogger is a class that provides to the application the capability of writing to a log file. There are several log levels that can be used. It is possible to have logs to trace the flow of the application, and others to print debug information. These two log types are especially useful during the development of an application based on DZgameEngine. Other logs provide warning information in case of runtime errors, and others provide more general information. The DZlogger class can potentially be extracted from the DZgameEngine package and used also in other applications.

I also added a copy of the tinyxml library, which will be used to read the application configuration information from an XML file. The tinyxml library is another project available on GitHub.

Feel free to take a look and send me your comments, especially on the DZlogger class, which still needs some improvement. The link on the right side will take you directly to the GitHub repository.