The Unnamed Game

Hi Defold community! :slight_smile:

I wanted to share with you a project that I started a year ago, making a persistent massively multiplayer online PC game with Defold on my spare time. While I’ve gone through a lot of things to build and problems to solve during last year, it’s still today in a draft-state but I enjoy working on it.
I appreciate the community, from users helping on the forum to those who share helpful libraries.

Enter the game!

I started by the implementation of a multiplayer layer script on top of the NoobHub opensource socket client, that would communicate with a Python server. I started with that little piece of code: asyncio TCP Echo server. The first step was to allow the game to connect to the server and exchange messages. Creating accounts and characters came later:

game_login
With Dirty Larry GUI library, creating basic UIs is a piece of cake!

I slightly modified the NoobHub library to make it work with batchs of JSON payloads. All of the player credentials are encrypted in SHA-1, thanks to an LUA implementation of the hashing algorithm.

Instances and chat

As the game was meant to be divided in multiple maps where players could meet, TCP sockets on the server are splitted in different “channels”, that belongs to a specific map instance.
To make the magic happen on client-side and making sure players were entering and leaving the right “channel” together, every Defold map collection is loading its own multiplayer layer script, with a bunch of specific properties.

Using Monarch as the screen manager was a no-brainer as it helped me organize all my maps collections in screens that embeds the whole multiplayer client instance the player is currently in.

Players are then able to chat on their local channel, and even manage their friend list! All of this is currently done by typing on the chat box, DefChat, which is also an external asset made by @Gmanicus! (hey buddy! :wink: )

game_chat

Basic AI

As I started playing with Defold on a top-down game example, it just felt easier for me to build the game around it. Unfortunately, it’s very complicated to find top-down characters and monsters assets on the web. But I managed to find a nice soldier / zombies sprites pack and added them to the game.

game_zombie

Health bars on zombies are simple GUI boxes that follows the zombie game object, constantly updated with the right position. For those interested on how it works, I used @britzl’s example: Github - britzl/publicexamples/gui_follows_go

When some players enters a zombie collision area, those events are sent to the server that will decide regularly which target to attack, after some checks (is the player alive, still online?).

I think the most interesting to come is to create more and more fight patterns for every… BOSS!
com-gif-maker
I’d also like to thank @Pkeod for its lovely XP Bar Asset!

Character customization

One of the most interesting things to create in a RPG is skills and spells. I’m looking forward to add more abilities to the characters.

game_skills_gui

Server-side monitoring

As a backend developer myself, I like tweaking things and having a nice overview of what’s going on with my game. Every JSON action received by the server is triggering a push to an InfluxDB storage. All of this data can then be displayed and updated live on Grafana dashboards.

That way I can monitor how many players are connected and in which map, check the average latency/ping, and even see the current health points of all the monsters in the game!

What next?

There’s still a lot of work on the game to make it playable, from making it less a patchwork of different ambiances to a consistent theme, bestiary, characters, work on AIs…

But in the end, I learnt a lot, and still will.

21 Likes

Wow, impressive. Well done!

4 Likes

Yes, wow, this is very impressive :smiley: Backend is vast, you have a great minimum viable product that is ready to be expanded :smiley: It is now so amazing I want to play it :smiley:

5 Likes

To bo honest the backend looks even more eniticing to play around with than the game itself.

Although… does the player sprite remind someone else of the Aliens in the Alien Breed games? If the game could capture the feel of those games, I would be sold immediately.

3 Likes

Agreed, the game looks great, so it would be fun both to play it, and play with it. :wink:

They are from here : soldier and zombie !

Yup it is!! Here are some good sprites and characters for you

2 Likes

Opengameart is one of my favorite places to find assets! :smiley:

I didn’t knew about the UndeadEmpire pack, thank you, I’ll check it out!

1 Like

Mine too :grinning:

1 Like

Hey !
Great job so far ! Even the demos look awesome ! I’m thinking of doing a massively multiplayer game aswell . If somewhere in the development I get stuck , can i ask you questions ? I know what everything does alone , but I have no experience in this field .

1 Like

Thanks!

I also started with next to no idea on how to make it work, and learnt by doing it. We’re here to learn from each other :slight_smile:

4 Likes

Can confirm. No idea what I’m doing whatsoever, but I’ve still been hacking away at my project for over a year now. This community is super helpful and supportive.

5 Likes

It’s been a while since I didn’t updated the thread! I’ve been very busy moving my life from Europe to Asia, but still found some time to play with this project.

(There’s a little surprise for those who will go to the very end of this post! :slight_smile:)

I have been very attentive about the previous feedbacks, and grabbed some the assets that people kindly showed me. Here’s what’s new:

Hardcore

I am one of those gamers who believe that permanent death in RPGs is what delivers the most fun and adrenaline out of a game. The alpha version is now set to hardcore mode. You cannot play a dead character.

Character gender

Player character assets have been entirely replaced, and that opened the opportunity to be able to play man and woman. I still need to optimize the size of the assets as I think they are the heaviest files.

01_char

Quests

There was next to nothing connecting the different existing areas of the game, so I decided to add quests. Portals between areas of the game are now blocked if you don’t have completed the active quest, which is currently usually defeating a boss on a map you already discovered.

Completing a quest will also now give you some money as a reward, and it can be used to buy guns at the armory! :gun: :money_mouth_face: :+1:
Your current quest objective and status can be checked using the alternative HUD by pressing the TAB key.

02_quests

Maps & Bestiary

New environments and monsters have been added! Melee zombies were the first implementation of enemies, but there is now some ranged characters such as spitting zombies and elemental witches.

One of the new enemies I added took me a lot of time to implement: CROWS. As I wanted those little birds to wander endlessly and synchronously on all connected client instances without recurrently sending their position, I had to come up with a solution in order to keep them moving around on specific areas until they find a target.

03_crow
On every map containing moving monsters, some magic happens (that will need to be moved to the server as this is very bad design) :

  1. An election process occurs on the server to select the client with the lowest latency.
  2. Every crow factory has a unique identifier across all client instances and registers itself on the server.
  3. The elected client notifies the server when the crow collides with its virtual cage
  4. The server then decides about a new target position on the borders of that virtual cage, and broadcasts it to all connected clients for the crow to move to it

Minimap

By pressing the TAB key, you will get access to informations about which server you’re connected to, your latency, your current quest, but also… a minimap of the area!
The minimap shows your position and the positions of other players in realtime.

05_minimap

Bounties & Achievements

As you can see on the preview, there is also new buttons on the bottom of the screen, next to the chat box. One of the buttons allows the player to check its achievements, which are currently some statistics on killed monsters.
Gathering this kind of data allowed me to come up with some interesting features such as daily bounties. Completing the active daily bounty rewards the player with XP points and cash!

06_bounties

Settings

The settings button gives the option to switch the WASD keys used to move the character between QWERTY and AZERTY keyboard layouts.
From there you can also deactivate the sound effects or the background music.

07_options

How to play the closed beta

The game is currently on closed beta on Steam.
If you’d like to try it you can DM me for a beta key, or ask on the Discord server:

Stable servers are available in Europe, North America and Asia

I’ll definitely try to join the game if I’m nearby when you give it a try! :wink:

15 Likes

Wow, I’m impressed! Good job!

2 Likes

I agree, very well done!

4 Likes

Great job :+1:

i think it’s QWERTY not QUERTY, you have the same typo in your settings.

2 Likes

Hi folks!
Now two years have passed since my last update on the diary, and it is still difficult to tell when I’ll consider this project as “ready”, there’s so many things to do, and so little time to work on it!

Yet a lot of things happened, as I focused on adding more content and server benchmarking.

