#I m making a TD game and I have my own A

1 messages · Page 1 of 1 (latest)

viral knoll
#

Let's make a thread out of this

supple crescent
#

I'm on here

viral knoll
#

Alright

#

Basically every single PathfinderMob that can ever move

#

uses its "navigation" to walk around

#

You can obtain its navigator by doing PathNavigator navigator = nmsLivingEntity.getNavigation();

supple crescent
#

I'm following thus far

#

so how do you tell it to go in a straight line?

viral knoll
#

editing my message for mappings, I'm used to obf

#

The PathNavigator has multiple methods

#

That allow you to create a path and move towards it

supple crescent
#

oh that seems easy enough

#

I see a set, I assume that's sequential?

#

is there a max distance between sets?

viral knoll
#

The set just seems to be a collection of multiple points it can pathfind to

#

Although it seems sequential

#

Even though they should've used a list

#

you might need to pass a SortedSet

#

or make a set wrapper of a list

supple crescent
#

since I'm using A* pathfinding and it's the old-school wc3/sc1/sc2 td game players are allowed to create their own mazes so while I can feed the entities straight lines if I could instead just give them a set of points that define everything at spawn that would be even more convenient

viral knoll
#

I thought of making a TD game but then realized that mob movement would be a pain lol

#

I wonder how optimized it would be if you used client-sided blocks for towers

supple crescent
#

yeah I just had teleportation movement for now

viral knoll
#

to have multiple games at the same time

supple crescent
#

I'm guessing I'll have to cancel out all goals so they don't start doing weird stuff?

viral knoll
#

That might work yeah

#

You can remove most goals safely

#

or do like setAware(false) which would have the same effect

supple crescent
#

oh that's way more convenient

viral knoll
#

they might still die in the sun tho

supple crescent
#

I am also still on the fence on how I'm going to represent the towers tbh

#

I'm thinking of a mix or just full on custom models

viral knoll
#

I'd just pull a cubecraft moment and make client-sided schematics

supple crescent
#

yeah I've done that for betterstructures

#

not sure

#

custom models could be cool

#

I made the entities immortal already, all damage is custom anyhow

viral knoll
#

maybe a config?

#
structure-type: SCHEMATIC
schematic-id: tower.schem
#

or

supple crescent
#

yeah a hybrid might be the way to go

viral knoll
#
structure-type: MODEL
model-blueprint: something
supple crescent
#

so set the entity to not aware and then feed it the path at spawn

#

that should do the trick right?

viral knoll
#

feeding the path at spawnpoint is kinda mehh

#

I'd just feed each line sequentially

supple crescent
#

hm I'll test the full feed first to see if it works, I'll fall back to a point by point basis failing that

viral knoll
#

Ight

supple crescent
#

thanks for the help, I've archived the discussion to my notepad to check up after the gym, hopefully I can get the first implementation of this going in the next 7h

viral knoll
#

If you want to mess with clientside stuff btw

#

You can mess around with this block util I made

#

Might allow you to run multiple games at once

supple crescent
#

what does it do ?

#

fakes block data per player?

viral knoll
#

client-sided blocks that don't disappear

#

yes

#

needs protocollib

#

you might get around with some netty stuff

supple crescent
#

that's pretty neat, probably not for this project specifically but def. something to keep an eye on

viral knoll
#

It can paste schematics 👀

supple crescent
#

I already have multi-instancing halfway ready for this one

#

and multiplayer is planned anyhow

#

I'm modeling this after line tower wars so I think we're going to have a lot of fun lol

#

well a mix of that and my own concept of tower modules which buff adjacent towers and adjacent buffers

viral knoll
#

you do you ¯_(ツ)_/¯