Git Product home page Git Product logo

Comments (11)

axx0 avatar axx0 commented on August 30, 2024

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.

reubene avatar reubene commented on August 30, 2024

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.

axx0 avatar axx0 commented on August 30, 2024

Go ahead. I was planning to but I'm bogged down by TOT load and new game logic stuff.

from civ2-clone.

reubene avatar reubene commented on August 30, 2024

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.

axx0 avatar axx0 commented on August 30, 2024

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.

reubene avatar reubene commented on August 30, 2024

Yes since TOT doesn't care about flag locations etc I think these need to be seperate

from civ2-clone.

axx0 avatar axx0 commented on August 30, 2024

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.

reubene avatar reubene commented on August 30, 2024

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.

axx0 avatar axx0 commented on August 30, 2024

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.

reubene avatar reubene commented on August 30, 2024

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.

axx0 avatar axx0 commented on August 30, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.