Unity version Status - ALMOST DONE

Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Unity version Status - ALMOST DONE

Post by Stratego (dev) »

i was palying with the idea of making the game in Unity engine, advantages can be
- multliple platform ability (iOS, Windows and so on)
- better controls (zoom, pan, button clicks and so on features)
- less crash (many is because of the current image rendering library)
- hopefully faster loadup, and faster AI turn
- better multiplayer management
- better online multiplayer (when u see other player's move)
- rotate phone option
- possibility to 3D things in game (eg. particles, like smoke effects - anything)

i started to collect the modules - (there are many more i just started to think)

Phase I (Manual):

- Json reading (units, effects, maps, init, graphics, terrain and so on)
- random maps,terrain handling
- units, effects
- Game UI
- manual move/attack/spells
- Menu (account, basic help, units help, play hotseat)

Phase II (AI):
- AI
- Campaigns, skirmish maps agaisnt AI

- Triggers

Phase III (publish point?)
- Shop
- Donations
- Music
- Sounds


Phase IV (Multiplay)
- Multiplayer (Offline)
- Cosmetic units (they can be used in multiplayer games)

- Chat

Others
- Map market
- Map editor
- Gifts

- Friends
- Achievements
- Cosmetic: Loading screens
- Help - unitlist

- Online multiplayer
- how to get gems - other options.

Furute/Fiction:
- possibility to make a realtime alternative of the game with same unit stats.
... and so on ideas.

Status of this Unity thingie: (this text below is not updated since second half of 2022), so since this last update the game progressed much much more - it have already working multiplyer
I can now load
- terrain.json
- const.json
- maps json
- and all unit types
- all effects
- and individual campaign maps form json

what works

Gamplay:
- terrain and decoration appears,
- terrain affinities are applied to units
- units also drawn, unit image autotileing works now(eg. wall image changes)
- animating (idle animation) of units is working now
- unit coloring
- unit HP indicator is there 100%
- i can select individual units, now it is only colored to full red - 50%
- on unit selection the possible move target places shown
- you can move your units, units animate to target places, movement consumed
- unit can attack, by melee, and ranged (projectiles are not rotated yet though)
- damaged units show HP change, and they can die properly, also shows indicators (eg. burning)
- unit can use abilities, cast spells (i tested only enchantments though), effect icon appears on target
- i converted 80% of effects handling - not tested though
- unit names appear (and other texts are also available now)
- fog of war about 50% (ready but the explored is ugly, grid like)
- worker constructing and meding buildings are ready
- showing occupied image on buildings eg. TC is also ready.
- TC current production callout bubble is ready (same as android however we could rework the appearance if u have idea)
- Multiselect features:
-- on PC you can use hold LSHIFT to multiselect, on phone a button can switch multiselect ON/OFF
-- (new feature, android does not have this) Instant movement of multiple units by setting waypoint for them (little ugly waypoint flag though - needs some idea of rework)
-- (new feature, android does not have this) Instant attack of multiple units with a new attack button when multiple units are selected.
- on unit selection the attack and ability ranges are shown.
- Trigger logics 95% (have a few flaws eg. messages not showing as they shold) but mostly it is in - so campaigns can work now fully.
- units can build terrain objects too (eg. trench)

Ai:
- Most of the AI logics (except bridging) is converted - ATM it is not in thread so that will still need tweaking - lets say 90%

In-game Ui:
- Little ui exparimentations with buttons, the normal in-game buttons/sprites/texts (except ability buttons) are in - no functionality yet under them
- Ability buttons also appear and working
- Started UI interaction eg. delete unit, the confirmation dialog (not yet skinned) is in - not completely ready
- Started the carrier dialog (80%)
- The buildables list (for factory productions and worker buildlist) is ready. (the image list)
- fog of war about 70% (explored is nicer than android as runtime moving but the thick fog is same as on android - only shown after movement)
- unit stats button is working, the whole templating engine war ported to c# - took days...


Menu:
- CAMPAIGN_LIST: First graphical (however visually shitty yet) version of CAMPAIGN LIST view ready (showing selectable campaigns - for now, first 5 only will need scrolling maybe?), clicking on a campaign opens MAP LIST - here i wait ideas on this thread: https://www.ageofstrategy.net/viewtopic ... 56&t=11748
- MAP_LIST: First graphical version of MAP LIST view ready (showing maps in eg. a campaign), clicking on a map open the Game to play
- SINGLEPLAYER_MENU: First draft version of campaign lists menus (like easy camopaigns and such, in multilevel hierarchy option)


General:
- I transferred a big part of code about 63%
(this is the about 50% of the core engine relevant part, the UI is not convertible, that needs to be built from scratch in Unity)




------------
I tried starting it and faced infuriating problems here - i need to solve if ever i want to get over with this unity engine


Not yet solved:

# Wikipedia images are "rotated":
Yes, some images (eg. AOS "catapult" image from wiki) appears rotated in Unity version, as i would need to check somehow the EXIF data for rotation and make a rotate.
having lack of time i just wrote it here as not Top prior thingie.
here is a solution,
https://forum.unity.com/threads/texture ... s.1073684/

i just need a method making it from a texture2d object (if exif info is still there), if not i need a different download than this

Code: Select all

    IEnumerator DownloadImage(string MediaUrl)
    {
        UnityWebRequest request = UnityWebRequestTexture.GetTexture(MediaUrl);
        yield return request.SendWebRequest();
        if (request.result == UnityWebRequest.Result.ConnectionError || request.result == UnityWebRequest.Result.ProtocolError)
            Debug.Log(request.error);
        else { 
            image.sprite = GraphicalTools.MakeSpriteFromTexture2D(((DownloadHandlerTexture)request.downloadHandler).texture, null, 0);
        }
    }





# requiring .NET 4.x: below i overcome json problem but maybe with big tradeoff as the Newston library works only on .NET 4.x and i have no idea what phone or OS types i lose by requiring it (i posted here: https://answers.unity.com/answers/1830570/view.html)

# 9PathDrawables: in android version many dialog backgrounds are 9patch drawables - find a way to use them - or a unity way to do that.

# INTERNAL: SparseArrayToGson - > proper nullable results.


Solved/Worked around:


# Nice unit filtering: the units are now little ugly as they are not scaled with a good filter - should be figured out how to but without losing the possibility of teamcolor changing! (i think the solution to use some shader to make teamcoloring not the current pixel by pixel replacement.)
Solution: Using bilinear filtering on units - sadly on terrains i can not atm as there are big texture bleeding

# HTML displaying library: i need one that works for all platforms (android/iOS/Windows), the unit help and map intro texts are all htmls - it can be a paid library - i just need one :)
solved, the purchased one:
Solution: UniWebView, Platforms: https://docs.uniwebview.com/guide/#supported-platforms



# tree hierarchies kills json decoder: insane... i can not have a Unit reference inside a Unit object as the decoder will generate imaginary never-ending levels and quits... And all solutions they say on net: "not to have such references - and flatten all data" or something... insane... -> solution: this seems working by https://www.newtonsoft.com/json alias JSON .NET For Unity instead of internal json utility (i hope it will be compatible to all platforms iOS/Android/Windows atc - not sure)

#Json decoder can not read multidimensional arrays: ??? nice... -> I needed to re-open the json with another parser (a clumsier one) and make a special reading of that structure... New solution: with "JSON .NET For Unity" it works

# crashing on all unit definition: i can not overcome the problem it can not load all unit types, actually unity is swiped from memory without any error. it stops after loading about 300 unit types and we have much more on all alternatives... i have no idea now, i tried loading scene Asyncronously, - i tried threads - no good yet.-> it came out - was very hard to find out without any error message - that the toJson - fromJson calls killed it (to serialize-deserialize) objects for cloning - so i made custom clones for objects, again nice from Unity having a problem and quitting without error...



# JSON file extensions: In unity Resources can not have file extensions, worse, they have and if they are not proper for the "needy" engine, they
will not get read. eg: you can not have a json file called .map as unity will not read it ... -> workaround: renaming all .map files to eg. .json files (or .txt files) so the stupid unity will make me a Text out of it... (ASSET manipulation)

# directory filenames can not be listed in resources:
again nice... -> workaround: so i made a textfile with all filenames listed in it (ASSET manipulation)

all "(ASSET manipulation)" will need to be changed on all asset sharing with android version.
User avatar
Shark guy 35
Posts: 1294
Joined: Mon May 11, 2020 6:00 pm
Location: The United States Of America
Contact:

Re: Unity version

Post by Shark guy 35 »

This seems like it would be nice, but it would kind of be hard to run on low end devices (like mine).
"A good plan, violently executed now, is better than a perfect plan next week".
-General George S. Patton
User avatar
Gral.Sturnn
Posts: 1877
Joined: Tue Feb 13, 2018 11:29 pm

Re: Unity version

Post by Gral.Sturnn »

Omg this would be huge
~Gral.Sturnn
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Unity version

Post by makazuwr32 »

This would be good indeed if i would be able to launch game on pc.
makazuwr32 wrote: Mon Sep 16, 2019 7:54 amWhen you ask to change something argument why...
Put some numbers, compare to what other races have and so on...
© by Makazuwr32™.
AoF Dev Co-Leader
Image
User avatar
Dagravian
Posts: 938
Joined: Tue Sep 06, 2016 6:20 am
Location: Terra - Brasil

Re: Unity version

Post by Dagravian »

I totally support this idea. I'm pretty sure that everything on the list is possible.
Stay Awesome!
(ノಠ益ಠ)ノ彡┻━┻
User avatar
Dagravian
Posts: 938
Joined: Tue Sep 06, 2016 6:20 am
Location: Terra - Brasil

Re: Unity version

Post by Dagravian »

Btw i got some questions about this new game environment...

Unity Engine has a lot of free assets and add-ons that can be used for this version, can we use them alongside the current we own or isn't possible to mix both libraries?

About modding, what changes can we expect? Will be possible to externalize some content or everything will need to be made on Unity's Dev kit?

About the in-game map/mechanic changes, can we expect things like:
- Map animations enabled?
- Map rotation?
- Unit orientation?
- Daylight cycle?
- Weather conditions?

And more importantly... What's going to be the theme of this version???
Stay Awesome!
(ノಠ益ಠ)ノ彡┻━┻
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unity version

Post by Stratego (dev) »

Unity Engine has a lot of free assets and add-ons that can be used for this version, can we use them alongside the current we own or isn't possible to mix both libraries?
not sure what u mean, like free 3d modely and such? yes and no the simply ported version would only use the current assets (we have in android version) later - who knows.
About modding, what changes can we expect? Will be possible to externalize some content or everything will need to be made on Unity's Dev kit?
would be the same as now, or moddeed version remains in android version (for only modders) - not sure.
- Map animations enabled?
- Map rotation?
- Unit orientation?
- Daylight cycle?
- Weather conditions?
these are all new things, they all can be in as they can be in android version too.
And more importantly... What's going to be the theme of this version???
i just wnated to poert the current versions to unity - not making a new.
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Unity version

Post by makazuwr32 »

Last question of ddd:
Stratego wants to make unified version for all platforms.

Without for now at least any drastical changes to gameplay.
And that will touch all games of ao-series. AoS, AoF, AoG, AoWW, AoMW, AoD and so on. They will be moved as result to new engine but for some time at least they will still be same.
makazuwr32 wrote: Mon Sep 16, 2019 7:54 amWhen you ask to change something argument why...
Put some numbers, compare to what other races have and so on...
© by Makazuwr32™.
AoF Dev Co-Leader
Image
User avatar
Maxbirykov2004
Posts: 1022
Joined: Mon Mar 30, 2020 12:50 pm
Location: Belarus

Re: Unity version

Post by Maxbirykov2004 »

Wow, finally
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unity version

Post by Stratego (dev) »

i wrote a few lines with upcoming problems in the first steps of building a mock AOS in Unity.
User avatar
makazuwr32
Posts: 7830
Joined: Tue Oct 17, 2017 9:29 am
Location: Moscow, Russia

Re: Unity version

Post by makazuwr32 »

That's a lot of problems.
I really wish you good luck with it.
makazuwr32 wrote: Mon Sep 16, 2019 7:54 amWhen you ask to change something argument why...
Put some numbers, compare to what other races have and so on...
© by Makazuwr32™.
AoF Dev Co-Leader
Image
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unity version

Post by Stratego (dev) »

new problem as always...
User avatar
L4cus
Posts: 2358
Joined: Fri Jan 31, 2020 7:51 pm
Location: Perú

Re: Unity version

Post by L4cus »

hi stratego, i wonder if its posible to have map random seeds for skirmish maps...idk if unity engine includes this feature
Last edited by L4cus on Mon Apr 19, 2021 8:46 pm, edited 1 time in total.
Extra ecclesiam nulla salus...
AOD, a new variant...
viewforum.php?f=230
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unity version

Post by Stratego (dev) »

seed?
User avatar
L4cus
Posts: 2358
Joined: Fri Jan 31, 2020 7:51 pm
Location: Perú

Re: Unity version

Post by L4cus »

idk how to explain it, so here is a link about the topic
https://en.wikipedia.org/wiki/Random_seed
is like uhave a model of map, and then it auto generates a map following the model but its not the same map...
Extra ecclesiam nulla salus...
AOD, a new variant...
viewforum.php?f=230
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unity version

Post by Stratego (dev) »

i dont see the idea atm.
please open a topic about it an explain in detail
(but i think it has nothing to do with unity, it needs to be coded by me i think - or maybe Unity has something? i dont know it yet enought to answer)
User avatar
L4cus
Posts: 2358
Joined: Fri Jan 31, 2020 7:51 pm
Location: Perú

Re: Unity version

Post by L4cus »

got it.
thanks
where should i open that topic?
Extra ecclesiam nulla salus...
AOD, a new variant...
viewforum.php?f=230
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unity version

Post by Stratego (dev) »

little progress in status
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unity version

Post by Stratego (dev) »

little progress today (after a few days of learning of unity a little more with some angry birds like game mock - game)
User avatar
L4cus
Posts: 2358
Joined: Fri Jan 31, 2020 7:51 pm
Location: Perú

Re: Unity version

Post by L4cus »

yeiiii!
we are supporting you, daniel!
Extra ecclesiam nulla salus...
AOD, a new variant...
viewforum.php?f=230
User avatar
Badnorth
Posts: 4121
Joined: Mon Apr 20, 2020 2:22 pm

Re: Unity version

Post by Badnorth »

This is really nice. Stratego is doing his best, i'm really looking forward to this unity Version.
For newcomers, click here for discord links. Hopefully they aren't expired.
User avatar
Badnorth
Posts: 4121
Joined: Mon Apr 20, 2020 2:22 pm

Re: Unity version

Post by Badnorth »

A Question though, what does the "Weather Conditions" and "Day light cycle" Mean exactly? Does it mean we can have a day and night in the Ao Games? Plus weather conditions such as Rain and Blizzards? That would be extremely nice actually.
For newcomers, click here for discord links. Hopefully they aren't expired.
User avatar
L4cus
Posts: 2358
Joined: Fri Jan 31, 2020 7:51 pm
Location: Perú

Re: Unity version

Post by L4cus »

I think thereare 2 options for it? Just aesthetic, or with influence in the game (affecting stats ie)
Either of them i like it
Extra ecclesiam nulla salus...
AOD, a new variant...
viewforum.php?f=230
User avatar
Badnorth
Posts: 4121
Joined: Mon Apr 20, 2020 2:22 pm

Re: Unity version

Post by Badnorth »

If so. We can make undead units in Age of Alder stronger at the night. And maybe some will have Stealth. That'd be nice. I hope images can be changed in day and night.
For newcomers, click here for discord links. Hopefully they aren't expired.
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unity version

Post by Stratego (dev) »

dont think too much about it - i do not plan to put in any new before i made the full unity version that can take months, or years lol :)
User avatar
Badnorth
Posts: 4121
Joined: Mon Apr 20, 2020 2:22 pm

Re: Unity version

Post by Badnorth »

Alright Stratego, No problems.
For newcomers, click here for discord links. Hopefully they aren't expired.
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unity version

Post by Stratego (dev) »

little progress with blue
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unity version

Post by Stratego (dev) »

little progress with blue

- i can select individual units, now it is only colored to full red - 50%
- on unit selection the possible move target places shown
User avatar
L4cus
Posts: 2358
Joined: Fri Jan 31, 2020 7:51 pm
Location: Perú

Re: Unity version

Post by L4cus »

and now i wonder what is blue?
Extra ecclesiam nulla salus...
AOD, a new variant...
viewforum.php?f=230
Stratego (dev)
Site Admin
Posts: 15741
Joined: Fri Apr 25, 2014 9:28 pm

Re: Unity version

Post by Stratego (dev) »

new line in status with blue

- you can move your units, units animate to target places, movement consumed
Post Reply

Return to “Unity version workbench”