Author Topic: Campaign  (Read 14356 times)

myles

  • Technician
  • ****
  • Posts: 113
    • View Profile
    • Myles Lambert's Portfolio
Campaign
« on: 8 April 2008, 19:58:10 »
Hey"
I dont know if this has been posted before but with the GAE well on its way I was wondering if people think this would be possible,

The campaign system could be just like launching a scenario, then once youve selcted a campaign you would be taken to a 'lobby' like area. Where you can load old games and see the levels you have completed and ones you are working on. There should be some sort of description of the campaign in the lobby to. Only the maps you have finished and the map you are working on would be shown. Then when you select a map it shows a small discription. At the launch of the scnario you should have the option to play a video file or display some text.

I know it s next to impossible but it would be nice to see,
thanks!
« Last Edit: 1 January 1970, 00:00:00 by myles »

orion

  • Guest
(No subject)
« Reply #1 on: 8 April 2008, 21:18:53 »
Someone has suggested it before and I think it is possible, but campaigns in Glest would take a while to implement (I think) and I think Daniel.Santos is trying to work out all of the bugs in the multi player version of the GAE. Maybe Martino can make a campaign mode in Glest if he's not too busy. I hope he does.
« Last Edit: 1 January 1970, 00:00:00 by orion »

daniel.santos

  • Guest
(No subject)
« Reply #2 on: 8 April 2008, 23:57:38 »
w00t!  Network problems should be fixed now!! :)  I've talked about this a few times, but I haven't flushed out any specs.  I just finished a 12 hour debugging session (I really wanted to get it fixed) so my brain is a little fried right now.
« Last Edit: 1 January 1970, 00:00:00 by daniel.santos »

orion

  • Guest
(No subject)
« Reply #3 on: 9 April 2008, 01:11:04 »
Um Daniel, around what time are you on the irc?
« Last Edit: 1 January 1970, 00:00:00 by orion »

myles

  • Technician
  • ****
  • Posts: 113
    • View Profile
    • Myles Lambert's Portfolio
(No subject)
« Reply #4 on: 10 April 2008, 16:08:53 »
The specs? Well its a little hard for me to say, not knowing how the Glest engine is created. I do not know how the menu system or the saving system has been done.

Ive given some fudamentals but thats all I can real say. I suppose we could keep the XML system. There would be a new folder in the Glest root, like Campaign. Then like units are set out you would have the campaign name on a folder then inside the same name on a XML file. Then in the campaign name folder youd have a Map folder and a Movie folder.

In the campaign name xml file youd have somthing like -

<campaign name value="NAME" />
<campaign summary value="SUMMARY"/>   
<campaign story value="STORY"/>   
<campaign background music path="music/BSOUNDS.OGG" />
<campaign background image path="images/BIMAGE.TGA" />
<campaign progresssave path="saves/psave.save" />
<campaign completion value="COMPLETIONMESSAGE"/>   


<Level1>
         <level name value="NAME" />
         <level summary value="SUMMARY" />
                        <level map value="MAPNAME" />
         <movie path="movies/MOVIE.AVI" />
</Level1>   
<Level2>
         <level name value="NAME" />
         <level summary value="SUMMARY" />
                        <level map value="MAPNAME" />
         <movie path="movies/MOVIE.AVI" />
</Level2>   
<Level3>
         <level name value="NAME" />
         <level summary value="SUMMARY" />
                        <level map value="MAPNAME" />
         <movie path="movies/MOVIE.AVI" />
</Level3>
« Last Edit: 1 January 1970, 00:00:00 by myles »

daniel.santos

  • Guest
(No subject)
« Reply #5 on: 20 April 2008, 18:06:13 »
I like this, it's a good start :(
« Last Edit: 1 January 1970, 00:00:00 by daniel.santos »

ZaggyDad

  • Guest
(No subject)
« Reply #6 on: 20 April 2008, 18:59:27 »
You could make the folder with the campaign files in it have a structure like this:
Code: [Select]
                                                   images
                              unitName.xml  /
