Multiple factories

Multiple factories

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Multiple factories

Post by PauloMorfeo »

About this Warzone 2100 thread:
http://taspring.clan-sy.com/phpbb/viewtopic.php?t=3224
I was looking at some buildings and i thought about this possibility:
Is it possible for a factory to build more than one unit at the same time?

I was looking at the building in the center of that image and i imagined it building 4 units at the same time, one in each side.
That king of factories would be very nice!
User avatar
Min3mat
Posts: 3455
Joined: 17 Nov 2004, 20:19

Post by Min3mat »

how would the buildmenu's work?
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post by zwzsg »

I see two ways:

- Someone go code a proper support for fused units! You would build one factory, and it would come by default with another factory fused to it. They would look like one building, but each would have its own selection square and its own buildmenu, and its own buildpad. Health would be somehow shared, as the killing the "main" buildings would also kill the "attached" building. It would be as simple as a couple FBI tag:
FuseUnit1type=ArmLab;//UnitName of the unit to attach
FuseUnit1piece=bigpad;//PieceName where to attach it to
You'd have to synchronise the buildtime of the fused units, too. Or let the fused one appear just when the bearer is done built.


- Or just let Spring use multiple buildpad: When Spring see that QueryBuildInfo(piecenum) doesn't return the same pad, it would understand that it is a multipad unit. The buildmenu would work like that: You order 50 units to be built, Spring build one on pad1, another on pad2, and when the one on pad1 is free again, it builds a third on pad1, etc... Thought I'm not sure it could really work, since there are still a few problem, like, not being able to tell which nano-emitter goes with wich pad, or not closing pad independantly when done building.
User avatar
Min3mat
Posts: 3455
Joined: 17 Nov 2004, 20:19

Post by Min3mat »

i think it would work fo, for example, double vehic factory. however a kbot/vehic factory combo would be weird, how would it know which pad builds which units?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

pads 1,2,3,4 as defiend byt he mdoeller.

If pad 1 is beign sued, use pad 2, if pad 2 and 1 are used, use pad 3, etc.

Or the engien could ask the cob script for which piece is to be used as a build pad, and if the script returns 0 or nothign then that means the ordr should beq ueued cus there're no available pads.
User avatar
Dragon45
Posts: 2883
Joined: 16 Aug 2004, 04:36

Post by Dragon45 »

This would be a godsend for mods.


Imagine an Infantry Boot Camp factory that would crank out troopers in batches of 5 or however many.
User avatar
Guessmyname
Posts: 3301
Joined: 28 Apr 2005, 21:07

Post by Guessmyname »

zwzsg wrote:Someone go code a proper support for fused units!
I really wish this would be done. Then I could just have the Leman Russ chassis be pumped out from a factory, and then have the player choose what turret and side weapons it has. That would make life far easier and the factory build menu's far smaller...
User avatar
Zoombie
Posts: 6149
Joined: 15 Mar 2005, 07:08

Post by Zoombie »

Dragon45 wrote:This would be a godsend for mods.


Imagine an Infantry Boot Camp factory that would crank out troopers in batches of 5 or however many.
Or an aircraft carrier that had ten or so building pads that built aircraft. Then make it move, like zwzsg did
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

we still need multiple air repair pads fixed so that they can use more than one pad.......
User avatar
Neuralize
Posts: 876
Joined: 17 Aug 2004, 23:15

Post by Neuralize »

Terrible Suggestion, but has to be said.
Or, you could upgrade an existing factory to have an extra build pad. The factory would upgrade itself rather than a construction unit. (a la Starcraft.)
User avatar
PauloMorfeo
Posts: 2004
Joined: 15 Dec 2004, 20:53

Post by PauloMorfeo »

Min3mat wrote:how would the buildmenu's work?
Could be:
#1 - Each unit you would assing for building would get built 4 times.
#2 - For each assigned order for the build queue, it would, in order, fill up the building slots.
Or something.
User avatar
SwiftSpear
Classic Community Lead
Posts: 7287
Joined: 12 Aug 2005, 09:29

Post by SwiftSpear »

I think fuseunit is the best option. Plus imagine how cool it would be to have base structures that build onto themselfs, or have large structures that you could shoot the guns off of. Fused units is one of the big deal things that could add tonnes and tonnes of options and possibilites to this game once a beefier scripting system is in place.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Post by Pxtl »

For buildmenus, I'd simply have fused construction buildings be fully seperate units attached to the child. So let's say we have some sort of mega-land-cralwer unit that creates crawling bombs and aircraft -well it just has two factories stuck to it - one is the land factory, one is the air factory.

More complicated things require that the (a) construction buttons can launch script, and (b) script can launch construction jobs. Plus, they have to be able to pass on cancel orders and the like. Very tricky.

Writing a "batch" system for multiple pads all slaved to a single construction facility would be tricky. Far simpler would be to have a single unit that, on completion, splits into multiple units. Wouldn't work for aircraft carriers, but would work fine for "barracks" that make units in batches.
User avatar
Dragon45
Posts: 2883
Joined: 16 Aug 2004, 04:36

Post by Dragon45 »

World Devastators... it could even build more turbos etc onto itself as it killed mroe stuff...


damn.
Post Reply

Return to “Game Development”