meh tutorial 02 gravity router

Upload: juvenalpt

Post on 07-Apr-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/6/2019 MEH Tutorial 02 Gravity Router

    1/5

    MEH_Tutorial_02_Gravity_RouterMichael E. Harris [email protected] rights to Serious Sam developer Croteam, all other rights reserved

    A Few Opening Words

    If you have not already done so, locate the .gro files that came with and were installed by Serious Sam and the software

    development kit. Rename them to .zip. Then unzip them to the Serious Sam directory (currently "C:\ProgramFiles\Croteam\Serious Sam ...."), making sure to use directory/folder option to assure that their directory/file contents getautomatically dispersed to the appropriate root or subdirectory locations within it. This provides numerous textures,entities and enemies that can then be utilized within the editor.

    If you have not already done so, work through the Navigation and Basic Room tutorials that accompanied the editor (it iscontained in the editor's help file), several times, to develop basic familiarity and proficiency with the editor. Keep acopy of the editor keyboard shortcuts and the basic room tutorial (and other tutorial/reference material) handy, both inhardcopy and online help form. Also load up and explore and study the compatability test's Karnak level.

    Before attempting major projects, do these and other tutorials and then do modest high risk low cost experimentation, toprove out concepts that you are interested in employing. The editor lends itself to this superbly. Given that nocompilation of levels is required and that one can quickly launch a test of the level currently being edited, from within theeditor, one can rapidly and repeatedly modify and test, modify and test, modify and test........ (Often, will be faster to try

    and test, than to bug Croteam and others with questions...... save asking for the big original questions/problems.) Saveoften, using a consistent naming scheme. I tend to embed a date/time stamp in my file names, in the format ofYYMMDDNN, where YY is two digit year, MM is two digit month, DD is two digit day and NN is a sequentiallyassigned two digit number that I restart at 01 each day and increment with each successive save during that day.Alternately, it appears that the editor can be integrated with using the SafeSource (?) library/moduleversioning/management product.

    Although this gravity router tutorial is complete and self contained in itself; if you have not already done so, it isrecommended that you first work through the earlier simpler MEH_Tutorial_01_Gravity_Marker tutorial. The use ofgravity routers builds on the use of gravity markers.

    Gravity Router

    This tutorial focuses on providing a given volume of space (sector) of a Serious world with changeable gravity, throughthe use of multiple gravity markers that are controlled (limited to their being a single active gravity marker at a timewithin the sector) by a gravity router and triggered by switches..

    Specifically, we are going to set up a hollow wheel and axle, then set up two contrary cylindrical gravity markers (one for"feet in to center and head out", the other for "head in to center and feet out") and control (select between) them viasetting up a gravity router and switches, so that, based on which switch we use, we can run all the way around either theouter area/rim of the wheel or its hub/axle, literally turning head over heels as we go around it. And have an opponentchase us, doing the same.

    This gravity markers/gravity router/switches setup is inspired by the gravity markers/router/switches/etc. combo locatedin the hidden room under the large obelisk (tower/monument) located at the center of the large (maltese?) cross shapedpool of water in the Karnak level. Note that the simpler cylindrical type gravity marker and "sideways U" tunnel sectorlocated above the hidden room are unrelated and were the inspiration for the earlier MEH_Tutorial_01_Gravity_Markertutorial. The "head in to center, feet out" scenario is inspired by the drum centrifuges from the movies 2001: A SpaceOddyssey and Mission To Mars. If you have attempted this in Quake or Unreal, you're going to be astounded by howfast and easy this is.

    Note that this tutorial is going to use plain (iconic) switches, rather than buttons that move in/out when used, because thewell done combination of switches, triggers and buttons involved is complex enough to merit a tutorial(s) of their own(and to be honest, I have yet to figure them out). For this tutorial, we're just going to leave the undisguised/unhiddenswitch icons hanging in plain sight on the wall, for easy location and use by the player.

    Let's get started. The first part is going to bear a lot of similarity to the earlier MEH_Tutorial_01_Gravity_Marker

  • 8/6/2019 MEH Tutorial 02 Gravity Router

    2/5

    tutorial.

    File | New (start a new level) and File | Save As (establish a file name).

    Toggle shadows off (H), so that you can see what you are doing until you light the world.

    Create the basic world

    Subtract a horizontally oriented cylinder (the wheel) out of the solid universe:Create Conus Primitive (via Num Enter or red toolbar menu button)

    Primitives W 32, L 32, H 32, BaseVtx 8, Room (select)Position X 0, Y 0, Z 0, Heading 270, Pitch 270, Banking 0Select/assign a texture

    (I used Textures\Ages\Egypt\Walls\Karnak\Wall06.tex)Add (via Num +).

    Add a smaller diameter horizontally oriented cylinder (the central hub/axle):Create Conus Primitive (via Num Enter or red toolbar menu button)

    Primitives W 16, L 16, H 32, BaseVtx 8, not Room (de-select)Position X 0, Y 0, Z 0, Heading 270, Pitch 270, Banking 0Add (via Num +)

    Light the interior of the wheel. In the process of doing so, toggle shadows on (H), so that you can see what the actuallighting will look like.

    You may want to adust the textures a bit.

    Place a player marker on top of the central hub/axle, at one end, oriented so that its arrow faces the other end. Then placean enemy at the other end of the hub/axle, oriented to face the player marker.

    You may want to test and save at this point.

    Now, the good stuff.

    Set up the gravity router (part one of two)

    If no Gravity Router icon is present in the entities palette (would look like two smaller apples connected by a bi-directionlred arrow, with a blue arrow pointing away from each apple....sort of a "Z"-like icon), right click in the entitiesmenu/pallette,select , navigate to "c:program files\croteam\serious sam .....\classes" and open the GravityRouter.eclentity, which then appears in the menu/pallette.

    Place a gravity router at the center of the wheel (it's orientation doesn't matter) and set its name: Name Gravity Router for Wheel

    Set up the two gravity markers

    Place a gravity marker (looks like a red apple with a blue arrow) on the wheel's axis of rotation, just to one side of thegravity router, using the tab and/or arrow keys or Q (tools info) to rotate/orient it to Heading 270, Pitch 270, Banking 0,so that it's arrow points along the wheel's axle (axis of rotation) and make it the "feet in to center, head out" gravitymarker by setting its properties as:

    FallOff 50 (default)HotSpot 50 (default)Torus Radius 100 (default)Name Gravity Marker - Feet InStrength 1 (results in "feet in to center, head out")Type CylindricalTarget Gravity Router for Wheel

  • 8/6/2019 MEH Tutorial 02 Gravity Router

    3/5

    Place a second gravity marker on the wheel's axis of rotation, just to the other side of the gravity router, use the taband/or arrow keys or Q (tools info) to rotate/orient it to Heading 270, Pitch 270, Banking 0, so that it's arrow points alongthe wheel's axle (axis of rotation) and make it the "head in to center, feet out" gravity marker by setting its properties as:

    FallOff 50 (default)HotSpot 50 (default)Torus Radius 100 (default)Name Gravity Marker - Head In

    Strength -1 (results in "head in to center, feet out")Type CylindricalTarget Gravity Router for Wheel

    Set up the gravity router (part two of two)

    Default the gravity router's initial/default/startup gravity selection to "feet in", by selecting it and setting its:Target Gravity Marker - Feet In

    Select the world (world base entity), by hitting E to assure that you are in entity mode and clicking anywhere on one ofthe wheel's surfaces (all should turn blue) and make the gravity router available for use within the world:

    Gravity 0 Gravity Router for Wheel

    Select the wheel sector (the empty volume of space within the wheel), by hitting S for sector mode and clicking anywhereon one of the wheel's surfaces (all should turn green), and hit Q (tools info) and assign the now available for use gravityrouter to it:

    Force Gravity Router for Wheel

    Test it (part one of two)

    Test, by hitting T, playing and seeing how the "feet in" gravity works (you and the enemy should be able to run all theway around the central hub/axle, i.e. "feet in to center, head out"), then hitting Esc to return to the editor.

    If gravity isn't working properly, double check the above settings

    Save.

    Set up the switches

    Now, let's get the switches added and working, so that the player can use them to reverse gravity between "feet in tocenter, head out" and "head in to center, feet out" as desired.

    Place a switch entity (in the entity palette, appears like a regular on/off wall switch, with a white plate and red switch) onthe wall behind the enemy at the end of the hub/axle, at about the enemy's chest height so as to assure reachability whenthe player is standing at about the enemy's location, "feet in to center, head out", on the center hub/axle. Its orientation isirrelevant, other than it seems to need to be visible to the player, but may be adjusted for visibility and appearance sake.Set its properties:

    Colliding (select)Name Switch for Head In (name may not be needed, but supplying it may be good practice)OFF event type Trigger event (?, may be relevant to associating trigger and button with switch)ON event type Trigger event (?, ditto)ON-OFF Target Gravity Marker - Head In (the entity targeted whenever the switch is used,

    regardless of on-to-off or off-to-on)Type On/Off

    Place a second switch high on the wall behind the player start, about chest height from the ceiling/rim, so as to assurereachability when the player is standing at about the player start's location, "head in to center, feet out", on the rim (whatcurrently appears in the editor to be the ceiling). Its orientation is irrelevant, other than it seems to need to be visible tothe player, but may be adjusted for visibility and appearance sake. Set its properties:

    Colliding (select)

  • 8/6/2019 MEH Tutorial 02 Gravity Router

    4/5

    Name Switch for Feet InOFF event type Trigger eventON event type Trigger eventON-OFF Target Gravity Marker - Feet InType On/Off

    Test it (part two of two)

    Test, by:- hitting T- you and the enemy should be able to run all the way around the central hub/axle- "use" the switch reachable from the hub/axle....... you and the enemy should drop/reorient to the rim- run all the way around the rim of the wheel- "use" the switch reachable from the rim...... you and the enemy should drop/reorient to the hub/axle- etc. etc. etc until finished testing.- hitting Esc to return to the editor.

    If the switchable gravity isn't working, recheck the settings above.

    That's it!

    Don't forget to save

    Elaborations and variations

    For a bit more fun and sense of the effect of switchable gravity, you might flip the enemy and locate them upside downon the rim above where they were on the hub/axle and copy/paste a couple more of them, tip them at 45 and -45 degreesand position them on adjacent rim floor panels/polygons (not that they are really being held there initially by gravity, butthe starting effect is the same) so that when test/play starts, you can see them fall to/reorient to hub/axle and then,provided you can survive to get to the switch reachable from the hub/axle, you can "use" the switch and observe the effecton multiple enemies.

    Want to try a spherical variation of this? Repeat the exercise with spherical entities and "central" gravity (instead ofcylindrical entitites and cylindrical gravity).

    There is no requirement that gravity be matched to shape.....it just proves convenient to do so for these exercises. It mayprove common to match them, so as to avoid weird effects, including nausea for those who cannot acclimate to non-flatland type worlds and architecture (hey, us truly 3D non-flatlander Serious folks are tough....... we can take it! .........uh,excuse me while I grab a barf bag..... there... all better now..... just need a while to acclimate..... hey if it happens toastronauts/cosmonauts, its nothing to be ashamed of). Then again, weird gravity vs. world/architecture conflicts/contrastscould prove interesting.

    History

    Historical Footnote (Ta Da!!!!): I think Croteam gets credit for opening a new door of perception and a new world ofarchitecture, by virtue of being the first to offer a robust, affordable and readily available non-flatland/3D/multi-gravityworld builder/simulator.

    Business

    Hey NASA, other space agencies/organizations/businesses and universities! Buy several thousand copies of Serious Samwhen it comes out. Most cost effective N x $20 of research money you'll ever spend! For that matter, buy a lot more,because if bundled with custom worlds dealing with your specialty, they'll be among the most popular and most costeffective PR material that you've ever sent out (just make sure you stay legit in terms of number of copiespurchased/licensed from Croteam/ODI!....the fact that you're government or education doesn't exempt you fromrewarding Croteam for their initiative and risk taking).

  • 8/6/2019 MEH Tutorial 02 Gravity Router

    5/5

    And for those of you out there who are tempted to pirate it, shame on you and don't. If you're not prepared to invest $20in it, why would you waste your time with it? Show some respect for Croteam, for those who pay for it and for yourself(you can't rationalize stealing it on the basis of their charging a high price now, can you? :) )

    Future topics

    Multigravity:

    Carving a world up into multiple volumes of space (sectors) and assigning each its own different/appropriate gravity. Asan example, a "hypercube-like" world consisting of a large cubic volume of space, with diagonal struts running from itscorners through the center, with a smaller hollow cube (with openings in each corner) suspended/centered on those struts,with an even smaller sphere centered within that smaller hollow cube where the struts intersect.........with the player andenemy having the ability to walk on and between the outer surfaces of the hollow cube ("walk on cube"), on and aroundthe surfaces of the struts, between the outer and inner surfaces of the hollow cube and the central sphere via the struts, onand between the inner surfaces surfaces of the cube ("walk on walls") and all over the central sphere ("walk on sphere").

    Buttons/triggers/switches:Constructing properly appearing/behaving animated buttons/switches/triggers, such as the pillar/wall buttons in the pillarroom in the compatability test, which not only cause things to happen when "used", but which also slide into/out of theirwall recesses when activated

    Mass production of buttons/triggers/switches and other....:

    Prototyping of button/switch/trigger sets in a fashion that lends itself to subsequent cloning (?) or rubber stamping aroundworlds as/whenever needed yet again, so as to not have to manually build such a set every time needed. Namingimplications?

    And we're just getting started, folks. The water's great and there is room for all, regardless of tutorial topic, previouscoverage or author expertise. Multiple topics on the same topic are worthwile, as they provide multiple perspectives onand approaches to the same subject (just remember to give credit when credit is due). ........in that vein.....thanksCroteam for the massive advice and massive patience that went into my getting started with the editor andmultigravity.......credit is all yours.

    Don't let anyone put you off. Be brave.

    Jump in!

    Don't forget

    Have fun. But don't forget to have a life. Take care of yourself, your family and your friends.

    Let me know what you think

    Please send suggestions, comments, criticisms, questions, etc. to me either on the forum(s) or at [email protected].