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.

See:

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

2 Responses

  1. I remember walling off the repair facility (making sure no units could enter or leave it, either with actual walls or other buildings) in Dune II to make sure that when the carry-all took if for repair, it would return the unit to the battlefield where it had come from, and not drop if off outside the facility. Pretty sure. Anyway, impressive work – looking forward to the next release!

    • Good point. I tested this out with v0.5.9 and it doesn’t seem to work this way. I’ve created a Github ticket for this. It basically means that a carry-all should be allowed to pickup a unit from a structure. Its a nice thing to drop the unit off where it came from. Since you can set rally-points I am not sure what to do if you would have set it from a repair facility. I guess if you don’t set a rally-point the default behavior can be as you described or send to rally-point if given. I also checked this for refineries and it is also bugged there – same reasons.

      At the moment a unit is just spawned on top of a structure, and it gets stuck there.

      Thx for the compliments so far. There are 9 remaining tickets left on GH planning board. Hope to get it down to zero soon and get out a 0.6.0 release! 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

Version 0.6.0 – YT Demo
Want to support? Please consider donating via Kofi.