View Full Version : Undead Cocoon for showing off UndeadScript :-)
Bad Sector
11-14-2006, 02:42 AM
Here ya go (http://www.slashstone.com/more/ucocoon/)...
Remember me mumbling about an "UndeadScript" scripting thing some time ago? Well, i'm sure that some of you will, since it wasn't that much time ago :-). Anyway, i managed to survive from all the negativism that some people thrown towards my direction and not let that turn me down, since i'm totally sure that some will like what i'm making here :-).
Since the last time, i squished mercyless many bugs in the compiler, making it close to usable, added object oriented programming (aka "classes"), export functions and other stuff.
However, the effects of my last post seem to fade out, so i need a new wave of criticism on why i should not do this myself and use some 3rd party scripting library :-). To achieve that, i made a small show-off application that uses UndeadScript and i named it - in a total random manner - Undead Cocoon.
From the site above you can download Undead Cocoon (binaries available for Windows and Linux - the Linux one needs libc++.so.6 or whatever is called - anyway, it is compiled with gcc 3.4 so, you'll need to have that or a newer version installed :-) and admire a nice snippet of UndeadScript code (http://www.slashstone.com/more/ucocoon/main.us.html) (which is actually included in the UC archive).
Well, have fun. I'm waiting for your responses :-).
esrix
11-14-2006, 03:17 AM
...If I'm not mistaken, your zipped file contains another zipped file inside? WinRAR isn't letting me extract the file. Was this intentional?
Bad Sector
11-14-2006, 03:25 AM
Hm, perhaps you have a very old version of WinRAR. Mine (3.60 beta 8) works fine. Here, grab version 3.61 (http://www.rarlabs.com/rar/wrar361.exe) :-).
esrix
11-14-2006, 03:57 AM
It works now, but I had to extract the file, and noticed that it added ".out" to the file extension for some reason. I changed it to the original extension, opened the zipped file again to access the real files.
I, personally, still don't think its very practical to zip the files, and then zip up the zipped file, even if it is for compression purposes.
On the positive side, I'm happy to see a scripting language that actual differentiates between floats and ints :D Your language appears to be based off of C, which is nice.
My main complaint is the lack of documentation. Can't really play around with it if I don't know what I can and cannot do...
Bad Sector
11-14-2006, 04:19 AM
I, personally, still don't think its very practical to zip the files, and then zip up the zipped file, even if it is for compression purposes.
Well, i didn't zipped a zipped file :-P. The .tar.bz2 format is actually a "tar" file (which is an uncompressed archive file) zipped using the bzip2 compression (which is a method to compress single files). Technically, this involves two differents methods (for example, .tar files can be compressed using gzip to produce .tar.gz or with 7zip to produce .tar.7z but this makes little sense since 7zip is also an archive format).
WinRAR (at least the more recent versions) understands this usage (bzip2 alone is not that useful) and uses ".tar.bz2" files as if they were one single fileformat. However it also gets the ".bz2" extension as being a single "bzip2"ed file (you can compress any kind of files with bzip2) and it uncompress it to it's normal form. The naming convention for such files (bzip2 and gzip, that is) is to name the files as originalfilename.ext.bz2. Since bzip2 is a pure compressed stream (has no header), the only way to figure out the original name is to remove the .bz2 extension.
Seems that WinRAR thought that what you had there was a plain .bz2 file (that is, not a .tar.bz2 file) and just uncompressed it. The .tar fileformat alone is also recognized by WinRAR.
Possibly older versions of WinRAR had to work this way with .tar.bz2 files... dunno why. The latest versions are more convenient :-).
Your language appears to be based off of C, which is nice.
Well, it's actually based of from a mix of C++ and Java - but yet, both of them are based on C, so... :-)
My main complaint is the lack of documentation. Can't really play around with it if I don't know what I can and cannot do...
This "demo" was put together in around an hour, so i had no time to write any doc. However, there is a "UndeadScript_reference.txt" file in there which has all the "standard" (that is, no demo-specific) functions that UndeadScript currently exposes. That, with the source code of the scripts included, is all the documentation i currently have :-(.
I'm planning to add support in my SlashDOC (http://www.slashstone.com/more/slashdoc) documentation generator for UndeadScript, so when i release a library it will contain detailed documentation. I consider documentation to be a very important part of a library - something that is usually overlooked by free library authors. When it comes to UndeadScript, you can expect at least the quality of SlashTK's documentation (http://www.slashstone.com/more/slashtk/docs/index.html) :-).
Bad Sector
11-23-2006, 07:39 AM
I was a little bored, so i did this little mod (http://www.slashstone.com/gimme/ucocoondist3d.zip) to Undead Cocoon :-).
It's the same version as the previous, but with different scripts. Everything (3d stuff, etc) except blitting and some low gfx things (init, etc) is done in UndeadScript (as you can see from the scripts :-P).
Yes i know that there is no z-sorting, but well... anyway :-P.
electronicStar
11-24-2006, 08:03 AM
Hey looking good.
You should definitely keep working on this in your spare time.
I really can't understand the people who create a latest gen 3D/game engine with all the shennanigans and whatnots, and then you have to use messy C++ to do something out of it.
High level languages/scripts are the future!
Bad Sector
12-07-2006, 03:09 AM
I have some progress on the UndeadScript front: USI!
USI (means UndeadScript Interface, not to be confused with Usi (http://en.wikipedia.org/wiki/Usi) of North Korea) is a program that takes an interface description language (USI IDL), which is almost like UndeadScript itself but without the code (declarations only) and produces C++ code that interfaces native C++ functions and classes with UndeadScript code.
Here is the "presentation" (http://www.slashstone.com/more/uscript/usi/).
Sample USI file (http://www.slashstone.com/more/uscript/usi/interface.usi), the produced C++ code (http://www.slashstone.com/more/uscript/usi/interface.inc), the C++ file that includes that code (http://www.slashstone.com/more/uscript/usi/interface.cpp.txt) and provides the actual class functions and finally, a test script (http://www.slashstone.com/more/uscript/usi/test.us) for the above.
electronicStar
12-07-2006, 11:49 AM
Do you mean I could use USI to produce Undeadscript interface with existing game engines? that would be extremely interesting!
Bad Sector
01-15-2007, 08:37 PM
Do you mean I could use USI to produce Undeadscript interface with existing game engines? that would be extremely interesting!
Sorry for the extremelly late response, but for some reason i didn't noticed your answer back then... i noticed it now while looking back in this forum for something else.
Yes, you could use USI to interface UndeadScript with anything (including a game engine), as long as that game engine isn't very complex. You will still need to write some (or more-than-some :-P) glue code though, especially for C++ engines. For C engines, the situation is much simpler.
However, currently you can't do something like:
$ usimagic myEngine interface.cpp
that takes your engine, parses it's sources and produces a fully functional interface file which allows you to use the engine just like if it was written in UndeadScript. Although i would love it if it was the case, currently it isn't. I'm working to make the interfacing easy, but currently you still need to write some code.
Btw, i'm very near in finishing a first working version of UndeadScript. Although currently i have very little documentation and i would like to have full docs before doing a release.
vBulletin v3.6.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.