Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Interesting COG article
Interesting COG article
2004-11-26, 4:29 AM #1
http://www.gamasutra.com/features/19971003/huebner_01.htm
Interesting article about how they made the COG scripting language for JK, written by one of the programmers. You need an account to read it, but it's free to sign up. Worth a read for you fellow cog-heads. I found this when checking out gamedev.net for some physics tutorials for a project I'm wanting to try out
</sarcasm>
<Anovis> mmmm I wanna lick your wet, Mentis.
__________
2004-11-26, 9:44 AM #2
Not as informative as Id hoped, but still quite interesting...
And when the moment is right, I'm gonna fly a kite.
2004-11-26, 2:38 PM #3
Yeah, not actually informative at all really, but definetely an interesting read.

Once I read the part about the raising water in JK, it got me thinking about it and I think I know a way to do it.
2d Transparent water textured 3do (water surface)
Set player flags to swimming
In a loop, raise the Z vector incrementially that is the max elevation allowed for the player to keep his swimming flags. Raise the water 3do with it, and set player dynamic tint to a watery one (granted you wont get the water distortion effect, but I've seen a hack that gave those flags but Im not sure how stable that'd be). If player elevation == max-z-vector && velocity > whatever it would take to breach the surface, then apply enough force to simulate a hop out of the water. Send the trigger to kyle.cog to make the bubbles. VOILA!
</sarcasm>
<Anovis> mmmm I wanna lick your wet, Mentis.
__________
2004-11-27, 1:52 AM #4
Quite an interesting read for me. I'm always up for learning how JK works. :D

I also found this facinating:

Quote:
One aspect of the scripting system that proved critical for our project was the integration of the scripts and the level editor. The level editor not only allows the designer to place scripts into a level, but also ensures that the various links in the script are correctly assigned and remain correctly linked as the level changes. When a designer places a script resource into a level, the editor scans the header of the script to determine what variables can be assigned externally and places a graphic representation of the script resource in the level. This icon has a spatial location in the level, although its location isn't important to the script. Typically, designers place scripts near the objects to which they link. Once the script is placed, the designer can bring up the property dialog for that script and view and change its assignments. If the script contains links to other things or surfaces, these are assigned by clicking on the correct type of item in the level and clicking a link button. Links between COG scripts and world entities are shown graphically in the editor by connecting them with lines. If the script contains resources such as sounds or bitmaps, a pull-down menu displays the possible choices.


This would be a handy feature for JED. :o

And on the water rising thing, I coulda swore LEC wrote a cog themselves that had a rising water 3do and several small sectors. The sectors were made water in order, the player got pushed up a bit each time, and the water 3do moved. Maybe that was a cog post long ago... I don't know. But that last paragraph in the article (Assuming I read it right) basically says that the level designer got rising water into the level, and no one could figure out how he did it. (assuming this is true) It just goes to show how flexible the cog language is. So a function wasn't programmed in, big deal, you can always work around it.

And also it gave me a greater appriciation for cog. It made me realize how efficient cog is in terms of execution of the scripts along with JKs code. So many things are going on that were programmed externally and there's nary a hitch in the engine. Granted a pulse will only execute as many times per second as FPS you're getting, but a while loop will take over all execution of JK.exe :)
-Hell Raiser
2004-11-27, 7:02 AM #5
I know 100% sure that there is a rising water thing in Dark Forces I, in the Anoat Sewers level. I always wondered why there wasn't something like that in JK.
ORJ / My Level: ORJ Temple Tournament I
2004-11-27, 8:48 AM #6
What are you guys talking about? I've seen this whole "rising water level" deal done numerous times before! Have you ever played "Deep" from the Massassi Level Pack 2? That had a room that you went into where you hit a button, the doors behind you closed, the water rose, then the ocean doors opened and you swam out.

In Wolfy's latest Life of a Merchant level, he also had a section like tihs in the sewers.

Even in the original JK game, on the fourth level (the one where you escape from Morgan Katarn's house, with lots of Tuskens), I believe there was a section where you dove hundreds of feet down into the water, defeated a jelly fish, and then went into a chamber that did the same thing mentioned above.

Am I completely misunderstanding what's being said here (I haven't read the article), or have you people really just not played (remembered) these levels?

:confused:
My JK Level Design | 2005 JK Hub Level Pack (Plexus) | Massassi Levels
2004-11-27, 1:24 PM #7
I vote for the first option. And unfortunately I'm too lazy to sign up on gamasutra (anew). Gonna play some nethack instead.
Hail COG!
"Häb Pfrässe, süsch chlepfts!" - The coolest language in the world (besides Cherokee)
2004-11-27, 5:59 PM #8
Quote:
Originally posted by Daft_Vader
I've seen this whole "rising water level" deal done numerous times before! Have you ever played "Deep" from the Massassi Level Pack 2? That had a room that you went into where you hit a button, the doors behind you closed, the water rose, then the ocean doors opened and you swam out.

Even in the original JK game, on the fourth level (the one where you escape from Morgan Katarn's house, with lots of Tuskens), I believe there was a section where you dove hundreds of feet down into the water, defeated a jelly fish, and then went into a chamber that did the same thing mentioned above.

Am I completely misunderstanding what's being said here (I haven't read the article), or have you people really just not played (remembered) these levels?

:confused:

Ad 1) Deep! Hell yeah, totally forgotten about that. Awesome level. The only reason why i forgot about that, is because I hardly meet any people who still have those levelpacks. Sounds unbelievable, but its just that way. Still a lot of 56k-ers out there.

Ad2) Yes, the house, now that you mention it. Never was one of my favourite levels. I'm the guy who makes a save at the start of every level, and then after finishing the game, I'll replay my favourite levels over and over (in my case: the Nar Shaddaa levels, the fuel station (There's the rising fuel by the way!!!) and the Valley of the Jedi. Some I didn't like at first, I think Ive only played two or three times. Such as 'Back Home on Sulon'. (The house)
ORJ / My Level: ORJ Temple Tournament I
2004-11-28, 7:47 PM #9
Raising water in JK? Uh, level four.
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2004-12-01, 4:28 AM #10
Right. The water canals behind the house. I remember now.
ORJ / My Level: ORJ Temple Tournament I

↑ Up to the top!