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 Vm
Cog Vm
2005-06-27, 6:19 AM #1
UPDATE: To download the VM, visit the COG Virtual Machine hub project page.

...version 0.000000000000000000001 pre-alpha.

I believe it supports all COG grammar constructs. 7,597 lines of code written mostly in the span of 2 nights and fueled with the power of Dr. Pepper. It automatically calls SendMessage(startup) and then exits. If you find something that doesn't work, I implore you to post the COG and paste what error message (if any) the VM gives you.

Currently it supports the following COGLIB functions:

Code:
void jkStringClear();
void jkStringConcatAsciiString(string_literal);
void jkStringConcatFlex(flex);
void jkStringConcatFormattedFlex(flex, string_literal);
void jkStringConcatFormattedInt(int, string_literal);
void jkStringConcatInt(int);
void jkStringConcatSpace();
void jkStringOutput();
void Print(string_literal);
void PrintFlex(flex);
void PrintInt(int);


New verbs can be added with one line of code, but virtually all of them are useless without the JK engine sitting behind it.
Code:
COG::CogLib::InjectLibraryFunction("jkStringConcatFormattedFlex", 2, &jkStringConcatFormattedFlex);


For now I'm only able to provide a Linux x86 ELF binary, but I'll port it as soon as I can so the majority of you can (hopefully) test it out for me.
I do not take responsibility if using this program causes any damage
2005-06-27, 3:32 PM #2
Very interesting.

I will test it sometime this weekend.

:)
2005-06-27, 4:58 PM #3
Very nice, but a few points...

1) JK is case insensitive, your VM is not. I realize you probably realize this, but I figure Id bring it up anyway. ;)
2) There should be another newline printed out just before the VM closes.

3) Any chance of my getting the source to this? Id love to poke around in it...
And when the moment is right, I'm gonna fly a kite.
2005-06-27, 5:12 PM #4
Old habits die hard. I'll fix it for the release with the Windows port.

I'm going to release all of the source code under GPL once I'm confident I've worked out as many bugs as possible.
2005-06-27, 6:07 PM #5
I was bored....

Now even the Windows users can try it out... ;)
And when the moment is right, I'm gonna fly a kite.
2005-06-27, 6:34 PM #6
I uploaded version 0.02 to the hub.

Improvements:
- Win32 port available
- Added for(expression; expression;)
- No longer case-sensitive

You can grab both the Linux and Windows binaries here.
2005-06-27, 8:02 PM #7
Version 0.03 is up, it fixes several issues (including a rather serious issue with the stack). GBK should be updating his version. Seriously.
2005-06-29, 2:08 PM #8
Wow, great job.

If it only existed while I was still editing...

Should save so much time, when launching jk seeing nothing gets printed, just because of a single sytanx error and THE LIKES...
2005-06-29, 3:36 PM #9
Quote:
Originally posted by Hideki
If it only existed while I was still editing...

Should save so much time, when launching jk seeing nothing gets printed, just because of a single sytanx error and THE LIKES...

Jon's COG VM is designed to eventually be used in a Sith engine clone. I remember Jon showing me a whitepaper he wrote up describing the framework of his engine, it was pretty solid. Unfortauntely something like this would have probably been shut down by LEC if it were made years ago. I'd say 2001 is the earliest at which you could get away with it. The old, old LEC rocked, the old LEC sucked, and the new LEC rocks and embraces the modding community.
Bassoon, n. A brazen instrument into which a fool blows out his brains.
2005-06-29, 8:29 PM #10
Very cool!
2005-06-29, 10:22 PM #11
Oh, cool, that you guys even making a sith engine clone. I was just talking even just the VM existed, it would have saved a lot of time on coggers. That won't be a problem for LEC in any way.

The nature of the code being executed within game, with all the thing and level interaction with all sorts of triggers with player movements, it's hard to make what verb to actually execute within the VM.

But to help coders, it could be handy to check for syntax at least, and then probably care for timer, pulse and crashable codes(like DestroyThing runs with variable being 0 inside...). Or say you can choose which message (selected, activated etc) to execute and run on user request.

I don't actually know what you are doing with the VM, so I may be saying something totally wrong, but just putting my ideas.

↑ Up to the top!