• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

jakubDoka/mlok: golang powered game engine

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

jakubDoka/mlok

开源软件地址:

https://github.com/jakubDoka/mlok

开源编程语言:

Go 99.6%

开源软件介绍:

Gobatch

Go powered engine that offers features from low level opengl abstraction to UI framework. I created this to separate lot of logic from game am working on.

Structure

Engine contains lot of packages and most of them are not even that big. Reason for this is simple. I consider lot more convenient to write key.A instead of ggl.KeyA, some packages like rgba (offers lot of colors) are also generated then there are two package for interpolation lerp anc lerpc, one focuses on floating points other on colors but actual struct names are same. Another example is particle, this way you write particle.System and not drw.ParticleSystem. Whole engine is thus modular. It prefers components over maybe nice slow abstraction and can be more of a backend.

Dependencies

I have to mention that engine depends two "languages", goml and goss. Yes they are named after html and css as they resemble them. You don't have to use them, but they make ui lot easier to develop. See this repo for documentation of the "languages". I also made vscode extensions for syntax highlighting, link to them can be found in readme of mentioned repository. Errors are handles by sterr, using it directly might be useful when testing things that depend on mlok.

Examples

Nothing is better the learn from code so I wrote couple of examples to show off what engine can do for reference. You can find them all here.

raycasting

particles

chat ui

How to create a window or draw a sprite is also documented.

Documentation

I am going to be absolutely honest, some comments can be outdated. When i was developing ui package (ant its still in progress), i tried multiple different approaches and commented things too early. There is a lot of documentation and i have to clean it up, document new features and so on. Please open an issue if doc is unclear or is missing so i can prioritize things.

Contribution

When contributing please keep conventions. If you end up naming lot of struct fields with same prefix, extract them into separate struct and embed/add it to the parent (it has no runtime cost and makes code cleaner). Don't be afraid to introduce new package just to make naming nicer (again you notice it by same prefixes on items). Write tests if possible or add a exhaustive example of feature use. I have to first understand what code does to decide if its reasonable.

UI bugs

Ui can contain lot of bugs because of how flexible feature it is. It is just hard to test everything. If something behaves inconveniently open the issue and i will 1) fix it or 2) show you a work around if i cannot fix it (that can happen too).




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap