GithubHelp home page GithubHelp logo

nobledraconian / dragon-engine Goto Github PK

View Code? Open in Web Editor NEW
18.0 18.0 4.0 6.77 MB

Universal framework for Roblox games.

Home Page: https://nobledraconian.dev/Dragon-Engine/

License: MIT License

Lua 100.00%

dragon-engine's Introduction

๐Ÿ‘จโ€๐Ÿ’ป About me

Game developer on Roblox, currently running the startup Phoenix Entertainment. I have roughly 9 years of programming experience, mostly working in Lua.

๐Ÿ† GameDev Achievements ๐Ÿ†

๐Ÿ› ๏ธ Projects

Dragon Engine is a framework for Roblox games that follows a microservice architecture, with a built-in module loader with run-time dependency resolution capabilities.

๐Ÿ“ซ Contact information:

Email : Accessible on the left side!

Discord : Noble_Draconian#0001

Twitter : https://twitter.com/Noble_Draconian

Statistics

dragon-engine's People

Contributors

dependabot-support avatar dependabot[bot] avatar nobledraconian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

dragon-engine's Issues

Modules should be able to be auto-initialized with an Init() method

Currently, the framework has no way of auto-initializing modules it loads. If modules have an API method named Init(), the framework should automatically call that method to initialize the module.

This is useful in cases where a shared module wants access to framework resources.

Access to Cmdr is denied in studio

Currently, EngineDebugService doesn't account for handling permissions when testing a given project in studio, so it denies the developer access to the Cmdr terminal while testing in studio.

This can easily be fixed by checking RunService:IsStudio() and acting accordingly.

There should be server -> client RemoteFunction support

Currently, it is not possible to have client-sided methods that are invoked from the server via RemoteFunctions. Having a feature that allows this to occur would be useful for niche cases where the server wants to know about information that is on the client. An example of this would be in a melee combat system with a block mechanic, for responsiveness purposes the client would be the source of truth for a block's state. When another player attacks, the server would need to ask the client that is being attacked if they are blocking or not. This is doable with Server -> Client RemoteFunctions.

There could be a method on the server called RegisterClientEndpoint or somesuch, where it'll register a Server -> Client RemoteFunction that clients can 'listen' to, and the server can invoke.
It should be noted that an API method like this should be on the server only, for security reasons. A server should only be invoking client methods it knows about contextually. Clients should not be able to register arbitrary methods that the server can execute.

This method would be similar to how clients register client-facing server methods, but in reverse.

APIs are needed to cover cases where microservices depend on other microservices

Currently, as of v0.1.0-rc.6, it is impossible to have complex microservice dependencies. If microservice A depends on microservice B, and microservice B depends on microservice C, there is no way for each respective microservice to wait for the microservices that it depends on to be running. There should be APIs to allow for this type of behavior to happen.

Real world use-case:
CameraController depends on PlayerController:GetSetting("CameraLockedToMouse"), which depends on DataController:GetData().

In this case, since all services have Start() called in a non-specific order, the reference to DataController is not guaranteed to exist when PlayerController:GetSetting() is called, since PlayerController has only been initialized so far:

function PlayerController:GetSetting(SettingName)
	local PlayerData = DataController:GetData(true)

	return PlayerData.Settings[SettingName].Value
end

function PlayerController:Start()
	self:DebugLog("[Player Controller] Started!")

	DataController = self:GetController("DataController")
end

In this scenario, DataController will have to be fully running first, then PlayerController, and then CameraController.

Perhaps there should be some sort of config option that lets microservices specify their dependencies, and the framework will then calculate the order in which to load & run the microservices? E.g. CameraController specifies that it depends on a controller named "PlayerController", and PlayerController specifies that it depends on a controller named "DataController". The framework gets all of this information, and then loads everything sequentially, in the specified order.

Dependabot couldn't find the submodule /Submodules/.gitmodules

Dependabot couldn't find a .gitmodules for this project.

