Gathering Resources - Let’s try to put it in a modular perspective using a bunch of games and comparing them… (might be useful to someone)
In an RTS game, so far I have seen the following ways to gather resource to be most frequent:
Generals Style
Starcraft II Style
Detailed:
Generals Style
In the red box that the “stuff” that’s already there on the map and the player needs to collect it. The chopper stroked in green is a vehicle made by special building with a sole purpose of flying there, hovering for a bit (“gathering resource”) then hauling it back to that building. Once that happens, player has just accumulated some resource… It’s allowed for player to build multiple of that building as well as multiple of the resource gathering unit ‘chopper’.
Starcraft II Style
In Starcraft II for player to be able to harvest gas, he/she needs to build a special building on top of that natural resource that’s scattered throughout the map. He/she then needs to assign a X number of “regular” workers (while there is an upper limit) to that building and only then gas harvesting production has started.
As for minerals, player just needs to assign workers to them, and they will automatically haul them back to command center while no special building is required.
If we take a look at Warcraft 3, we see similar fashion to starcraft minerals style:
You just need to assign workers to the gold/trees and they will haul them back to command center. Granted, if you choose to play Night Elves then (if I’m not mistaken) you can build something over the gold mine to increase production, but that’s similar thing to the Starcraft 2 gas…
It’s really similar to the Warcraft 3, with addition of food that you can gather from killing animals and planting crop fields and stuff like that.
Conclusion:
Granted, there are many RTS now that are totally different, some even don’t allow buildings and stuff, but if we look at some of the most successful RTS games we can see the mechanic that should be in place in any generic RTS engine (or framework in this case) to cover all these possibilities…
There should be mainly 3 different ways to handle resources:
3-part blueprint: natural resource spot + necessary building that produces necessary units for harvesting it + that harvesting unit, all linked together (generals)
single blueprint: natural resource that can be “farmed” by regular workers (think trees/gold warcraft3)
modification of 1). natural resource spot that expects building on top of it so that it can be farmed by regular workers (starcraft 2 gas, warcraft 3 night elves gold scenario)
Interest project. I’m sorry if I missed this in this huge thread but what are your plans/ideas for networking? How many units are you planning to support and what technique of replicating will you use.
You missed the style used by Wargame, probably my favorite style personally.
Each faction can build so called command vehicles and drive them into various zones on the map. Having more stationary command vehicles in a zone than the enemy gives you the resources from that zone, whether those are points to buy more units, or insert points for those units to be brought into the map.
Zone Elena in the foreground, for example, has 4 points per tick as shown by the numeric value above the designation. It also has two standard insertion points shown by the white arrows, and one insertion point shown in red where aircraft will come in from.
Hey guys. Nice work so far, and quick, it seems
I’m interested in how networking/multiplayer would be handled ? I am not sure about the capabilities of UE4 in this regard, but I know that there is an RTS starter kit for UDK. My concerns are: how to handle the old 1500-archers problem ( 1500 Archers on a 28.8: Network Programming in Age of Empires and Beyond ). I know that UE has a pretty powerful netcode, but I am not sure if synchronising hundreds, if not thousands game objects in real-time is something it’s designed for.
If anyone could shed some light on this I’d be eternally grateful
Right now I’m just playing around in Unity, but I am considering moving to UE4 to make a prototype if the netcode allows. The reason for that is that I would need to make my own lock-step implementation for Unity and do quite intense desync checks/correction, and I’m hoping that UE4’s networking and replication stuff already handles this (at least to an extent).
UE4 has a pretty good net code. It has built in support for variable and function call replication. Check out these official tutorials:
.youtube.com/?v=TbaOyvWfJE0&list=PLZlv_N0_O1gaG5BW72It4chjhypxIO9ZB&index=38
But it did give me an idea. I will have to expand my little testcase made from that tutorial with a few hundred entities and see how it holds up, and maybe add some weird logic for the hell of it. I’ll let you guys know how it goes, might be vital stuff if this project wants to handle multiplayer.
(On a completely unrelated note, my postcount seems exceptionally tiny … and the join date should be much earlier )
Great idea, should i still start this or is yours almost finished?
With what we are currently doing, most of the functionality is already split from game-specific elements.
I’ve updated my branch with my idea to collaborate.
What i’ve done is add empty child classes based on all of the master classes. These child classes should always be empty in Master. The idea is that you don’t change anything in the master classes but use the child classes for this. When you’re done you commit them to your branch and if everything works, the changes can be transferred to the master classes and pushed to Master. This way when Master is updated anyone can use your branch to see what has changed in Master (because everything you’ve changed should be in the child classes). Updating your working version with the new master will still be difficult and require opening multiple projects at the same time, but at least you know what has changed. And if you’re lucky you can just update your working version to the new Master and everything still works.
Let me know what you guys think
Since the latest update resources can now also be clicked + resources,buildings and characters know when you are hovering your mouse over them.
Up next is implementing teams/factions/whatever you want to call it and relations between them. Any ideas on how relations between teams should be handled? Scale 1-10, an Enum or something else?
I am working on three different camera movement schemes. Two of them are almost complete. However you can work on your-own if you want. Since I am writign the camera as a Pawn, we can switch whenever we want (as long as we all use the same Bindings). However I think we should expose some common functions for the cameras so that they are compatible.
Currently all my camera’s implement and interface with the following functions.
This function will ask the camera to focus the given actor from a particular distance and angle. YOu can tell it to focus instantly or interpolate. Current implementations ignore ‘PrefeeredAngle’ and ‘InterpolationRate’. Internally the camera will try to focus from the given distance, however if there are obstacles or iif it cannot focus the Actor completely, it will adust this.
Similar to previous function, but you can give a Vector reprecenting a location on the map. This location does not need to be on terrain surface, it can be a poijt in air. But the Z value must be below the MaxCameraZ parameter.
@: The resources that we have now (Gold, Wood and Food) might change later when we have a clear idea of what kind of game this will be. I mean…right now we dont have specific art styles or characters or environment. So all of these are kinda placeholders. You can see that for yourself. For example, am using the Dwarf character and some assets from Strategy Game Example by Epic. Obviously we have to change that. We need different characters. So we all are still looking for Character artists, environment artists, modelers etc.
I added Tooltip display and pushed to master branch. Problem is, strings dont accept <br> or /n as line breaks.
@
Right, I undestand that… Was just sharing how + some more mechanics of gathering resources can be added at some point…
“we all are still looking for Character artists, environment artists, modelers etc.” Well I can’t help by hide that Asset Store @ Unity3D (since I’m a big user of Unity3d as well) have some pretty good free models, can we use them? I mean, are models @ Unity3D’s asset store only free for them to be used in Unity3D and no where else?
Just sharing some models: Placeholder infantry Soldier Character Pack
URL:
Buildings Satellite Dish / Communication Tower
URL:
SciFi Base / Defense Tower - FREE Pack 03
URL:
Granted, some of them are really low poly, some of them don’t mix and match at all, but that’s how it goes with free stuff
!! Questions:
What are expected poly counts for: infantry, vehicle, buildings, prop?
Also, there are many RTS models packs available, I wonder if we were to buy them in group, like 20 of us, each donates 2$, how does that affect the license?
Anyways, if you guys don’t find any modelers/model by the 6th of September && if I pass the final exam I’m having then, I’ll do some models for this project, since then I’ll be free and wouldn’t have any more finals… (if I fail however, I do have another one @ 15th September , so finger crossed it doesn’t happen)
Buildings only I should say, I’m not good with organic modeling, well I’m not good with anything, I like to think of myself as a programmer (I’m studying CS), but then again I loved 3D modeling when I was younger and I guess it should be both fun and useful for this project to play with modeling for a bit…
Just give me like a list of buildings (let’s not make it too long for a start), a rough range of poly count per object and a few images of reference, like what style? I personally adore Generals style, something like Generals 2 (that’s now abandoned) but I’ll do with what majority agrees upon.
Let’s all hope I finally ace that final exam, wish me luck!
I’m willing to donate 2$, I’m however afraid of one thing. Like, the author of those models put them in a pack for a price of 60$. I guess if 30 of us all donate 2$ each, and one guy buys it and shares it…what happens to the license then? I guess, it’s not free for all, and I guess it’s not even free for 30 of us… I believe it’s free for commercial use for just that one guy/gal that purchased it… Now, I’m all fine even if it it ends up being free for all for non-commercial use, but I’m not really the kind of a guy to ask licensing-type question… So I guess we better research a bit before donating money, but I’m all for it to create a list of potential donators. I can donate via PayPal/Skrill, guess that should cover 90% of the PP used over the net.
Thank you friend! The final exam is from calculus geometry, vectors, etc… Hopefully will be able to put them to a good use in game dev…
Just pushed to Master, it is working though still not entirely finished. I have an idea how to fix what i want fixed but i just ran out of time for today.
Anyway, a question: What’s up with all the NavMeshes? Just asking, not whining…
Also, what about being able to scroll the camera by moving the mouse to the almost-edge of the screen?
EDIT: Also selection for the building is lacking… Like that circle on the ground, just big enough to cover the house’s floor.
EDIT 2: On a second notice, just to clarify I know that NavMeshes are used for navigation, just was wondering the pros of having thousands of them instead of one -> UE4 newbie , haven’t tackled nav stuff at all…
P.S. I know I’m just typing some suggestions without doing any work, but I’ll start trying to add something once I get used to GitHub and finally get some free time…
I just noticed a problem with scrolling camera using WASD… When you just scroll it in one direction, it goes with a fixed speed… But when you scroll it diagonally, let’s say holding WA at the same time, it goes faster…
That’s problem with calculating a diagonal vector and 's the fix:
I don’t know how the camera behavior is programmed/calculated but if I assume you take directional vector (ie, left <-1, 0, 0> in <x,y,z> given the coordinates on the picture) and you multiply it with a speed variable let’s call it speedCam, then when you calculate the vector C, you need to take into an account its intensity…
So, let’s say we have (in this case) vector B<-1, 0, 0> (left unit vector) and A<0, 1, 0> (up unit vector)… their intensities are 1, sqrt(1)=1… But when we calculate the C vector by simply adding these two C<-1, 1, 0> and its intensity is sqrt(1 + 1) = sqrt(2) >>> 1…
That’s the reason why it moves faster diagonally… You need to normalize it, by dividing it with its intensity… C = 1/|C|<-1, 1, 0> in this particular example C = 1/sqrt(2)<-1, 1, 0> that way the speed should stay fixed no matter what key (and key combos) are pressed…
Seems the final exam I’m preparing isn’t worthless after all…
Building with 1 NavMeshVolume takes a really long time, it seems having multiple overlapping volumes decreases build time (i read that somewhere and it seems true enough).
I never really bothered scaling the circle on the ground for the building, i figured we could do that once we had a proper way of showing selection. Getting it to work was more imporant to me than showing that it works
And on the Camera part, i assume it’s being fixed by our camera expert , whom i might start helping tomorrow.