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 → Cog Language
Cog Language
2001-10-30, 6:11 AM #1
What are the programming language used in cogs?

------------------
-Kiyoto
"A ninja has no fear!"
2001-10-30, 6:14 AM #2
Cog is a variation of C. (or C++, same thing) It's structure and the basics are like C, but as always with video game scripts there's specific functions for the game.
-Hell Raiser
2001-10-30, 11:37 AM #3
COG is it's own programming language, based off of C++. Actually, Hell Raiser, C and C++ ARE different. C is the structered language, and C++ is the object oriented version of C.
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2001-10-30, 2:23 PM #4
Cog is also quite sloppy with its grammers, unlike C.

------------------
http://millennium.massassi.net/ - Millennium
2001-10-30, 3:25 PM #5
i prefer to call COG a 'dialect' of C++ using the structure of C. COG is not nearly as picky as many languages, since caps dont matter (IE: FiRsTtHiNgInViEw = FirstThingInView = FIRSTTHINGINVIEW = etc...)
plus, how expandable some parts can be (though rarely languages have a problem with this)

if((VectorDist(GetThingPos(aiman), GetThingPos(target)) <= 0.45) && (GetThingFlags(target) & 0x200)) SetThingLook(aiman, VectorAdd(VectorSub(GetThingPos(aiman), GetThingPos(target)), VectorScale(down, GetThingVel(aiman))));
2001-10-30, 5:39 PM #6
Hmm sometimes the caps could come in handy if it would read it ...

And of course it can understand all that expanded code , really all it's looking at it if all your code it true ...

e.g

is 2 less than 0.45 and is the thing flags for thing number varible target equal 0x200 ?

If true than SetThingLook(thing, Outcomevector);

Really I don't see how any programming lanauge would have a problem with that ?
2001-10-31, 2:05 AM #7
Some of the older crappy ones had a 256 character limit per line (QBasic comes to mind).
2001-10-31, 4:57 AM #8
Quote:
<font face="Verdana, Arial" size="2">Originally posted by Aglar:
Some of the older crappy ones had a 256 character limit per line (QBasic comes to mind).</font>


Thank God those days are over... Lol [http://forums.massassi.net/html/biggrin.gif]




------------------
Success is the inverse relationship between effort, gain, and loss.
And when the moment is right, I'm gonna fly a kite.
2001-10-31, 10:10 AM #9
Yeah, in class someone made a 2000+ line program, which QBasic refused to save or execute. He ended up having to copy half the code and paste it in a seperate file.
2001-10-31, 12:54 PM #10
I've seen QB programs with more than 256 chars on a line and over 2000 lines..you just need the newest version, QBX 7.1
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2001-10-31, 4:10 PM #11
Well sure, of course it works if you use a recent compiler. I'm talking about the old skool QBasic 1.1

↑ Up to the top!