Skip to content

Hipreme Engine v1.1.0

Latest

Choose a tag to compare

@MrcSnm MrcSnm released this 28 Jul 20:12
· 135 commits to master since this release

AssetManager Refactor

  • Assets are now a separate module which can be imported by the user
  • Reduced a lot compilation time by removing reflection code for export function generation
  • AssetManager has now a better threading algorithm
  • AssetManager now supports user-defined assets registration by using the @Asset UDA
  • @Asset UDA now supports passing a single additional data to the constructor, and it must be unsafely cast by the loading task:
@Asset("gameMap.png", HipResourceUsage.Dynamic) //This allows the pixels to be updated later
HipTexture myTexture;

Hipengine API Refactor

  • Now most of the APIs are shared between the DLL and executable, meaning there is no need to generate complex compile time function generation
  • It works by using a service locator, which greatly reduces compilation time dependency and allows for greater flexibility when defining more complex interfaces
  • Now, instead of exporting functions, service locators are the ones exported through the DLL, and it gets a big maintainability at sharing the user API

What's Changed

  1. Web is rendering 60% faster
  2. Hipreme Engine is using 70% less memory
  3. Reduced Hipreme Engine frame time by 50%
  4. It now is able to show both the GC stats and CPU time on screen
  5. Started avoiding even more memory allocation
  6. Added stack allocated strings with an easy API:
SmallString s = SmallString("Hello World ",  500, " some other string");

Same API as refcounted string but much faster since there's no allocation.
7. Fixed text rendering align position
8. Added scaling to text rendering
9. Changed interface for text rendering
10. Reduced binary size for wasm from 6MB to 3MB (build with -Oz is 400KB)
11. Fixed wasm memory deallocation
12. Fixed PS Vita memory reallocation and it is now using a better allocator which reduced memory size overall
13. JSON is now being parsed at 200% faster
14. Build time reduced by 100ms (I'm getting wasm build in 200ms)
15. Fixed WebGL rendering issues on smartphones
16. Fixed RenderDoc crashes
17. Using redub v1.24.3 with a big speed up, a lot of bug fixes
18. Updated D Runtime to support up to LDC 1.40

Refactors

  1. Reduced like 1K LoC on a refactor for asset manager
  2. Simplified the Asset Manager API implementation by removing some of the locking in there and reduced the necessity of inter thread communication
  3. Reduced 12% of memory allocation calls in the engine with that refactor (I think its like 3% reduction of memory consumption), thus reducing memory fragmentation
  4. Removed redundant API for assets and some file types, so, it is easier for anyone to understand what is happening
  5. Fixed issues when loading tilemaps
  6. Fixed issue where PDBs weren't being unloaded
  7. Added an option for releasing the game without the need of using DLLs on desktop (LDC2 only)
  8. Fixed some positioning on GUI layout

News

  1. Added Hipreme Engine game server
  2. Added support for websockets and TCP protocols under the same API
  3. Made the data auto optimizable by using reflection and some tricks.
  4. Adding some pre established game server events
  5. You can easily add your own data type to be sent on network.
  6. There is now a default loading bar before the first scene load

Example usage for your client on hip engine network:

struct Action
{
    ubyte fromX, fromY, toX, toY;
}

struct BoardState
{
    Action[] actions;
}
struct AssignColor
{
    black,
    white
}

alias ChessNetController = NetController!(MarkNetData!(
    Action,
    AssignColor,
    BoardState
));

ChessNetController c = new ChessNetController(getNetworkInterface);
c.connect(NetIPAddress("127.0.0.1", 10_000));
c.on_connect(()
{
    c.sendData([BoardState()]);
});
c.on_disconnect(()
{
    logg("Waiting for other player to connect...");
});
c.registerHandler((Action a)
{
});
c.registerHandler((AssignColor c)
{
});

c.sendData(Action(1, 1, 5, 5));

Full Changelog: v1.0.14...v1.1.0