Comments (11)
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.
from civ2-clone.
Are you still working on the TOT shields?
I was starting on the supported units view for cities and these areas overlap. If you're working here I'll hold off and find something else to look into.
from civ2-clone.
Go ahead. I was planning to but I'm bogged down by TOT load and new game logic stuff.
from civ2-clone.
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.
from civ2-clone.
There's the part for reading shields in UnitLoader and there's the part for drawing them.
So both should be separate methods in the TOT and MGE interfaces?
Ok, I'll see what I can do since this part is actually preventing me from loading TOT games.
from civ2-clone.
Yes since TOT doesn't care about flag locations etc I think these need to be seperate
from civ2-clone.
I've managed to get TOT shields working.
A couple of things left to do: draw TOT shields on top of units (unlike mge) and shield colouring (it's not as simple as in mge).
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 hope you understand what I mean.
from civ2-clone.
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.
from civ2-clone.
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).
from civ2-clone.
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
from civ2-clone.
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.
from civ2-clone.
Related Issues (20)
- Draw city size box
- Saving game HOT 5
- Game crashes when dead civ is chosen for next turn
- Don't update the map every time unit moves HOT 2
- Fastrandom bug? HOT 6
- Missing references - Broken code HOT 1
- Some issues with BitmapStorage
- Drawing with different zoom levels
- Search paths don't have the local sav/scn folder HOT 1
- Raylib-cs and .net8 HOT 2
- Feature Request: use Bilinear/Bicubic interpolation scaling on zooming HOT 10
- Unit Actions HOT 4
- What civ can see vs what is there HOT 2
- Game type parameter for TOT
- Improvements in MPG vs TOT HOT 8
- RaylibUI.Mac does not exist HOT 2
- Adjust Menus for TOT HOT 1
- Menu styling HOT 2
- Update dialog tiles when loading game/scenario HOT 3
- Update status panel HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from civ2-clone.