• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Any Tower Defense enthusiasts around?

lucaschain

Member
Joined
Jan 26, 2010
Messages
7
Reaction score
11
Twitch
chainternet
Hey, everyone! I was outside the Otserv world for 15 years (thankfully with the same Otland account) and decided to come back with some friends to try a new idea.

I’m writing this post with three goals in mind: 1) make myself open for any discussion on this topic, be it on this thread or through, talking about other similar projects PMs; 2) show some of the challenges I’m facing during development; 3) find any potential people interested in playing and criticizing the game during the prototype phase or any testing phase when it’s open. Please let me know if this falls under the advertisement rule. I’ll be glad to put it in the correct place.

I love tower defense games and wanted to create a TD-like experience based on Tibia, which I have worked on for the last months. The project is currently in the pre-alpha state, and some core content/balancing is needed to open it up officially for testing. The development server is open, though, but without any uptime guarantee because of financial reasons lol.

The most recent TD game I played was Bloons TD 6, and I got very addicted to it, so you’ll see many “inspirations” that I took from there 😛. Do you have any other benchmarks to recommend?

Last but not least, I want to make it clear that I’m not doing this alone. One friend of mine, “syntheticdrug”, a tattoo artist who worked with me on a Unity game in the past, is venturing on the pixel art isometric world for the first time, and another friend, “Beyconha”, a programmer that is also an old OT enthusiast are both dirtying their hands too.

But how would I implement tower defense core mechanics inside an OT?
There were many questions I didn’t have an answer to right when I started the project almost a year ago:
  • How do I make monsters go from point A to point B, following a specific path?
  • How can I make it so the player has limited access to that path so they don’t block it and win the game?
  • Can we have the concept of “matches” or “levels”, where the player has an early, mid, and late inside every game?
  • How can more than one player play the same level?
  • Can I make it so the temple isn’t just a bunch of teleporters and signs?
  • How can I make adding content easy and scalable, like new levels and turrets?
  • How can I have a sense of progression apart from the default level and skills?
  • How the f**k do I make an otserver anyway?

To avoid going insane, I decided to start small and just pick an existing distro that is as ready as possible for use;

So many distro options, but so few that were easy to start with​

I would love criticism or alternatives for this decision because I miss having post-1098 sprites and client features like imbuements. I’m under the impression that I could have gone with TFS 1.6, but I wasn’t sure how to get an updated client connected to it. OTClientv8, along with the TFS 1.3-based server they made for it, was the solution that I made it work with. I was able to use features like the extended opcodes and other small things, so I went with it.

We already made many changes to the sprite sheet and enabled the alpha channel, so I think it is too late to take some steps back. I'm okay with using it with those limitations, at least for the first version of the game.


To be continued​

I’m already drafting the following parts of this post and will put it here if people show interest.

The website where you can create a pre-alpha account (if the server is online at the time) is Xiba Tower Defense (https://xibatd.online).
I’m streaming the progress daily on Twitch in Brazilian Portuguese, but I’ll gladly answer questions in English. I’m not a professional streamer, though; I'm just streaming to engage with the OT building community.
I intend to add the following topics in the next updates:
  • “the turret mechanics”
  • “can we call them raids?”
  • “ways of player progression”
  • “bonus - in-game google analytics telemetry tracking”

Thank you for reading until this point! I'd love to see what you have to say about this
 
This is really cool. I had been playing a fair amount of btd6 until I let my netflix subscription expire and watched some videos about the new roguelike mode. I'll definitely give this a try to see how you combined a mmo with a TD game.
 
This is really cool. I had been playing a fair amount of btd6 until I let my netflix subscription expire and watched some videos about the new roguelike mode. I'll definitely give this a try to see how you combined a mmo with a TD game.

Nice! Let me know if you do and have some criticism, making this merger not look like a mess is the hardest part
Post automatically merged:


Do you have any TD suggestions that I could use as a benchmark? Also, feel free to create an alpha account to test the game if you want!
Post automatically merged:

From scratch.
impressive
 
you simply create monsters as NPCS and create proper onThink events for them. players can attack npcs which have flag attackable :) and you can use onKill to track which tower killed which npc towers can be any creature since damage can be generated via creaturescripts.
here is snippet from distro i found: it can easily be modified to target npcs or you could use movements and generate the damage onStepIn using onHealthChange stuff
 

Attachments

you simply create monsters as NPCS and create proper onThink events for them. players can attack npcs which have flag attackable :) and you can use onKill to track which tower killed which npc towers can be any creature since damage can be generated via creaturescripts.
here is snippet from distro i found: it can easily be modified to target npcs or you could use movements and generate the damage onStepIn using onHealthChange stuff

I like this approach, too! I'll post here what direction we took for the towers and the monsters.

In short, towers are just "logical": Lua objects with state, and the ticks are managed automatically with addEvent timeouts.

The positive aspect of it is that it is easy to control the turret attack speed by setting the exact event interval I want; it also helps with turrets that fire even with no targets to heal the player or grant other bonuses
 
I like this approach, too! I'll post here what direction we took for the towers and the monsters.

In short, towers are just "logical": Lua objects with state, and the ticks are managed automatically with addEvent timeouts.

The positive aspect of it is that it is easy to control the turret attack speed by setting the exact event interval I want; it also helps with turrets that fire even with no targets to heal the player or grant other bonuses
not via addEvent but via onThink which occurs every 1000ms but yes u can use addEvent to control the attackspeed just be carefull about including a dead/unknown object thats removed mid addeve:)
 
not via addEvent but via onThink which occurs every 1000ms but yes u can use addEvent to control the attackspeed just be carefull about including a dead/unknown object thats removed mid addeve:)

this is a good call, I'm always checking isRemoved on objects before anything done inside events
 
Tower Defense, beside already existing in Real Tibia (well, you know, Towers that don't move that you have to pass ;)), is one of multiple minigames I want to implement into my own (from scratch non-TFS) OT server in the future.

Considering I'm not using TFS, and if I was going to make a classic tower defense game, I would probably just use a tick variable which determines the next direction the monster should move, and, considering I'm using Realots design, I would do so in AdvanceGame or what I've called gameLoop along with other creatures, which are iterated over at 50Hz; check first if creature is a Tower Defense mob, then check if it's finished moving, if it has then move it along according to a vector of directions.

The Towers would just use spells every x seconds/ms with a changeTarget before every attack, and different towers would have different targeting strategies, like Realots.

Simple, maybe stupid, but hey, it works.

If you want customizable paths though, I guess I would generate the paths (vectors of directions) using a special "edit path mode" where you shift+left click the tiles one after another and some kind of visual queue would appear to show the paths you've clicked.

Good luck on your project, if you're going to upload any videos to Youtube, let us know your channel, I'm happy to give it a watch.
 
Tower Defense, beside already existing in Real Tibia (well, you know, Towers that don't move that you have to pass ;)), is one of multiple minigames I want to implement into my own (from scratch non-TFS) OT server in the future.

Considering I'm not using TFS, and if I was going to make a classic tower defense game, I would probably just use a tick variable which determines the next direction the monster should move, and, considering I'm using Realots design, I would do so in AdvanceGame or what I've called gameLoop along with other creatures, which are iterated over at 50Hz; check first if creature is a Tower Defense mob, then check if it's finished moving, if it has then move it along according to a vector of directions.

The Towers would just use spells every x seconds/ms with a changeTarget before every attack, and different towers would have different targeting strategies, like Realots.

Simple, maybe stupid, but hey, it works.

If you want customizable paths though, I guess I would generate the paths (vectors of directions) using a special "edit path mode" where you shift+left click the tiles one after another and some kind of visual queue would appear to show the paths you've clicked.

Good luck on your project, if you're going to upload any videos to Youtube, let us know your channel, I'm happy to give it a watch.

It never crossed my mind to use anything other than TFS by pure ignorance: what would be the game changer here?

Also, maybe simple, but definitely not stupid! What about Realots? Are there targeting strategies for monsters/creatures?

For this project, the paths don't need to be changed in-game, so I ended up doing something very simple using the "no-pvp tile painting" feature in the map editor

I'll soon post another part of this log, along with some GIFs; I'll also create a YouTube channel to add some videos with more detailed features.

Thank you for the tips, @Source


@jo3bingham
I love a good TD game. This flash one is always fun to go back to: Play Tibia Tower Defense on Kongregate (https://www.kongregate.com/games/brunoja/tibia-tower-defense)

Oh I didn't know this one! That would have made my childhood lol
 
Last edited:
It never crossed my mind to use anything other than TFS by pure ignorance: what would be the game changer here?
My own (TaoEngine), but it's proprietary hehehe XD

Also, maybe simple, but definitely not stupid! What about Realots? Are there targeting strategies for monsters/creatures?
Yeah. There's 4 strategies as blogged by Ezzz a long time ago:
1. Target by lowest distance (most monsters use this most of the time, many monsters have 100% this only).
2. Target by lowest health.
3. Target by max damage that's been dealt by enemy targets.
4. Random target.

For this project, the paths don't need to be changed in-game, so I ended up doing something very simple using the "no-pvp tile painting" feature in the map editor

I'll soon post another part of this log, along with some GIFs; I'll also create a YouTube channel to add some videos with more detailed features.

Thank you for the tips, @Source

Dope. No worries :)
 
@lucaschain I did similar game on my OT long time ago and it was very enjoying :D


I used clean distro (TFS 1.2 that time) and the main thing I have to add was to add another method next to find RandomStep - so the monsters, when looking for a new step, did not randomly choose it, but went in the only direction they could, excluding the one they came from. To block player I simply set him "noMove" flag (that's when I've creater that PR Player set/get cannotMove by rookgaard · Pull Request #2553 · otland/forgottenserver (https://github.com/otland/forgottenserver/pull/2553) :D)
 
Back
Top