scenName.xml                    /        /          units
      |                              unitName________/
scenName  images          /
      |        /                units
scenarios/___________/
      |
campName.xml         images
      |                       /
campaignName____/
     |
campaigns

Edit: Uh-oh, it seems not to look the way I want it to. You can copy it to notepad and change the font to Tahoma, and it aught to look right.

I think the code should be more like this:

Code: [Select]
<campaign>
    <name=""/>
    <summary=""/>
    <story=""/>
    <backgroundMusic=""/>
    <backgroundImage=""/>
    <victoryMessage=""/>

    <scenarios>
        <scenario number="1" fileName="scenario.xml"/>
    </scenarios>
</campaign>

<scenario>
    <name=""/>
    <summary=""/>
    <victory=""/>
    <defeat=""/>
    <map=""/>
    <startingMovie=""/>
    <victoryMovie=""/>
    <music=""/>
    <popLimit value="0"/>
    <weather="rain"/>

    <players>
        <player faction="tech" playerType="human">
            <startingUnits>
                <unit name="unitName" number="4"/>
                <unit name="unitName" posX="1" posY="1"/>
                <unit name="unitName" number="4" posX="4" posY="4"/>
            </startingUnits>
            <startingResources>
                <resource name="food" value="20"/>
                <resource name="stone" value="120"/>
                <resource name="gold" value="100"/>
                <resource name="wood" value="80"/>
            </startingResources>
        </player>
    </players>

    <triggers>
        <trigger name="trigger" type="victory">
            <unitFilter="unitName"/>
            <position x="1" y="1"/>
            <unitDie="unitName"/>
            <createUnit="unitName"/>
        </trigger>

        <trigger name="trigger" type="defeat">
            <unitFilter="unitName"/>
            <position x="1" y="1"/>
            <unitDie="unitName"/>
            <createUnit="unitName"/>
        </trigger>

        <trigger name="trigger" type="createObject">
            <unitFilter="unitName"/>
            <position x="1" y="1"/>
            <unitDie="unitName"/>
            <createUnit="unitName"/>
            <triggerCreate type="unit, tilesetObject" name="unit, tilesetObject" posX="1" posY="1"/>
        </trigger>

        <trigger name="trigger" type="naturalDisaster">
            <unitFilter="unitName"/>
            <position x="1" y="1"/>
            <unitDie="unitName"/>
            <createUnit="unitName"/>
            <time="60.00"/>
            <triggerDisaster type="earthquake, tornado" severity="1-100"/>
        </trigger>

        <trigger name="trigger" type="weather">
            <unitFilter="unitName"/>
            <position x="1" y="1"/>
            <unitDie="unitName"/>
            <createUnit="unitName"/>
            <time="60.00"/>
            <triggerDisaster type="dry, rain, snow" severity="1-100"/>
        </trigger>

        <trigger name="trigger" type="setPop">
            <unitFilter="unitName"/>
            <position x="1" y="1"/>
            <unitDie="unitName"/>
            <createUnit="unitName"/>
            <time="60.00"/>
            <setPop type="add" value="150"/>
        </trigger>
    </triggers>
</scenario>


