Game Development Community

Advanced Resource/Supply manager available!

by Stephen Zepp · in RTS Starter Kit · 11/20/2004 (4:09 pm) · 28 replies

EDIT: This resource is now outdated, and is no longer available. It has been enhanced and included within the Community Resource-Building-Villager Mod.

I've built upon the foundation Jared made, and included art (2-d icons) that John McGlamory made to produce as "drop in and play" resource manager for the RTS Starter Kit.

It has been tested against Stock RTS-SK in single player mode, as well as dedicated server-client mode.

From the readme.txt:

Summary:

This resource is designed to encapsulate and abstract resource management, including:
--Client non-authoritative display and inventory tracking
(resources-client.cs)
--Server authoritative inventory tracking and modification
--functionality to:
---assign a resource "cost" to an action the player can perform
(see building.cs modifications for the example)
----validate the cost, and return either an ALLOW or DENY message to the action, including information about why it was denied
(resources-server.cs)
----update the server's inventory, and inform the client of the updates
---allow server objects to add supplies to a player's resource store
---demonstrate one (not very elegant) method to add resources over time to a player's resource store
(see building.cs modifications for the example)
[/quote]

Download File: RTS-SKResourceManagement.zip

The restricted login is : GGRTS
password : ggrocks

PLEASE do not distribute this login to anyone outside of this private forum.

Thanks to:
Jared for the initial functionality.
John for the icons, and installation testing, and temporary hosting.
Addison for additional installation testing.

NOTE: There is one known issue in dedicated server-client mode, and possibly multiplayer host mode: When a client exits the game but the server stays active, there may be hanging scheduled auto-update supply events. These events seem to continue to reschedule even though the underlying objects are gone. I do not plan on following through on this last bug myself, since it is only for the demo (not the underlying functionality per se), but would welcome any ideas on how to fix it!
Page«First 1 2 Next»
#21
06/06/2005 (8:22 am)
Sometimes user interfaces can be -too- intuitive!

Just select a peon and right click on any resource site (big rock--stone, little rock--gold, tree--wood).

The peon(s) will go to the object, harvest for a bit, and then find the nearest building that will store that resource, and move to drop it off, and then repeat. Note that it should also re-detect the closest dropoff site if you build a new drop off building closer. The dropoff/storage building configs are set in server side building.cs
#22
06/06/2005 (8:34 am)
Hmmm - that's what i tried. thought it was the most intuitive thing to do - but the peon just moves to the location and stands there =) i'm trying to figure out why at the moment by looking for the file where "right-click on resource = harvest" stuff is defined.
#23
06/06/2005 (8:37 am)
Look in the server side player.cs code for the various script functions that handle that aspect. You can uncomment some of the informational echos and get a feel for what is going on. First guess is that either it's not recognizing your objects as resources, or it cannot find a spot to drop off what it has in it's hands, so it harvests for a bit, and then idles.
#24
06/06/2005 (8:58 am)
Doh - i had every building but the town centre for them to drop it off. *head nudge* =)
#25
11/03/2005 (5:43 pm)
@Stephen did you ever solve Rutgers problem? If so what was the fix? I'm getting the exact same crash, in the exact same place.
#26
11/03/2005 (9:25 pm)
Ok, I managed to fix my error by running a ddd on the code and watching it crash when the PlayGUI was being loaded.
So I removed the code from PlayGUI.gui and it works.
I then tried again, but made doubly sure I understood correctly.
I am not crashing anymore, however I am a bit concerned, since I see nothing new in the PlayGUI... Should I be seeing anything different?
#27
11/03/2005 (9:40 pm)
Doh!, ok I see the UI now, I was running in 800x600 mode, and needed to be in 1024x768. Ok, anyways now I'm off to play! ;)

Ok, now I'm really confused here, there seems to be 2 distinct and seperate resources here? Which link is the one I need to integrate with a stock RTS, for the most functionality?

Thanks in advance!
#28
11/04/2005 (11:21 am)
Nevermind, I didn't read everything properly last night, this resource is dead and the Community Villager Mod is the correct one now.
Page«First 1 2 Next»