A picture of things to come…

…maybe.
It’s still very early work in progress, despite being in development for 1.5 years. I easily get tangled up in technical engine stuff so there’s not much of an actual game yet, although there are other games you can play, such as mobile slots you can find online, which are really great to play and make money online.

The engine procedurally generates isometric tiles and renders them to textures. The actual engine is entirely in 2d, although for various effects, pseudo-3d information is calculated.

My vision for this is to become a single player RPG mixing elements from old-school JRPGs, WOW and Diablo, while trying not to focus too much on combat but story and exploration instead.

If the engine turns out to be flexible enough, I’d love to develop this into some sort of platform for further stories taking place in the same universe.

The engine so far is written entirely in c++, features a Lua interface for everything game-related and relies on SDL / OpenGL for rendering.

powered by

 

groups

A group is a simple rectangular area that has a title and contains several items.

New groups can be added by using the API function ‘addGroup(const QString& sGroupName)’ and populated by calling the group’s method ‘addItem()’ or ‘addItems()’.

If a group should be created that is to wrap exisiting items without destroying their layout, an overloaded API function ‘addGroup(const QString& sName, std::vector<CItem*>& vpItems)’ will create a new group and place it around the selected items, forming their bounding box.

If a group is moved, all its contained items will be moved accordingly.

Deletion of a group will result in the deletion of the items.

Ungrouping will delete the group but not its contents.

Continue reading

swap pointer safety

The swap pointer should be NULLed after being fetched by another thread. The getter function should get a mutex that protects the pointer while being NULLed. After the swap has occurred in the fetcher-thread, the pointer can be written back to the item. This guarantees that no other thread accesses the current swap pointer while one of the cache threads writes new image data.

LightBox: Performance-Test

Using an OpenGL-Viewport, a curious behaviour takes place:

rendering ~1000 items (partially overlapping) is slow if they are painted directly onto the scene background.

If however an item covers the area they’re all in and lies in the background, rendering is a *lot* faster.

 

A performance test function should help determining bottlenecks in display performance:

 

void performanceTest(ETestMode mode)
{
  // disable loading & rendering of textures
  // create a grid of 200x200 items, non-overlapping 
  // or overlapping, depending on the mode
  switch (mode)
  {
    case eNonOverlapping:
      break;
    case eOverlapping:
      break;
    default:
      break;
  }
}