And btw, campaigns and scenarios should be able to have custom units. (though I'm not sure how you'd make it be in the tech tree in the game when you played the scenario...maybe you could say in the new unit's xml what and how to make it...like make it put in skills (if needed)and commands into the unit that needs to make it. Or add stuff on to commands and skills (Although this is already probably too complicated...). ).

~Zaggy
« Last Edit: 21 April 2008, 19:57:13 by ZaggyDad »

hailstone

  • Local Moderator
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
(No subject)
« Reply #7 on: 21 April 2008, 13:12:21 »
Bos Wars uses Lua for campaigns. Might be able to look at them for examples of how to implement.
« Last Edit: 1 January 1970, 00:00:00 by hailstone »
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

ZaggyDad

  • Guest
(No subject)
« Reply #8 on: 21 April 2008, 19:56:04 »
What's Lua?

And I'd rather use xml no matter what. (Because from my experience with other things, the only thing I really like is xml. :P )

~Zaggy
« Last Edit: 1 January 1970, 00:00:00 by ZaggyDad »

hailstone

  • Local Moderator
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
(No subject)
« Reply #9 on: 21 April 2008, 21:00:49 »
Quote
Lua is a powerful, fast, light-weight, embeddable scripting language.

Lua is fairly popular for games.

Here are parts of files for lvl01 of Bos Wars:

campaign.lua - defines all campaigns
Quote
...
local briefingtext01 =
   "Level 1: The River... "..
   "You're the last remaining free leader. "..
   "Defend your small outpost in this crucial battle. "..
   "Your first enemy, Captain Szarin, knows that "..
   "his victory will spell the end of yours. You "..
   "must lead your war-weary troops "..
   "and stop him at all costs. "
...
campaign_steps = {
  CreateMapStep("campaigns/elites/level01.smp",
      "Build your base. Drive the enemy out. Kill all enemy units.",
      briefingtext01),
...

level01.smp -  Define level 01 Map Presentation

Quote
...
DefinePlayerTypes("person","person")
PresentMap("Campaign_one_Map_one", 2, 128, 128, 2403124691)
DefineMapSetup("campaigns/elites/level01.sms")

level01.sms - Define level 01 Map Setup
Quote
...
-- AI
--Players[1].AiName = "ai-rush"

-- Units
AllowDefaultUnits()

-- Map
Load("maps/campaigns/elites/The_River.map/setup.sms")
« Last Edit: 1 January 1970, 00:00:00 by hailstone »
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

andrewchang

  • Guest
(No subject)
« Reply #10 on: 27 April 2008, 16:50:03 »
you can simply make a pack with edited magic and tech start files, so you have more units, structures and resources when playing. also i think you could just make it so for a scenario you change the "you win" message to some kind of password for the next scenario.
« Last Edit: 1 January 1970, 00:00:00 by andrewchang »

ZaggyDad

  • Guest
(No subject)
« Reply #11 on: 27 April 2008, 20:05:08 »
« Last Edit: 1 January 1970, 00:00:00 by ZaggyDad »

modmaker

  • Guest
(No subject)
« Reply #12 on: 28 April 2008, 22:31:56 »
I hear there's a backstory on glest.  I don't know it myself, but I had been imagining a certain storyline for a campaign mode if anyone ever got the technical details worked out.  Keep me updated on that, and I'll see what I can come up with on the artistic end!
Do I really need to integrate the backstory?  What does everybody think?
« Last Edit: 1 January 1970, 00:00:00 by modmaker »

Superkoop

  • Guest
(No subject)
« Reply #13 on: 28 April 2008, 23:44:34 »
I think integrating the backstory would be a must in the 'official' campaigns. And there should be at least 8 campaigns (not including tutorials that would be made like a campaign) per faction. So there could be 16 campaigns per say total.

And then with additional factions, more campaigns could be made up and integrated into the backstory.  

Personally I think campaigns are what this game really needs, and they would really take it to a new level. Right now, basically the game is just a 'free play' type of game; but with campaigns, there would then be story and goal for playing. (note I don't need campaigns for playing RTS's, but for some people this would really make the game a great deal more enjoyable)

The main things that I think would be need to be integrated is the ability of the game to know when you have reached a 'check point', for example: the first objective is to destroy the north camp, but the second objective is to destroy the army of drake riders that are coming from the south. Now, you can't enable the drake riders to start marching up from the south until you have completed objective 1, and the 3rd objective can't be activated until you have actually destroyed all the drake riders.
So I think the main thing would be to enable certain things to happen only after a certain goal has been met.
Another thing that would be needed, is to have the enemy be able to constantly have troops coming, meaning that they would need an unlimited number of resources to call upon.
And the way you would go from one campaign to the next would be trivial in just unlocking the ability of going to the next campaign when victory of one campaign has been met. The details could be saved in file, of which the inside would be unreadable to humans (prevents cheating) but is easily understood by the computer. [would this simply be an issue of hashing an XML file?]

I would be more than willing to help out with making campaigns when you guys have figured out how exactly they would be made. =)
« Last Edit: 1 January 1970, 00:00:00 by Superkoop »

modmaker

  • Guest
(No subject)
« Reply #14 on: 1 May 2008, 21:45:42 »
I checked out the backstory.  It doesn't really dictate much about what a campaign would look like, except magic vs tech.  I can handle that.  I'll keep developing the artistic elements, if you guys think you can whip the technical stuff into shape.
« Last Edit: 1 January 1970, 00:00:00 by modmaker »

daniel.santos

  • Guest
(No subject)
« Reply #15 on: 3 May 2008, 04:47:49 »
Actually, I'm heavily considering Lua for a large part of this because it makes things flexible.  The only drawback is that you have to hook all of your C++ objects up to the Lua interface (which I haven't learned just yet), but upon doing so, you can do things very quickly with a Lua script that would take a lot more time  & testing if done from C++.  I still have a lot to consider here.
« Last Edit: 1 January 1970, 00:00:00 by daniel.santos »

