cat-400

所属分类:collect
开发工具:Nim
文件大小:0KB
下载次数:0
上传日期:2020-10-22 07:32:15
上 传 者sh-1993
说明:  nim编程语言的游戏框架。模块化和可扩展,
(Game framework for nim programming language. Modular and extensible,)

文件列表:
LICENSE (16725, 2023-12-18)
c4.nimble (1051, 2023-12-18)
c4/ (0, 2023-12-18)
c4/entities.nim (7240, 2023-12-18)
c4/examples/ (0, 2023-12-18)
c4/examples/ping-pong/ (0, 2023-12-18)
c4/examples/ping-pong/project.nim (2122, 2023-12-18)
c4/examples/ping-pong/project.nimble (101, 2023-12-18)
c4/examples/ping-pong/project.nims (253, 2023-12-18)
c4/examples/ping-pong/src/ (0, 2023-12-18)
c4/examples/ping-pong/src/messages.nim (804, 2023-12-18)
c4/examples/ping-pong/src/scenarios/ (0, 2023-12-18)
c4/examples/ping-pong/src/scenarios/connection.nim (2764, 2023-12-18)
c4/examples/ping-pong/src/scenarios/movement.nim (778, 2023-12-18)
c4/examples/ping-pong/src/scenarios/start.nim (1313, 2023-12-18)
c4/examples/ping-pong/src/systems/ (0, 2023-12-18)
c4/examples/ping-pong/src/systems/input.nim (823, 2023-12-18)
c4/examples/ping-pong/src/systems/network.nim (156, 2023-12-18)
c4/examples/ping-pong/src/systems/physics.nim (2883, 2023-12-18)
c4/examples/ping-pong/src/systems/video.nim (1548, 2023-12-18)
c4/lib/ (0, 2023-12-18)
c4/lib/enet/ (0, 2023-12-18)
c4/lib/enet/enet.nim (20538, 2023-12-18)
c4/lib/enet/enet.nimble (183, 2023-12-18)
c4/lib/ode/ (0, 2023-12-18)
c4/lib/ode/ode.nim (71750, 2023-12-18)
c4/lib/ogre/ (0, 2023-12-18)
c4/lib/ogre/ogre.nim (11951, 2023-12-18)
c4/lib/ogre/ogre.nimble (145, 2023-12-18)
c4/logging.nim (493, 2023-12-18)
c4/loop.nim (1321, 2023-12-18)
c4/messages.nim (5197, 2023-12-18)
c4/processes.nim (2151, 2023-12-18)
c4/sugar.nim (704, 2023-12-18)
c4/systems.nim (1827, 2023-12-18)
... ...

# Cat 400 "Cat 400" (c4) is a game framework for Nim programming language. ## Brief overview "Cat 400" is a cross-platform framework designed to provide nice experience in game development. Written in nim language, it benefits from the language's elegance and expressiveness, as well as compilation to fast native code. Core of "Cat 400" is platform-independent and may be run on every target platform supported by nim. However, default systems (which are optional) have external dependencies which may restrict their usage on some platforms. # Key features - client-server multithreading architecture (even for single-player games) with network support - modularity: all code is split into "systems" (video/user input/networking etc) which work independently - systems communicate only by sending messages, thus avoiding tangled code - ECS (entity-component-system) with custom user components support - simple overwriting of existing systems and ability to create custom systems - templates which include some reasonable defaults for specific game genre # So why another game framework? I've made a research about game engines and frameworks for Nim, and none of them had solid and thoughtful design. It's super easy to display something on screen, and many people think that opportunity for a program to display cubes on screen makes it a game engine. It doesn't. When I see another game framework, I read its documentation (or code, if there are no docs at all) and try to find answers to these questions: 1) What about physics, i.e. collisions, collision shapes, force, velocity, position etc? 2) Can I do 3D graphics? 3) What if I want multiplayer over network? 4) How do I map user input to specific actions? 5) How do I occupy all cores effectively? 6) What about logging? How to debug? 7) How easy it is to create large project with thousands lines of code? How does the engine help me not get lost? Usually many of these questions aren't covered at all, but for `Cat-400` I do my best to address all of them and beyond. ## Is 2D/3D supported? Yes, 2D via SDL, 3D via SDL+Ogre3d. Also note that `C4` is a _framework_, which means that you can use any backend for any of your systems. So, unlike game _engines_, you can make a 2D, 3D or even 4D ([wat?!](https://www.youtube.com/watch?v=0t4aKJuKP0Q)) game using any graphics library of your choice. ## GUI / Game Engine `Cat 400` is not a game engine (and will never be), and everything is quite low-level - there's no gui and every aspect of game is done within source code. No level editor, too. Feel free to create high-level tools on top of `Cat 400` and share them with community if you have such an opportunity. ### But where do I write code? I know many game engines (for example, Godot) have integrated basic code editors - but they probably haven't heard about IDEs which 1) are designed for writing code, 2) already exist, are mature and just work, and 3) suit better for coding cause have extra features like plugins. So, open your favorite IDE which supports Nim and start coding a game. ### But where do I edit graphics? I know many game engines (for example, Godot) have integrated basic mesh editors - but they probably haven't heard about 3D modeling software which 1) are designed for creating 3D models, 2) already exist, are mature and just work, and 3) suit better for modeling cause have extra features like plugins. So, open your favorite 3D modeling software and start creating models. ## Documentation > WARNING! Due to active development documentation is very outdated. It will be fixed once framework's API is stable. ### Tutorials Visit [docs/tutorials](docs/tutorials/) folder - it's the best place to learn `Cat 400`. ### Reference generation In order to make repo clean, autogenerated reference is not included. You may generate it yourself: from repo root run ``` nimble genDocs ``` Generated reference files will be located in `docs/ref` folder. ### Examples All examples are available in [examples folder](c4/examples). You may also check [templates folder](c4/templates). Templates are just app skeletons which contain initialization and minimal game environment, like a movable player and couple of enemies. ## Submodules Although these modules are part of `Cat-400`, they may be used separately in any project. [`c4.entities` module](c4/entities.nim) - entity-component system, allowing to create lightweight entities and attach any user-defined components to them, with some basic CRUD operations. [`c4.messages` module](c4/messages.nim) - `Message` type and any user-defined subtypes, which may be packed and unpacked using msgpack, correctly preserving type information. [`c4.threads` module](c4/threads.nim) - module for spawning named threads and sending messages between them; allows programmer to focus on his multithreaded app, not on settings up connection between threads. ## Wrappers There are several wrappers which are subpackages of "Cat-400" and may be installed and used separately, see [lib folder](c4/lib). ## Contribute to the project Developing a game framework, well... takes time! If you want to speed things up, you may contribute by 1) testing, creating issues (or better closing them with PRs) 2) sharing the framework with friends 3) making donations - send some bitcoin here: ``` bc1qxwkqjmfmczcxe7zx7hjske7fpkp6e3qdrm72gv ``` 4) providing a grant if you are a company interested in gamedev & nim ## Statistics [![Stargazers over time](https://starchart.cc/c0ntribut0r/cat-400.svg)](https://starchart.cc/c0ntribut0r/cat-400)

近期下载者

相关文件


收藏者