-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unit shields #69
Comments
Unit shields should be displayed correctly, but only for civ2. I'll try to set it up for TOT but I'm having trouble testing it since that interface is understandably throwing a bunch of errors when trying to run it. |
Are you still working on the TOT shields? |
Go ahead. I was planning to but I'm bogged down by TOT load and new game logic stuff. |
I've merge my changes in this area, we should probably move the actual shield image code to the interface so we can implement differently for TOT and MPG. |
There's the part for reading shields in UnitLoader and there's the part for drawing them. |
Yes since TOT doesn't care about flag locations etc I think these need to be seperate |
I've managed to get TOT shields working. Question - I left GetUnitTextures method in RaylibUI and haven't moved it to interfaces. I can do this but it would require referencing RaylibUI in interfaces. Do we want to do this or in general try not to put UI into Core/Interfaces, so they only communicate through Model? |
I think the question has to be how generic GetUnitTextures is, Is it something a hard code modder would want to implement a different version of in order to support some really funny civ variant(Such as Call To Power) or is it a core part of the render pipeline? I think there is very little chance anyone would ever need to mod GetUnitTextures beyond the flexibility you've just introduced. It's probably fine to leave it in the RaylibUI. I definitely want to keep UI stuff out of core at some point I'd like to implement multiplayer via a pitboss server. It would probably be okay to reference RaylibUI from an interface although I think that would be a code smell so we should probably avoid it. |
There's a general dissatisfaction the way shields are implemented in TOT. For instance you can't easily change the colours of front/back shields since the game automatically darkens them. I'll try to refine what I did by enabling as many parameters to be changed in the interface. For instance whether the shields should be rendered in front or in back of unit, etc. But the GetUnitTextures will be in the UI and communicate with the interface only through Model parameters. And in the future I'll try to keep Raylib_cs & RaylibUI out of interfaces (if it's possible). |
I think Raylib_cs is probably okay in interfaces some things need to be drawn interface specific, but it's better to define params and draw in UI as it will make it more reusable and modable |
Ok, that's what I did, shield drawing params can be easily changed in the interface now, the drawing itself is done only in UI. Shield drawing is now done. |
Currently the units have no shields, this should be interface dependent since they are different in civ2 and TOT. Perhaps some sort of GetUnitTexture method on the active interface
The text was updated successfully, but these errors were encountered: