Repository for Games and Game Creation Utilities Made in CX
Current Project: CXtris
This will be a Tetris clone. If you have suggestions for a better name, you can propose it either on the WeChat or Telegram game development channels ;-)
Initially, we're going to use the textures and font provided in this link: http://unluckystudio.com/free-game-artassets-15-tetris-game-assets/ . Even though they have a CC0 license, we should replace them later on with our own (let's be as original as possible).
Basic Instructions on How to Collaborate using Git
A great article on how to collaborate using git can be found here, particularly check the "The Pull-Request Workflow for Code Contribution" section.
The project structure that we'll be following is this: https://github.com/golang-standards/project-layout . You can also read this blog post to get a better idea of how we're going to be organizing the projects: https://medium.com/golang-learn/go-project-layout-e5213cdcfaa2 .
This repository will initially hold several directories, where each directory will represent a video game on its own. Following the conventions discussed in the links provided above:
We should store the resources that we're going to need for the video games in here, such as texture files.
Source code that will produce the executables or serve as the program's entry point (e.g., the
main.cx file). Files in here should call libraries from the
If we ever need to document a library that we developed for a game, it'll go here.
Sometimes we might need to test some features in isolation, and we should write some examples to provide better documentation.
Any code that isn't general purpose should go here. For example, structures that represent Tetris pieces, and functions that rotate these pieces.
Any code that could be imported by other video games goes here. For example, a physics engine, an entity-component system, etc.
Game Development Examples for CX
Check out the OpenGL examples directory in CX's repository. These are some notable examples:
Examples of smooth animations in CX.
bouncing-ball-control is similar to
bouncing-ball.cx, but you can control the ball's direction using the arrow keys
Extensive use of CX structs to represent a tile map.
This example is not in the
opengl directory because it doesn't use any OpenGL function. Nevertheless, it implements a very basic entity-component system, based on the work presented here.
The code in this file shows how to track the mouse position and clicks.
How to show text on screen.