ZaggyDad

  • Guest
(No subject)
« Reply #16 on: 3 May 2008, 05:14:03 »
*begs for it to be xml*

~Zaggy
« Last Edit: 1 January 1970, 00:00:00 by ZaggyDad »

daniel.santos

  • Guest
(No subject)
« Reply #17 on: 3 May 2008, 06:22:58 »
XML is useless if there isn't code attached to it on the back end.  After exposing the objects of the engine to the Lau layer, what you see in hailstone's examples IS the code.  For situations where there are so many possibilities to account for, it makes no sense to attempt to code them all in C++ and expose them via XML.
« Last Edit: 1 January 1970, 00:00:00 by daniel.santos »

pnrjulius

  • Guest
Fully-featured campaign editor
« Reply #18 on: 25 June 2008, 20:01:40 »
All right, first of all I should say I don't think I could make this change myself---I am a writer, not a programmer---but I know it is possible, because I have seen (proprietary, for-pay) RTS games that do this.

This would be the ideal campaign system: Not a simple linear "mission 1, mission 2, mission 3", but a fully-featured campaign editor that allows the successive mission to be chosen by triggers during gameplay.

Starcraft did it; Warcraft III did it; even that obscure Brazilian game Outlive did it. It can be done.

Even better would be some capability of carrying units from one scenario to the next; but if we can't do that, it's not as important.

Why do I need this? Because I, along with some friends of mine, am trying to design a game. I want to mod an open-source engine, and I need one that's extremely flexible---you'll see why in a moment. Glest has everything I need, except this. If Glest is to be the engine we use, we need the capability to choose scenarios based on in-game events---it's a dealbreaker.

So let me sell you on the idea: The working title is Butterfly, after Lorenz's "butterfly effect." I'm picturing an intro sequence where a little butterfly alights on a leaf, and then gets crushed under the foot of an assault mech.

The game is all about timelines. You start out circa 2040, at the start of a massive nuclear war. The world's population is devastated, and you decide that it is time to use a technology you promised you never would: time travel. You attempt to travel back to 1945 in order to prevent the Cold War, but the time machine malfunctions and sends you further back, to 1813 in the middle of the War of 1812. You decide that since you can't really control the machine, your best bet is to change history completely, prevent the United States from ever becoming a superpower---and that means helping the British win. This, naturally, disrupts the entire course of history, which you are now tasked to repair---or even improve.