(By the way, if you’d like to follow updates, I do post patch notes on Discord. Links can be found here: https://theunnamedgame.com)

Maps & Difficulties

One of the major issues is the time to beat the game, and for such persistent multiplayer game, this is one of the “things to improve” I always try to keep in mind.
Players will be able to discover two new maps, the Mines and the Corrupted Tundra.

mines tundra

Also, new difficulties can be unlocked by completing the lower ones, and allows to go through the game again with scaled up the monsters damage, movement speed and health pool. It also comes with better rewards.

difficulties

Loot

Players can now loot money to buy weapons, and unlock the ability for killed monsters to loot these newly acquired weapons with higher DPS values.

loot

Character customization

More active and passive skills have been added for additional character customization. These are definitive choices, so that players can adapt it to their playstyles.

Defold libraries and third-party integrations

  • Rendercam
    I encountered in the past many issues regarding to clicking on game objects, such as waypoints and now looted items. I’m now using Rendercam and it made it way easier to do the correlation between GUI and world coordinates, while making the code cleaner. I wish I used it in the beginning of this project.

  • DiscordRich
    I initially developed my own third-party program to integrate with Discord Rich Presence, but it was a pain in the *** to launch it manually and make it available for all OS. Thanks to DiscordRich it now works seamlessly when launching the client and no need for anything else.

  • Steamworks
    I am a big user of the Steam platform and decided to move the game there. It really helped on automating both dev and prod deployments of the game, while giving me the possibility of giving beta keys to those who want to give it a try.
    Thanks to Steamworks I could easily integrate with Steam achievements API, and there’s currently 38 achievements to unlock while playing through the game!

Server-side works

I spent some time on trying to break the game server, and creating bots to get an idea of its limits. While I’m not having yet big expectations in terms of amount of concurrent players, I was still pretty excited in making the servers able to handle peak connections.

Queues and instances
Some work I did on the past year was, along with adding a login queue for worst case scenario, to develop a tool that would monitor connected and queued players to automatically spawn new servers instances, or kill empty ones. A different port now is exposed and fetched by the game client, so that players are automatically joining the right instance.

World invites
To make sure we can still play with our friends on the same instance, players are able to invite players of their friend list to their current server instance by typing a chat command.
invite

Cross-server communication and synchronization
Making the above possible required for to server instances to be able to communicate with each other. I choosed to use the lightweight MQTT protocol to send messages between instances, and this opened up a new world of possibilities.
I’ve been able to add some really neat features, all based on MQTT messaging, such as:

- Synchronizing persistent data between servers, so that players can login to a different server region and have their account data up-to-date, such as characters progression and friend list.
- Having chat messages broadcasted over all server instances in all supported regions.

What’s next?

On the current state of the game, it only takes a few hours to beat all difficulties. Players running through the quests would get their characters to around level 50 (max is 100).
Aside from tweaking XP rewards and making killing monsters meaningful, I’m thinking about the endgame so that players willing to get to 100 are able to do so.

I’m now focusing on developing a “raids” feature so that players can join for random hard boss battles, giving exciting experience rewards and rare loots. Time to scratch my head to make it a real challenge!


I wish you all an happy holiday season!

12 Likes

Hi there!

I’ve been recently having some motivation to spend more time on improving the game, and thanks to the #MadeWithDefold Jam 2022 currently going on, I’m now adding one notable chunk of new gameplay that I’ll talk about at the end of this update!

Raids

Early this year I was starting to implement a raid, which is now playable solo or in a party, when a player completes the nightmare mode (beats the game twice). Every 20 minutes or so, players can register to join the 8-man raid.

image

Boss attacks are telegraphed, and every player has to move to the safe spots to avoid raid-wide damage. All while damaging him before the countdown runs out. Defeating the raid boss has a chance to drop unique weapons.

GUI improvements

As quality-of-life improvements to the current UX and as an alternative to “chat commands”, I’ve started using Gooey-Dirtylarry to easily add scrolling lists and create more than needed menus for managing friends and quickly travel to other server instances.

The waypoint menu which was just a list of buttons with area names, is now an interactive map that I made using a tool called Wonderdraft. It is a paid software though worth it and helpful to make nice-looking maps quickly.

Animated tiles

I was initially writing a bunch of code to animate my tilemaps using tilemap.set_tile(), and then I found this nice project on the assets library: Defold Tilemap Animator, which allows to create animation sequences by just passing to it the tiles IDs.

Though when importing it, all its variables are shared and using it on multiple tilemaps makes it a bit tricky to work without warnings/errors. Maybe there’s a way to have different instances of imports with LUA but I don’t know. I think this is something I’ll have to look into.

An endless Tower (my goal during the MadeWithDefold Jam 2022)

One of the ideas to make some parts of the game repeatable, was a sort of “tower” map where you could climb floors with different layouts infinitely. I thought it would take quite some time to implement and the jam was a very welcome occasion to start working on it.

I already done some progress these first couple days of the jam, mostly with adding a draft area and all the client-to-server stuff for the multiplayer part of it.

On the current state of the feature, players can enter the active tower floor at any time, and start climbing it by killing a required amount of monsters, activating a portal to the next floor. Climbing floors gives an XP multiplicator bonus for monsters killed within the tower.

For now only I’ve created the tilemap for only one floor layout, so there’s still lots of work to do on the floor design part and the bestiary. I’m trying to do live-coding streams a few hours every day on Twitch!

Also the beta version of the game is accessible until the end of the jam on Steam without asking for any keys!

Happy game jam and thank you all for following the diary :slight_smile:

10 Likes