ThePix / QuestJS

A major re-write of Quest that is written in JavaScript and will run in the browser.
MIT License
66 stars 13 forks source link

Inheritance based Game-Objects #12

Closed KilianKilmister closed 3 years ago

KilianKilmister commented 3 years ago

@ThePix @Alec-15 A while ago i mentioned that i was working on a PoC for possibly redefining the games structure in a more flexible and userfriendly way.

Long story short: i went massively overboard when i started playing around with ES Proxies. It has many elegant solutions for problems added by unneccessary features. Anyways, it's an attempt at a more practicle game core.

Main Features

  1. ES6-Class based Inheritance
  2. Two Basic Scripts Showcasing the PoC
  3. High Degree of Isolation on every Object making Code-Execution Predictable
  4. Use of JavaScript-native Proxys Implemented deep in the Core Code
  5. Fully Dynamic Object Generation Allowing Runtime Creation of Complete Games
  6. Fully Functional Address-Module able to Resolve both Absolute and Relative Addresses
  7. Simple UUID-Creation-Module and Global Index
  8. Basic Caching of Child-Objects allowing Fast Retrieval of Children

Have a look at the documentation and tell me your opinions. All the code is extensively documented aswell and it includes 2 dummy-scripts to showcase it. they can be run in node. All instructions are covered in the docs.

ThePix commented 3 years ago

I am closing this as it seems to be going nowhere.

I did look at classes for types when I started out, but decided against it for a number of reasons, one being that there is no multiple inheritance. How do we handle an object that is both takeable and switchable? It is also easier to pass a parameter with a template.