Whether and how you complete missions alters the timeline, sometimes subtly, sometimes dramatically. The game plays through five distinct technological eras, with the fifth era being a futuristic era roughly 2040-2100 (hence the mechs). You have the opportunity to move units from one era to another---but the more you do this, the more the timeline grows disrupted, until you have anachronistic universes in which the world is ruled by Iran and cavalry are carrying laser guns.

There is also an optimum future, one in which you manage not only to repair the timeline, but in fact to improve it; you prevent WWII, the Holocaust, the Cold War; you bring about international peace and prosperity; you start the process of interplanetary colonization. That's the only way to really win the game, though there are several other "endings"---with time travel, there is no such thing as an ending!---that you can bring about, including one where things are back to normal except sans nuclear war, and one where you just utterly fail and everyone dies.

Now, does that sound like fun, or what? Glest clearly has the functionality we need to create the units and tech trees; in fact, Blender integration is vastly superior to anything else we've seen, and makes Spring's use of Total Annihilation units look downright childish.

But we need campaign-editor functionality, or our whole project is dead; the whole game depends upon a nonlinear single-player campaign. If I knew how, I'd program it myself; but I don't, so I'm hoping that by giving all of you a nudge you'll find someone who can.
« Last Edit: 1 January 1970, 00:00:00 by pnrjulius »

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
(No subject)
« Reply #19 on: 3 July 2008, 20:53:09 »
But if xml is used, it will be easier to make campaigns, and more people could make them which would mean more available. (Thats better, right?)

And here are some campaign objection ideas:
~Destroy enemy spawner. A enemy spawner could be creating enemies at super speeds. Your goal? Destroy the spawner.

~Kill the king. Have a unit called 'the king' on the opposite side. He could have a army at his command, and you have to kill this king.

~Theives hideaway. You need to steal an object from the foe. (object can vary from magic stones to treasure) and get back alive. To stop people from just wiping the opponent out, you can use foes with 200+ defence. Also, you would have to reduce the foes line of sight, this could lead to some pretty neat strategic 'get out alive' missions!
« Last Edit: 1 January 1970, 00:00:00 by omega »
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

orion

  • Guest
(No subject)
« Reply #20 on: 4 July 2008, 16:53:36 »
Some more ideas...

Destroy a certain building: You need to demolish a certain building to win.
« Last Edit: 1 January 1970, 00:00:00 by orion »

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
(No subject)
« Reply #21 on: 4 July 2008, 22:11:55 »
If we used a building, it would have to be super-powered, or it could be too easy. Suppose an attacking castle that is surrounded by an entire army. Now we're talking!
« Last Edit: 1 January 1970, 00:00:00 by omega »
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

nosoyjoe

  • Guest
(No subject)
« Reply #22 on: 8 July 2008, 23:02:03 »
how bout the campaign be the scenerios and for each scenerio, or lvl of the campain, theres a different techtree, or faction, so taht for each scenerio there are different buildings and resources that the player starts with...and if we do the different faction idea, a building can be added to the faction...
« Last Edit: 1 January 1970, 00:00:00 by nosoyjoe »

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
(No subject)
« Reply #23 on: 9 July 2008, 04:50:06 »
But scenarios are too boring. The point of the campaign is to be new and exciting. Maybe having to kill all of a certain unit or something.
« Last Edit: 1 January 1970, 00:00:00 by omega »
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

nosoyjoe

  • Guest
(No subject)
« Reply #24 on: 9 July 2008, 11:37:56 »
i know and i agree but through scenerios we can create a campaign....like defeating one scenerio unlocks another one, which gives it a campaign feel, and if we have differ factions we can control the starting units for each scenerio...for example, in the glest we have now, you start in magic with a daemon battlemage summoner golem energy source mage tower and 3 intiates...everytime you start with them...so to make scenerios and campaign missions harder...have your enemy start off with more units than you...and i thnk we need two different campaigns...one for tech, one for magic...and we choose what we want...
« Last Edit: 1 January 1970, 00:00:00 by nosoyjoe »