Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1410642 Posts in 69557 Topics- by 58554 Members - Latest Member: maruya328

September 08, 2024, 04:56:29 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsWorld of Squares MMO [Public Pre-Alpha!]
Pages: [1] 2 3 4
Print
Author Topic: World of Squares MMO [Public Pre-Alpha!]  (Read 6288 times)
vitalash
Level 0
***



View Profile
« on: July 01, 2024, 07:34:06 PM »

https://worldofsquares.org/
^^^ Play the pre-alpha here ^^^





I'm making a cute game for people to play with their friends and explore.







Initial post:




You can pet yours and others' pet foxes!




Fishing rhythm game (video link has audio)
https://i.imgur.com/tO3VrZX.mp4


Login screen


It's programmed in Jai without an engine. Working on it every day; I'll try to post updates even if it that day's work wasn't visually exciting
« Last Edit: September 06, 2024, 07:11:17 PM by vitalash » Logged

Sketchwhale
Level 1
*



View Profile WWW
« Reply #1 on: July 02, 2024, 12:47:28 AM »

Jai is just a language, right? How do you do system calls, for graphics and input and such?

I can't really tell if the game is about anything right now. Is it a simulation game of some sort?
Logged

nathy after dark
Level 8
***


Open Sourceress


View Profile WWW
« Reply #2 on: July 02, 2024, 09:29:41 AM »

Sounds like some fun ideas are in this already. Keep it up  Hand Thumbs Up Left
Logged

vitalash
Level 0
***



View Profile
« Reply #3 on: July 02, 2024, 06:08:41 PM »

Fun bug from today; as I was systematizing client/server data duplication, I forgot to add the fishing rod position, so whenever you started fishing, it thought you were trying to reach all the way to tile 0,0,0 (and my code always extends your fishing rod to reach your intended tile)


Sounds like some fun ideas are in this already. Keep it up  Hand Thumbs Up Left
Thanks Smiley

Jai is just a language, right? How do you do system calls, for graphics and input and such?
I can't really tell if the game is about anything right now. Is it a simulation game of some sort?
Yea, I'm using OpenGL for graphics, miniaudio.h for sound, ENet for networking, and pure windows calls for window creation/input. My text renderer supports unicode, and my input system supports unicode input and Windows IME, so I'm hoping to appeal to international audiences.
Try not to look too hard for what the game is about right now. I'm enjoying an iterative design process that I've employed in previous projects. I do have many ideas, but I don't like sharing my ideas with words; I'll share them with results. Simulation may be a good simplification to think about, yea. The project is early in development.

My work today was changing systems and reaching feature parity with yesterday, so here's a nice gif anyway


I'm using Goxel for making the map, with my own modified text-format exporter that segments the layers.



Work today; I now synchronize data per entity and per player with these data structures. Compile-time programming lets me generate my own custom setter API with compile-time assertions.

Data is now synchronized to all loaded entities and new loading entities in one place in the code, and it's this system.
The server can set values to duplicate to the client like this:

