Could minimaps be a mod addition?

Discussion in 'Mod Discussions' started by ryanx1n, July 6, 2013.

  1. ryanx1n

    ryanx1n Member

    Messages:
    40
    Likes Received:
    1
    I’m quite new to here, for some reason the whole kickstarter thing passed me by, but I’m really interested in this game after playing a lot of TA back in the day.

    I noticed there has been a lot of discussion and disagreement on minimaps.
    Playing the alpha a minimap is something that I would find very useful, as getting older my spatial awareness is not what is used to be.

    Thinking about how this could be done keeping everyone relatively happy is by allowing mods to define a minimap. That way people can use whatever projection they like and choose their own compromise on distorted distances, angle and tears (how the charts combine to form an atlas).

    This could be done relatively simply by exposing three API’s to a user accessible scripting engine.
    The first API would simply return an array of all units visible to the player.
    Assuming we have no units exactly at the poles it would be [r-cord], [theta-cord], [army], [unit type] as outputs.
    The second/third API would allow drawing of triangles/points in a small window on the screen.
    [vertex 1], [vertex 2], [vertex 3], [colour] as inputs.
    The meat of the UI mod would do the relative projection maths on the co-ords to draw the minimap in the window within the scripting engine and use the triangle and point API to output the result.

    Performance would no doubt be an issue but as long as the API and scripting engine perform at a reasonable pace that would become the moders problem to optimise.

    Thinking about it does not even have to be a scripting engine, there could be dll hooks and the moders could write their code and call the API's in a c-compatible language.

    Is this too wild and idea, too low on the priority list or too difficult to implement?

    A general drawing API would also be very reusable for many other kind of UI mods.
  2. kazzymodus

    kazzymodus Active Member

    Messages:
    126
    Likes Received:
    46
    Why would you want a minimap to begin with? The entire world is almost a minimap.
  3. Gorbles

    Gorbles Post Master General

    Messages:
    1,832
    Likes Received:
    1,421
    I'm not too keyed-up on the details, but I was under the impression that the game's UI was based on some kind of web framework/toolkit. Assuming engine functionality is exposed for modders to use, crafting some kind of a minimap shouldn't be too difficult.
  4. mushroomars

    mushroomars Well-Known Member

    Messages:
    1,655
    Likes Received:
    319
    The real question isn't whether or not it can be done, but rather, if there is a competent programmer willing to do it.
  5. kazzymodus

    kazzymodus Active Member

    Messages:
    126
    Likes Received:
    46
    What? That... what?! Of course the real question is whether it can or can't be done! If it can't be done, what is the point of having a programmer willing to do it?
  6. mushroomars

    mushroomars Well-Known Member

    Messages:
    1,655
    Likes Received:
    319
    Primarily because it can be done lol. Those "API"s are basic functions that, even if they aren't hooked in, can be created. Units are likely to contain Cartesian coordinates, the planet is too irregular to use spherical coordinates, so assuming we have access to trigonometric functions, planet location and unit location relative to the planet (all of which are basic things that would be needed to make any gameplay-changing mod), we could make the framework of your minimap. As for drawing triangles on the screen, WebKit uses CSS3 I think, which allows for the drawing of triangles.

    So yeah, the real question is whether or not we have a programmer willing to do it. Anyone? I certaintly don't, mini maps are for squares, just like pants.
  7. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    What...? I don't.... What? :shock:
  8. BulletMagnet

    BulletMagnet Post Master General

    Messages:
    3,263
    Likes Received:
    591
    Perfect start to my morning. ^_^

    Luckily I had finished my cup of coffee first.
  9. oxide246

    oxide246 Active Member

    Messages:
    249
    Likes Received:
    30
    I expressed interest in this recently in another post about a holographic minimap here: http://forums.uberent.com/forums/viewtopic.php?f=64&t=49261

    I'm certain this could be done on the web front end provided we had the unit positioning information you mention given to us through a CoherentUI engine call. After that the data could be rendered onto an HMTL Canvas element which you position in the corner of the game screen.

    I'd like to attempt to do it on a 3D transparent sphere which should be easier as there will be no projection maths to worry about. But I'm guessing right now as they're "unhooking the single planet assumption" (I saw or heard neutrino say something to this effect somewhere) the way unit positioning works is about to change.

    Another thing we'd need is the planet mesh data. I'm not sure what would be the best way to provide this to the front end... Maybe as a json object?

    Still, it would be great to know from Uber what their plans are for this.
  10. mushroomars

    mushroomars Well-Known Member

    Messages:
    1,655
    Likes Received:
    319
    It's a reference to a cartoon from the early 2000's. Remember, I'm a youngster <3.
  11. KNight

    KNight Post Master General

    Messages:
    7,681
    Likes Received:
    3,268
    'square' has other potential meanings as well, such as someone boring, plain or average.

    Mike
  12. thedbp

    thedbp Member

    Messages:
    223
    Likes Received:
    8
    Because there is close to nothing that isn't programmable, there's just variations in the difficulty of programming something.

    unwrapping a sphere shouldn't be too difficult though, but it's going to be very confusing for people using the minimap to understand that the borders loop.
  13. mushroomars

    mushroomars Well-Known Member

    Messages:
    1,655
    Likes Received:
    319
    Thank you, sense-speaking man.
  14. Clopse

    Clopse Post Master General

    Messages:
    2,535
    Likes Received:
    2,865

    I remember when snake 2 came out on the Nokia 3310 and I witnessed looping borders. That was mad confusing but grand once you get used to it.

Share This Page