Vous êtes sur la page 1sur 5

MEH_Tutorial_02_Gravity_Router Michael E. Harris mharris@fgi.

net unlimited 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:\Program Files\Croteam\Serious Sam ...."), making sure to use directory/folder option to assure that their directory/file contents get automatically 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 is contained in the editor's help file), several times, to develop basic familiarity and proficiency with the editor. Keep a copy of the editor keyboard shortcuts and the basic room tutorial (and other tutorial/reference material) handy, both in hardcopy 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, to prove out concepts that you are interested in employing. The editor lends itself to this superbly. Given that no compilation of levels is required and that one can quickly launch a test of the level currently being edited, from within the editor, 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.) Save often, using a consistent naming scheme. I tend to embed a date/time stamp in my file names, in the format of YYMMDDNN, where YY is two digit year, MM is two digit month, DD is two digit day and NN is a sequentially assigned 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/module versioning/management product. Although this gravity router tutorial is complete and self contained in itself; if you have not already done so, it is recommended that you first work through the earlier simpler MEH_Tutorial_01_Gravity_Marker tutorial. The use of gravity 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, through the use of multiple gravity markers that are controlled (limited to their being a single active gravity marker at a time within 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 via setting up a gravity router and switches, so that, based on which switch we use, we can run all the way around either the outer area/rim of the wheel or its hub/axle, literally turning head over heels as we go around it. And have an opponent chase us, doing the same. This gravity markers/gravity router/switches setup is inspired by the gravity markers/router/switches/etc. combo located in the hidden room under the large obelisk (tower/monument) located at the center of the large (maltese?) cross shaped pool of water in the Karnak level. Note that the simpler cylindrical type gravity marker and "sideways U" tunnel sector located above the hidden room are unrelated and were the inspiration for the earlier MEH_Tutorial_01_Gravity_Marker tutorial. The "head in to center, feet out" scenario is inspired by the drum centrifuges from the movies 2001: A Space Oddyssey and Mission To Mars. If you have attempted this in Quake or Unreal, you're going to be astounded by how fast 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 the well 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/unhidden switch 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

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 0 Select/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 0 Add (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 actual lighting 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 place an 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-directionl red arrow, with a blue arrow pointing away from each apple....sort of a "Z"-like icon), right click in the entities menu/pallette, select <Insert Items>, navigate to "c:program files\croteam\serious sam .....\classes" and open the GravityRouter.ecl entity, 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 the gravity 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" gravity marker by setting its properties as: FallOff 50 (default) HotSpot 50 (default) Torus Radius 100 (default) Name Gravity Marker - Feet In Strength 1 (results in "feet in to center, head out") Type Cylindrical Target Gravity Router for Wheel

Place a second gravity marker on the wheel's axis of rotation, just to the other side of the gravity router, use 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 "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 Cylindrical Target 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 of the 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 anywhere on one of the wheel's surfaces (all should turn green), and hit Q (tools info) and assign the now available for use gravity router 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 the way 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 to center, 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) on the wall behind the enemy at the end of the hub/axle, at about the enemy's chest height so as to assure reachability when the player is standing at about the enemy's location, "feet in to center, head out", on the center hub/axle. Its orientation is irrelevant, 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 assure reachability when the player is standing at about the player start's location, "head in to center, feet out", on the rim (what currently appears in the editor to be the ceiling). Its orientation is irrelevant, 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 OFF event type ON event type ON-OFF Target Type

Switch for Feet In Trigger event Trigger event Gravity Marker - Feet In 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 down on the rim above where they were on the hub/axle and copy/paste a couple more of them, tip them at 45 and -45 degrees and position them on adjacent rim floor panels/polygons (not that they are really being held there initially by gravity, but the 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 effect on multiple enemies. Want to try a spherical variation of this? Repeat the exercise with spherical entities and "central" gravity (instead of cylindrical 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 may prove common to match them, so as to avoid weird effects, including nausea for those who cannot acclimate to nonflatland 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 to astronauts/cosmonauts, its nothing to be ashamed of). Then again, weird gravity vs. world/architecture conflicts/contrasts could prove interesting. History Historical Footnote (Ta Da!!!!): I think Croteam gets credit for opening a new door of perception and a new world of architecture, by virtue of being the first to offer a robust, affordable and readily available non-flatland/3D/multi-gravity world builder/simulator. Business Hey NASA, other space agencies/organizations/businesses and universities! Buy several thousand copies of Serious Sam when 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 cost effective PR material that you've ever sent out (just make sure you stay legit in terms of number of copies purchased/licensed from Croteam/ODI!....the fact that you're government or education doesn't exempt you from rewarding Croteam for their initiative and risk taking).

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 $20 in 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. As an example, a "hypercube-like" world consisting of a large cubic volume of space, with diagonal struts running from its corners 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 and enemy having the ability to walk on and between the outer surfaces of the hollow cube ("walk on cube"), on and around the surfaces of the struts, between the outer and inner surfaces of the hollow cube and the central sphere via the struts, on and 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 pillar room in the compatability test, which not only cause things to happen when "used", but which also slide into/out of their wall 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 around worlds as/whenever needed yet again, so as to not have to manually build such a set every time needed. Naming implications?

And we're just getting started, folks. The water's great and there is room for all, regardless of tutorial topic, previous coverage or author expertise. Multiple topics on the same topic are worthwile, as they provide multiple perspectives on and approaches to the same subject (just remember to give credit when credit is due). ........in that vein.....thanks Croteam for the massive advice and massive patience that went into my getting started with the editor and multigravity.......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 mharris@fgi.net.

Vous aimerez peut-être aussi