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 → Talk about cog
Talk about cog
2001-06-22, 3:39 AM #1
Cog compared to other programming languages, what do you think of it?

Better than C, you don't need to declare symbols explicitly, they are all global, so no need to worry about local var.

It's quite a good language I think, not as sloppy as perl. It has some strict rules, but communicating with other cogs is quite hard.

Making modules will be quite a pain, it can be done, but still communicating with a cog from various cogs will be king of a pain.

Though it can be easily learnt than perl, it does have quite some limitation.
The array handling really sucks big time in cog, and some incrementation method won't work... (i++, won't work), but still I like it.

You like cog than other programming languages?

------------------
http://millennium.massassi.net/ - Millennium

[This message has been edited by Hideki (edited June 22, 2001).]
2001-06-22, 4:28 AM #2
I like cog, but cog doesn't like me.
2001-06-22, 4:47 AM #3
I like COG a lot - once you get the hang of it, it's relatively easy to make stuff, although some advanced stuff can be tricky. I agree, though - the way cog handles arrays is pretty bad.. if you wanted to loop through all the surfaces in the level, you'd have to define them all first.. ick.
2001-06-22, 6:14 AM #4
i like cog, but i didn't know u could create modules. at least i never thought it was possible. oh and will someone please help me on my last post!
roses are red, violets are blue, I am schizophrenic, and I am too!
2001-06-22, 6:21 AM #5
Cog is probably the simplest C based language I have ever written in. It's nice, and can achieve some great effects. The effects would be greater if we could create our own verbs as LEC was able to do *glares at LEC*.
2001-06-22, 7:10 AM #6
That would be sweet. U could create anything amiginable with ease but we can't create out own verbs. Hey maybe we will be able to in whatever language JO will use.
/me prays please be nice JO programmers
roses are red, violets are blue, I am schizophrenic, and I am too!
2001-06-22, 8:04 AM #7
Say it's a pretty limited module.

You make a new cog with user0 to user7 messages.

Use SendMessageEx to that cog passing only limited 4 paramters to do the same job with the passed var in that cog.

Just had that tried in the new EPME pack.

------------------
http://millennium.massassi.net/ - Millennium

[This message has been edited by Hideki (edited June 22, 2001).]
2001-06-22, 8:36 AM #8
limited very limited yes
roses are red, violets are blue, I am schizophrenic, and I am too!
2001-06-22, 2:38 PM #9
Cog is a very nice lanauge. It's perfect for creating just about anything you want. Although I would like to see some extra verbs in there. Like ...

jkGetSpeech(player);
jkSaveScore(player);
2001-06-25, 12:28 PM #10
I was going through some of the JK cogs, and noticed that stop; is used in place of return; in quite a few cogs. Lordvader was telling me some of the cogs use the older format (slidetest.cog, togldoor.cog, vectortest.cog, wallceltest.cog, you can see that the symbols are done differently, as well as some other things), these older cogs also use stop;. I'm wondering, can stop; still be used in place of return;?
2001-06-25, 2:58 PM #11
If you open up jk.exe and search for that word and if you find it in the particular place, it should work.

Stop may appear in some other places, but if they are lined up with "break, return, etc", it may do it, or you can just write a simple cog and test it.

It may sometimes be a bit interesting to go through the jk.exe [http://forums.massassi.net/html/smile.gif]
Though it's binary, but you can read the verbs in proper words.

------------------
http://millennium.massassi.net/ - Millennium
2001-06-25, 3:08 PM #12
Bah, cog sucks. It's easy enough to learn, but there's just too many limitations. Give me C anyday over cog.

Where are the string or even plain old character functions? There's no custom functions, no file i/o, no multidimensional arrays, the list goes on.

Hideki, you mention that all variables being global is a good thing? With event triggered multiple re-entry code, which is what cog is, you need to keep separate variable names anyway in case any other part of the code overwrites them.

Just my 2c worth.

Raynar

------------------
... the Jedi I admire the most, met up with Darth Maul, now he's toast ...
Rbots - a project to develop a working Bot for Jedi Knight... download the latest development version here
Pagewizard_YKS: "making your own lightsaber doesn't make you a nerd... "
Raynar - the man with a 10.75" ePenis
2001-06-25, 7:25 PM #13
Personally I don't care everything being global, I can always think of unique var.

Better that I don't have to care being them global or local.

I think you coded more than I ever did with cog.


[Add]
Personally I never coded public codes(c, c++ etc) than perl.
Cog was my first, so I may actually just got used to cog in the first place in learning programming.
[/Added]

------------------
http://millennium.massassi.net/ - Millennium

[This message has been edited by Hideki (edited June 25, 2001).]

↑ Up to the top!