You are browsing as a guest. Sign up (or log in) to start making projects!

Geomatrix

  • 14 Devlogs
  • 80 Total hours

A Brawl Stars like game with interesting geometrical shapes that have real mathematical significance. It is made in C++, using only Raylib for graphics and ENet for network communication. I started this project because I want to learn more C++ for my next app that would require me to have extensive knowledge of it to make a zero-copy video encoder for high-end phones.

Open comments for this post

3h 55m 17s logged

I’m starting the development of an Predictive Coding AI model that would play my game as a bot.
I’ll make it in Python so I can learn a new language and as it is the standard language used in AI development.
Currently I’m building a kind of “mega client” which acts as 10 client that connect to the server and it displays the whole map on the screen with all the players.
After this I will link the Python project with the “Mega Client” through standard streams as ENet on Python isn’t really a modern supported thing and this will cut down network bandwidth and I think will decrease the CPU overhead while the model trains.
When the link between the Python and C++ program is finished then I’ll start the development of the actual AI model, which will involve reading through some scientific papers on the topic. Right now I have 2 of them bookmarked, but you never know when something new may pop up.

0
0
2
Open comments for this post

3h 43m 5s logged

I designed kinda a rough sketch of how the icons for the game currencies could look like.
The sine waves are drawn in Raylib and they are static, as well as the circle and the border.

The “R” and “i” in the reals and imaginaries’ icon are font characters. Initially I thought about drawing everything, but then I saw a video about game optimization and that it’s very inefficient for the GPU to render small triangles, which eliminated the drawing in Raylib option, and also it would have been a hassle and a half. So this left 2 choices, load the R and i as a font or an image. I chose to load them as fonts because this allows better scalability, as a font isn’t made of pixels. But I didn’t know how much time I will spend making the font implementation to work.

First I had to find the fonts that had my desired characters, which was a little tedious having to download or scroll through the list of characters for each font. For this I had to install Font Forge so I could view every character in the font. After that I had to create a new font and to replace the i and R characters of the font with my special characters and then hook it up to Raylib.
After loading up my special font I had to tell Raylib whicch characters to import, and I had to measure the characters visual height so I could align them properly in the icon.

Each icon is drawn using their specific function, but I am thinking of combining them into one function in the future.

0
0
3
Open comments for this post

7h 7m 3s logged

Currently I’m focusing on UI refinement, currency introduction and “trophy” road implementation.

I introduced to the game:

Reals - the basic currency of the game (kinda like coins in any other game), you win them after a match and they can be used to buy shapes and upgrades. If it wasn’t obvious, the name comes from the set of real numbers.
Imaginaries - they are the “premium” currency in the game which can be used to buy reals. At the moment the game doesn’t really use them or display them.😅
It’s a work in progress so yeah.

Quanta - these are the equivalent of trophies, they would determine the skill of the player. You gain then winning matches and also lose them losing matches.
At the end of the match (or when the player is eliminated) the server transmits a packet in which is specified the amount of reals and quanta received by the player.

At the moment the amount of currency a player has is stored in a txt file in the game directory for simplicity. In the future I think that maybe it could be encrypted somehow with a key given by the server so the player won’t just be able to modify it.

In addition to this, I changed the UI for the main screen, the shape selection screen and introduces the ability to see the shape, it’s level, stats, and to upgrade it.
I’ll be honest that I took a bit of “inspiration” from the Brawl Stars layout, but tried to change some things, and my UI is still not in it’s final form.
Everything is done in Raylib, I still don’t use any PNG textures because I want everything to be vectors cause they are not limited by resolution (which maybe is worse for optimisation) and frankly because I don’t know how and I’m a little afraid to try. 😅

The settings and map selection menu still remained the same, maybe I’ll work on the map selection menu but idk about the settings menu cause it technically works and as the saying goes “if it works, don’t touch it”, and I’m a little afraid of touching it.

Also I’m thinking of introducing a scale variable for text, like the UI elements are defined by the width and height of the window, but the font size of the text is it plain pixels, so I’m thinking of making the text scale based on how it looks at 1080p and if the resolution is lower or higher the font size will multiply with the scale that will be the players resolution height divided by 1080.

After the UI layout is “done”, which hopefully will happen till the end of the week, I’m starting the development and training of the Predictive Coding AI model that will play my game as a bot.

