Coder Social home page Coder Social logo

scrimpycat / commongamekit Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 2.23 MB

A collection of utilities to aid in the creation of games

License: BSD 2-Clause "Simplified" License

Objective-C 32.48% C 64.52% Scheme 0.60% GLSL 0.12% Ruby 0.36% Shell 0.12% Haskell 0.01% Metal 1.80%

commongamekit's Introduction

CommonGameKit

CommonGameKit is a collection of utilities to aid in the creation of games. While this is mostly for my own personal use, some of the things it provides are:

  • Entity Component System (ECS)
    • Animation system
    • Input abstraction system
    • Rendering system
  • Scripting language
  • GUI
  • Rendering abstraction interface (GFX)
    • OpenGL support
    • Metal support
  • Asset manager
  • Text rendering/manipulation

commongamekit's People

Contributors

scrimpycat avatar

Watchers

 avatar

commongamekit's Issues

Add deserializer for text blobs

Add a CCComponentExpressionArgumentType for handling (text: "") and ((text: "")) expressions. These should return a list of CCTextAttribute.

Document components

Add docs to components

  • CCAnimationComponent
  • CCAnimationInterpolateComponent
  • CCAnimationKeyframeComponent
  • CCInputMapComponent
  • CCInputMapGroupComponent
  • CC/inputMapControllerComponent
  • CCInputMapControllerAxesComponent
  • CCInputMapControllerButtonComponent
  • CCInputMapKeyboardComponent
  • CCInputMapMouseButtonComponent
  • CCInputMapMouseDropComponent
  • CCInputMapMousePositionComponent
  • CCInputMapMouseScrollComponent
  • CCRelationParentComponent
  • CCSpatialTransformComponent

Make ECS data oriented

Current state of ECS was built around taking care of multi-threaded considerations. The data layout of the components was not focused on. Currently some degree of data orientedness could be achieved by providing specific allocators for the different components, however it will still result in sparse distribution of components (so a lot of cache misses).

Later the component layout should be restructured to be optimised for cache locality. Current idea is to probably have all components of a type laid out contiguously in memory, but because components can be added/removed, the array should support skip indices (and keep track of removed indices). More thought needs to be given to this, however it should perform much better.

Consider changing add/remove locks in the ECS over to the lock-free queue

Once game is in a state that I can make meaningful profiling of realistic usage, see if changing the add/remove functionality in the ECS to a lock-free interface is more performant or not. Currently thinking it won't be (as locks are quite light wait, and I doubt enough threads would be trying to access it at the same time/doubt it'd be highly contested), but is worth a try.

ECS sync points

Add the concept of sync points to systems. These would allow for communication of specific data between systems to be optimised for delivery (compared to the lock-free messaging). E.g. The render system would depend on the new information from the update system. The sync point here would allow for the system to have the last copy of the state, while the update system is writing to the new state. The concept of sync points is essentially buffered data, where the the sync step simply needs to be an atomic operation to change which page has the newly written data (could either be an exchange or a counter/index).

Places this is most appropriate is for communication between update thread to render thread, and update thread to/from physics thread.

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.