While working on some issues regarding picking up/dropping off units by carry-alls – which also involved the repair facility. I basically redid a few things.

I made sure the logic for entering a structure is the same for refineries and repair facilities. Making sure, when one works, the other also works.

I also made sure that harvesters will pick refineries that are not ‘claimed’ so to speak. For repair units this is not the case. I also made sure the units dont forget their “intent”. Meaning, a harvester will still try to go to a refinery – even when all are full.

All things you expect in any normal RTS.

Although, I had some fun during development, when breaking this:

Weird refinery flashing

And …

This Carry-All didn’t know where to drop and to leave the Harvester alone.

There was also a nice little edge case where a Harvester wanted to enter a refinery, only to be 1 frame too late. And then getting stuck. Which looks weird:

All this is fixed… and tested thoroughly with 50+ harvesters and 25+ carry-alls:

A busy base!

Repair Facility

At the end I felt like polishing up the Repair Facility mechanism a bit more. Now you see the health bar of the unit being repaired, which is a nice touch imo:

Now for those who noticed, there are some rendering glitches on the Carry-Alls, bt they are not that much breaking imo for now… so I’ll fix that in 0.6.x or 0.7.x 🙂

Repair Facility and Carry-Alls?

Well.. it works almost. Meaning, the carry-alls will drop of at the structure, but if the repair pad is occupied (and no other alternative is present) the carry-all will drop it off nearby at a valid location. However, at the moment it looks like the units forget they should be repairing.

For Harvesters this is not a big deal, as the Harvesters have their own little logic that makes them go to a refinery when full. But in this case it is an edge case that does not yet work.


(though, you can see *some* units seem to go to the repair pad, even after being dropped. A little bug/puzzle to solve! )

Comments are closed

Want to support? Please consider donating via Kofi.

Path finding progress demo... made it so I use a priority_queue, did X4 speedup. Nice! https://dune2themaker.fundynamic.com/video/new_pathfinder_02.mp4 #indiedev #gamedev #d2tm #dune2

Path finding testing is done on a map (64x64) where only 1 possible path exists between two corners of the map. I also found a bug in the heuristic function - it would evaluate too many cells. With that sped up greatly, but still needs to be faster.

Spent more hours on path finding. Still too slow! (100/200ms for 1 unit, finding 1 path is SUPER SLOW (on complex map)). Need to shave off more milliseconds.

It is not so hard to implement a new pathfinding algorithm. The harder part is to make it perform properly. Especially when you send over groups of units. #indiedev #gamedev #dune2 #d2tm #remake

Load More...