P.S.: I’m trying to make longer devlogs as that was suggested numerous times in the reviews of the first ship.

0
0
3
Ship #1

What did you make? What was challenging? What are you proud of?
I made a multiplayer game where interesting geometrical shapes fight each other to dominate the world of maths called Geomatrix. It is built fully in C++ with ENet being used for the client-server communication over UDP and Raylib being used to display graphics on the client side.
In Geomatrix different shapes have their own strengths and weaknesses and players have to leverage them in the best way possible so they can win.
It was quite challenging getting the client to render and interpolate the packets sent from the server because without taking into account the time difference the players might overshoot, and because the projectiles didn't have an id at the time, they would flicker in positions where they shouldn't have been.
I am very proud of my server and the client-server communication because were the most reliable and straightforward things during the development of this project, even though I firstly started to build the server, the collision simulation, aiming, map and shape changes were very intuitive which proved to be extremely reliable. This reliability of the server really did come in handy when debugging the numerous bugs of the client, but most of the bugs that I found in the client are now fixed, but if someone finds more, I wouldn't be surprised and you can contact me and describe the issue.

What should people know so they can test your project?
To test the project follow these steps:
1. Go to releases section of the GitHub repository.
2. Download the Client and Server executables.
3. Download the "maps" folder from the root directory of the repository.
4. Place the Client and Server executables and the "maps" folder inside 1 directory.
5. Start the Server and then the Client.
For multiple clients just spin up new instances of the Client.
It is only on Windows at the moment, but in a future update it will be cross platform, even on mobile.

  • 10 devlogs
  • 62h
  • 10.25x multiplier
  • 575 Stardust
Try project → See source code →
Open comments for this post

1h 6m 33s logged

Finally got the settings to work, but the user has to press Enter twice for the change to happen, but hey, it’s not a bug, it’s a feature. 😅

I’m getting ready to ship this first alpha version of Geomatrix. It has been such a journey managing UDP packet types, the server physics simulations, the client interpolation and the Raylib rendering pipeline.

But at the end of the day, it was fun, and I learned a ton about client-server communication and the massive optimizations you can unlock when you find the right architectural abstractions.

0
0
6
Open comments for this post

4h 2m 18s logged

Trying to get the settings menu to work.
Firstly I made a general menu class, then I added to it a submenu vector, and I got it to work when I was only focused on getting the resolution to change. But then I tried to implement the frame rate setting and so the class had to be redesigned and now, let’s say it’s halfway there.

PS: the total time across the 2 Hackatime projects (server and client) linked to this Stardance project is 71hrs.

0
0
3
Open comments for this post

4h 52m 8s logged

Implemented settings and a save file.
Now whenever the user reopens the game it remembers their last used shape and map so they don’t have to reselect them.
The settings UI is only partially made.

P.S.: Hackatime shows the 2 linked project times to be 31hrs 55min and 35hrs 8 min respectively, but the total somehow is 57hrs 19 min.

0
0
5
Open comments for this post

6h 37m 46s logged

Added support for new shapes and levels. Different shapes have different stats and some of them can be upgraded with a leveling up system.
Also added a sine wave animation to a tile.

0
0
7
Open comments for this post

4h 9m 19s logged

Introduced a new tech inspired design into the game.
Now players that are in a “bush” get invisible.
Made the game modular and added support for multiple maps on the server side.

P.S.: In Hackatime I have 54 hours logged on this project, 8 more than Stardance logged, this discrepancy appeared 2-3 devlogs ago and I asked on the stardance-help chat about it, but I got no response.

0
0
4
Open comments for this post

10h 8m 59s logged

I’ve implemented a “fog of war” so the server only sends to the player the data about the other players that they can actually see.
I made the camera follow the current player.
The game now uses interpolation to smooth out the data packets coming from the server, so players can enjoy smoother gameplay. Also the tick rate was increased to 69Hz.
The network packets are now dynamic, they do not have a fixed size, this saves network bandwidth.
What I wanna do next:

  • create some basic UI;
  • create a basic game over screen;
  • introduce new shapes as playable “characters”;
  • maybe introduce a trophy system
0
0
3
Open comments for this post

16h 10m 6s logged

I’ve implemented shooting and health in the game.
Next I have to add a reload and ammo count. After that I could start to focus onto implementing some interpolation in the player and bullet’s movement to make it move at 144FPS not at the 30Hz tick rate of the server.

0
0
1

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…