Finally, the client can read their player variables (health/inventory/player id) off of the global "Client" or specific entity variables (color, fox petting amount, item entity's item) off of any "ClientEntity"




The way I write these systems is that I feel completely free to undo all of this day's work if it doesn't turn out well. I compressed a lot of existing code (fishing/petting/player data synchronization) with this one system, and I'll see whether it extends well, or whether I tried to systematize it too early.

This is a really good pixel font by the way, guys! https://diaowinner.itch.io/galmuri-extended
I'm using this font in World of Cubes.
I used it recently when I ported a game of mine to PC and supported Japanese localization.



Logged

vitalash
Level 0
***



View Profile
« Reply #4 on: July 03, 2024, 07:09:32 PM »


I call this new area of the map the "Fertile Crescent." There's wheat and a posh house with a stove! Make bread to stay healthy during your adventures!

Step 1: Pick wheat and start cooking (You can make up to 3 bread loafs at once)

Step 2: Wait a minute, then collect bread!


As I added transparent rendering for glass and the building roof hiding today, I also made water transparent
Logged

vitalash
Level 0
***



View Profile
« Reply #5 on: July 04, 2024, 06:30:23 PM »

My main work moving the project forward today was inventory management. You can now move items, re-stack, and drop them; either one-by-one, by stack, or by half-stack.


My exploration today was this rad lava parkour dungeon with a reward at the end. It's kind of basic; I call it an exploration, not a revelation Wink

I will steer course tomorrow and explore in a different direction.

I also made the database updater today, and indoor areas can now optionally mark the sky color (the dungeon in the above gif has a black skybox).

Here is the map right now. In the far future, I can forsee myself forking Goxel and fixing a bunch of things and adding features suited to my needs. For now, I must make do with the tools I have and make an interesting game first.


Code tip for any programmers reading! If you're going to saw "was_dead" to true, don't do it when "dead == false" (This was a funny tiny bug today)
Logged

vitalash
Level 0
***



View Profile
« Reply #6 on: July 05, 2024, 05:56:00 PM »

Today was a bit of a break day, and half of my work was spent making a clean bug report for the compiler developer.
Regardless, I added sword combat today.


I also made it so entity data can be duplicated to clients generically, without being attached to a particular entity type. This is so entities can flash red when they take damage, and I did it this way so I can re-use this system later.


Enjoy my cute pet fox
Logged

vitalash
Level 0
***



View Profile
« Reply #7 on: July 06, 2024, 06:26:02 PM »

I had fun playtesting the game with someone today. We fished together, made bread, fought each other with the sword and firecube spell, and went through the lava parkour dungeon. It was actually very very fun. To end off, I entombed them inside of a cube of players. None can escape such a prison (except with the teleport spell or a weapon)


The fishing rod bug resurfaced in a fun way today; if you kill someone who is fishing, their "am_fishing" flag is not set to false


I added Goblins as an enemy today! They have a 1/128 chance of dropping the Goblin Staff

(but for the sake of this video, the drop rate is temporarily 100%)

Debug tooling; I'm trying to only hit necessities so I can ship this within my life-time (I'm actually hoping to have a public pre-alpha within a month but we'll see how that goes...)

I don't know why I had packet size in kilobytes. Here it is in bytes.


Here is the map so far
« Last Edit: July 06, 2024, 06:37:12 PM by vitalash » Logged

vitalash
Level 0
***



View Profile
« Reply #8 on: July 07, 2024, 05:23:37 PM »


My work today on the game was dangerous. I saw myself falling for tendencies that shuffle things around rather than make meaningful progress (to the untrained observer, these two things would appear the same). At worst, I saw myself attempting to work on things that would non-obviously worsen the game.

The game will have a limited number of level crystals. Each level crystal will be its own challenge, and they will push the game mechanics harder than any piece of content; I say this not to say impressive words but rather because I need an excuse to do what I already want to do. Each level crystal will give you +1 max health.

I migrated the database code to its own file (it is 473 lines) and implemented server auto-save.
If you're curious, this is how big the codebase is. 9,388 lines, 7 files.


I played with the idea of having a long tunnel full of goblins with a reward at the end. As I made it take shape, I found it was not cohesively good enough of an idea; it did not fall itself into place. Sometimes, nothing is working design-wise, and the only thing worse than that is moving forward with sloppy work. The great thing about rest is that I wake up as a new person.

Programmer art is fun. Because you have to use all that you learned to make something good enough in five minutes.
Logged

vitalash
Level 0
***



View Profile
« Reply #9 on: July 08, 2024, 04:57:06 PM »

Particle simulation. During my testing I decided "You know what I'll just make sand spawn above my head every movement timer tick" and it turned out to be so fun I decided to make that the exact purpose of the "Cursed Bucket of Sand."

Don't stand still for even just a little long, or else you risk getting stuck! (You can attack sand to delete it)

Particle simulation means I can now make fireball effects.


But wait... there's a strange sand shrine not far from the farm. And I found these sticks by the forest.. what could this mean?:


It means you can craft a Staff of Sand; you can do cool stuff like bury your enemies or climb the sand pile!


If you're curious, this is how it works from a programming perspective. My data is laid out like this (the top few lines are in the global ServerState struct)

And then each frame I loop all particles via the "in_use_sentinel" which has all the live particles chained together. The updates can query particles spatially using the "spatial_hash". The updates then do "Commits" by calling functions like "particle_move" or "particle_transmute" and at any point the code particles can be added with "particle_add";
The usage code is very very simple, and I can extend this code a lot to do crazy things, like having fire particles set nearby wood particles on fire.

At the end of the particle tick, each ParticleCommit will update the particle buffer in the order they were issued, then they will be cleared. This is where updates to the clients are sent; per ParticleCommit. You can think of it like me sending deltas to clients in the loaded chunk region.
Additionally, whenever a client loads a new chunk, I loop through the 8x8x8 tiles spatially and use the spatial_hash to grab the particles quickly.
The clients just store particles in a grid in each chunk, without spatial_hashing or in_use_sentinels. It can afford to be dumb by way of finding all particles; it's the server who has to loop every particle often.

I could've fielded this through the entity system, but I want it to be very compact and lean and fine-tuned.
Oh yea! Firecubes go through the entity system now. They used to be a separate system entirely, but the data duplication is perfectly designed to handle firecubes. They spawn _at_ their target location with duplicated data on where they started. Then the clients draw them interpolating between the start and end by the percentage of their lifetime.


« Last Edit: July 08, 2024, 05:22:17 PM by vitalash » Logged

vitalash
Level 0
***



View Profile
« Reply #10 on: July 09, 2024, 06:53:09 PM »

A staff of wood will create a wall of wood. This goes through the particle system. Wood can be set ablaze with fire particles.


A new mountain sprung out of the ground. It exists as a fundamental piece of geometry rather that content itself. I'll see how that relates to content creation in this experimental process. This mountain actually took many hours to create; perhaps this is forming the basis of how I may modify Goxel or make my own tooling in future.

This is what the map looks like now.
Logged

Vanivan
Level 0
**


View Profile
« Reply #11 on: July 09, 2024, 10:47:24 PM »

Going very well, keep the good work! Are you going to apply textures to solid color cubes or just remain like they are at the moment? Maybe adding ears to the fox?  Coffee anyway good job!

Logged

vitalash
Level 0
***



View Profile
« Reply #12 on: July 10, 2024, 06:53:01 PM »

Going very well, keep the good work! Are you going to apply textures to solid color cubes or just remain like they are at the moment? Maybe adding ears to the fox?  Coffee anyway good job!


Thanks Smiley Yea, ears to the fox is a very very good idea (I wrote that down just now). Most things will be solid color cubes, but I plan for slightly higher resolution on things like the stove in the farm (think of them divided into voxels of 8ths or 16ths).

On the topic of things like that, today I was planning on adding support for larger entities, but after spending some time on the problem (which is very much solvable), I decided against it because I'm currently focusing on things that this game needs in order to have a successful public alpha. There are many things I can do that this game may succeed without.

I started today by adding this simple Aether Bubble particle, and a staff that spawns it. You can stand on it and you will float.


Then, I added an entrance to a rad Aether King boss dungeon at the top of the mountain.

The Aether King shoots firecubes and aether bubbles at you. There is no way to damage them except by dropping chandeliers from the ceilling, which can be reached by utilizing the Aether King's aether bubble attacks.


They have a 1/4 chance of dropping the lovely Aether Staff. With the staff you can float high or trick your enemies!
Logged

vitalash
Level 0
***



View Profile
« Reply #13 on: July 11, 2024, 06:05:30 PM »


I added the Clone Staff today! It takes 100 cube flakes to cast and creates a clone on your cursor!

Then they do things like teleport, cast spells, and attack, just like you!

Here's a funny bug when I was making them fish with you.


Whenever you earn cube-flakes from fishing, they earn a fraction as well, and if you kill them, they drop their inventory.


Your pet now carries items! And if they carry a sword specifically, they will fight some creatures when they happen to coincide with one

Their item is stored in the database; this acts as an extra inventory slot for you.
Here's how convenient it is


Because your pet will now carry and store an item for you, they can also pick up the cursed bucket of sand Wink


I wasted hours in the morning looking into cloud infrastructure stuff. I should really just work on getting the game to a good alpha testing state. That's way more fun, and also more impactful. Once you have a good game, it's easy to launch it. That's the part worth extra effort; making something worth launching.

I worked on a special hat system today; here's a wizard hat.

I don't like how it turned out and I know that I can do better. It's late and I worked hard today; I know I can do better tomorrow with rest. I will not stop at this result Smiley
Logged

vitalash
Level 0
***



View Profile
« Reply #14 on: July 12, 2024, 06:11:27 PM »

I'm going to need playtesters soon (within a few weeks)! DM me or join this discord https://discord.gg/Un4Vx47e7b where I will update with more info as we get nearer to playtesting!

Today I added fox ears! There's now a hat slot in your inventory that you can place fox ears into. You can then wear fox ears

However, that's not enough. Clearly we need a midnight altar ritual to permanently bind these ears to our heads such that it's not merely the illusion of a headband.
So first, I added a daylight cycle such that we can have a midnight sacrifice. (It is 30 minutes for one day to pass)


And now, wearing fox ears, you can pray to the shrine at midnight. Once you do, you will be killed.

However, you will find your spirit resurrected, and the headband that connected the ears to your head mysteriously gone. There is nothing more in your hat slot. You now truly have fox ears.
(The headband actually stops rendering, and when you take damage, the ears flash red as if they are a part of you.)

I added a lovely admin panel. I can now give myself items and set the day time. The server can remain headless and be controlled this way. This only works for any account which is specified as an "Admin" in the server.


You may sense that your pet's ears wiggle a little when you pet them


I did a few variations of these ear models in Goxel as I tested various ones in the game. It took effort to not just accept my first attempt, but it was worth it. I of course don't have the time to refine this further as I have an alpha to ship and this is satisfactory for the alpha release!


This function draws the ears. I manually specified each voxel.

In future, I may want to streamline this modeling pipeline, but I also don't want to streamline before I do a bunch of interesting things like this with animation controls. For now, this suffices well, and it let me do fun things like wiggling each layer of the ear separately so that it can wobble when you move and pet a fox.

I wrote down a TODO item for petting players with permanent fox ears. Wow! That just gave me an idea as I was writing this. Okay, after 10 minutes of programming work, permanent-fox-ear players now have tails. It's much more involved than just wearing the headband; after the ritual, you are half-fox! I will want a player's tail to shake excitedly when pet, just like with the fox.


P.S.
Even without having worked on graphics, the sun-rises are pretty. In-game, you see them moving over time.
« Last Edit: July 12, 2024, 07:31:25 PM by vitalash » Logged

vitalash
Level 0
***



View Profile
« Reply #15 on: July 13, 2024, 06:45:21 PM »

Today was non-game work which is something I want to avoid unless absolutely necessary.

Chunk loading is now much lighter weight on the server, and it is sent in batches rather than one-by-one, which needs to happen because ENet wants to guarantee the order of packets.

Chunks are also cached on the client and saved between runs. A little "cache.dat" file accumulates a few hundred kilobytes from playing currently. The client then knows to not request that information from the server unless the world updates.

Particle updates are also now sent in batches rather than one by one.

It was just a lot of technical stuff today which won't make an interesting game but it will at least make the interesting game run.

Here's the kinda stuff I was doing in game to debug the particles as I made this change.


I tested the game with 50 clients on my PC connected to a remote server.
Logged

vitalash
Level 0
***



View Profile
« Reply #16 on: July 14, 2024, 05:37:03 PM »

You can now pet fox-morphed players.


The new recall spell allows you to set a teleport point anywhere in the world and it will save that point even when you log out.


I started on adding support for player paintings in the world today. This is a social game, and this is one way for it to manifest. I also ponder the possibility of musical instruments? I love violin. Maybe you bow with your mouse and each row of keys on your keyboard is a place on the fingerboard. It'd kind of act like a fretted instrument considering our keys are not analog...


Half of my day was a bunch of technical stuff to make most packets deferred and sent in one big "tick update" packet. During stress tests, this makes things smoother with ENet attempting to keep all packets in order. The API is simple. I just call push_to_connection_buffer with new packets, and then I flush_connection_buffer every tick for every player. It automatically "flushes" the buffer whenever it runs out of room (it sends the batched packets to the player).


The world:
« Last Edit: July 14, 2024, 05:46:13 PM by vitalash » Logged

michaelplzno
Level 10
*****



View Profile WWW
« Reply #17 on: July 14, 2024, 09:55:45 PM »

Cute game, what kind of social features are in there?

Building stuff with cubes is nice and all, but why are people going to collaborate/make friends/interact in positive ways?
Logged

vitalash
Level 0
***



View Profile
« Reply #18 on: July 15, 2024, 06:47:07 PM »

Cute game, what kind of social features are in there?

Building stuff with cubes is nice and all, but why are people going to collaborate/make friends/interact in positive ways?
Interesting prompt.
The "in positive ways" part is the magic of humans, and only something I can influence, not control (for example by not limiting resources a ton). I think a big part of that is community, marketing, and vibe/atmosphere. When people have a predisposition towards making friends, people will kind of do it automatically. Some might like to meet others in big cities, and others may want to find a friend out in the wild, one-on-one.
Now for supporting that, I will have messaging and the ability to add players as friends.
Beyond that, my mission statement of a "social MMO" is informing all of my design decisions so you'll just have to see it manifest.
I have some constraints in mind that I want to keep in place, even though they may seem obvious to remove given the mission. I'm seeking to find the magic of working as hard as I can within those design constraints.

I worked on painting a lot today. You drop Cube Wool and a stick to create a canvas. Then, you can use the canvas item to place it and draw in front of your friends.

The data for them is stored in a separate database file because I found they exist independently of accounts.
I also cleaned up my data duplication API and leaned on the compiler more, which deleted a few hundred lines of code.
« Last Edit: July 15, 2024, 06:55:11 PM by vitalash » Logged

vitalash
Level 0
***



View Profile
« Reply #19 on: July 16, 2024, 04:51:51 PM »

Today I worked on streamlining specifying assets and painting!
To add a new item, I used to have to:
Define its file in the GameFile enum; TextureItemCubeWool_PNG
Add a switch case for that GameFile as "textures/item_cube_wool.png"
Specify its texture in the Textures enum; ItemCubeWool
Specify its item id in the Items enum: CubeWool
Then call load_item_texture(TextureItemCubeWool_PNG, ItemCubeWool, CubeWool);

And now I don't need to use a GameFile enum; I can just use file paths. "textures/item_cube_wool.png" And thanks to Jai's metaprogramming, it still easily bundles that data into the executable such that the game is just one exe still.

Painting palettes! You can mix colors with this awesome color palette mixer and use a variable brush size.

As with everything, I could make it even better but it's time to move on to other crucial parts of the game; it won't be a success with just this alone! Once the game is cool enough for people to adopt it, players will enjoy updates to this later.

Watch your friends paint in real time (but beware painting too close to the goblins)

Logged

Pages: [1] 2 3 4
Print
Jump to:  

Theme orange-lt created by panic