Dependabot requires a .gitmodules to evaluate your project's current Git dependencies. It had expected to find one at the path: /Submodules/.gitmodules.

If this isn't a Git project, or if it is a library, you may wish to disable updates for it from within Dependabot.

You can mention @dependabot in the comments below to contact the Dependabot team.

SecurityService should encrypt RemoteEvent/RemoteFunction names via GUID

Currently, remote's names are not encrypted, making them easier to target by exploiters. SecurityService should encrypt RemoteEvent/RemoteFunction names via HttpService:GenerateGUID() to make it harder for exploiters to determine which remote does what.

I'm not entirely sure how I'm going to pass remote names on to the client though - this will need some more planning before it can be implemented.

Client events for services are not being created

If a client event is created for a service, but the service has no endpoints/client-facing methods, the client event will not be created properly. This occurs because a service with no endpoints does not get a folder created for it in the internal network folder that contains all of the remotes for services.

Specifying developer-specific settings feels messy

Right now, the framework looks for a hard-coded folder in game.ReplicatedStorage named "DragonEngine_UserSettings", this isn't an ideal way to let a developer specify their configurations for the framework.
The code that merges the default settings and developer settings is also a bit buggy, in some situations the settings aren't merged properly.

I plan to redo how settings are loaded and specified.
A few initial ideas I had:

  • Perhaps settings should be specified via some API?
  • Perhaps fire a 'FrameworkLoaded' event or somesuch to tell the developer when to load their own configs? Downside to this : Loading is a bit slower as the developer's modules will be loaded AFTER the framework loads its own internal modules. This can result in a few extra seconds of loading time for the game, which isn't that great.

API for client -> server RemoteEvents is needed

Currently, there is no way to register a service remote event that clients can fire. Usecases include things like character sound replication, custom character state change events, etc. An API method is needed for this. It could look something like DragonEngine:RegisterServiceClientInvokableEvent() or somesuch. This API method would return the generated remote event, which would be parented under a new folder under the service's folder in ReplicatedStorage, called "ClientInvokableEvents" or something similiar. On the client, these events would be stored in the service's table, e.g. AvatarService.ReplicateSound = <RemoteEvent>. From there, a client sided script can fire the event to the server via ServiceName.EventName:FireServer().

Dependabot couldn't find the branch Dev

Dependabot was set up to create pull requests against the branch Dev, but couldn't find it.

If the branch has been permanently deleted you can update Dependabot's target branch from your dashboard.

You can mention @dependabot in the comments below to contact the Dependabot team.

Don't set name properties in rojo config files

Currently, the rojo config files for this framework are assigning names to the framework's folders via the Name property. This causes rojo to duplicate folders when live-syncing into a place file.

The Name property should not be assigned in the config files.

"$properties" : {
"Name" : "DragonEngine"
},

"$properties" : {
"Name" : "DragonEngine"
}

"$properties" : {
"Name" : "DragonEngine"
}

Framework core scripts should be converted into modulescripts

Currently, as of v0.1.0-rc.4, the framework automatically runs when the server or client starts via Script and LocalScript instances. The core of the framework should be converted into being 2 ModuleScript instances. This makes it possible for the consumer of the framework to:

  • Explicitly execute the framework when they want
  • Unit test their project's systems that have dependencies on this framework if they are using run-in-roblox, since they can now do the above in the single script instance that run-in-roblox runs
  • Only execute the server side of the framework if the client side isn't needed

'Stop' and 'Unload' methods should be optional in Services/Controllers

The methods Stop and Unload shouldn't be required for Services and Controllers, rather they should be optional.

If Stop is called on a service/controller, but the method is not present, the framework will spit an error saying something along the lines of "Service/Controller is not able to be stopped".

Same thing applies with Unload being called on a service/controller that does not have the method.

Un-needed services/controllers should be removed

Currently, as of v0.1.0-rc.4, there are a few services and controllers that come packaged with the framework by default, when they do not need to be. They are extra bulk that don't serve much of a purpose, and as such, should be removed.

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.