home home

downloads files

forum forum

docs docs

wiki wiki

faq faq

Cube & Cube 2 FORUM


Cube engine with Lua scripting...

by enif on 06/14/2006 10:00, 26 messages, last message: 07/20/2006 13:44, 10850 views, last view: 05/24/2024 04:19

Interested? I am working on that! :-) For now, I have a name: Soulcube and a working Win32 and MacOSX version. Lua API is done from 75%. Most of the scripts are rewriten to Lua. Simple needed-libraries build system is also done (few scripts + makefiles).

Soon I will release it...

enif

   Board Index    Go to next 20 messagesGo to last 20 messages

#1: Update

by enif on 06/20/2006 09:28

Lua API finished. Most of the scripts converted to Lua.

Stay tuned! :-)

reply to this message

#2: Re: Update

by Anders1 on 06/21/2006 10:50, refers to #1

Interesting.

Yesterday I downloaded the source code from CVS, to integrate it with Lua... but seeing as you already have done that... can you post more details about your implementation?

Does it use userdata for stuff like players, etc? Or are they all global functions?

Are you going to release your modifications?

I\'m considering doing my own implementation anyway, because I\'m a Lua freak :)

reply to this message

#3: Lua

by enif on 06/21/2006 14:45

Hi!

I have all old-script's functions and vars in Lua library. The old scripting engine is now remowed. Key bindings and menu commands are mapped to names and stored in commands/user_commands tables connected via metamethods:

=========================

-- commands.lua
WEAPON214 = function() if cube.isdown == 1 then cube.Weapon(2, 1, 4) end end,

-- keymap.lua
cube.KeyMap(-1, "MOUSE1", "ATTACK");

-- menus.lua

require ("data/scripts/commands");
require ("data/scripts/splitjoin");

user_commands.M_SM_MAIN = function() if cube.isdown == 1 then cube.ShowMenu("main") end end

cube.Bind("ESCAPE", "M_SM_MAIN"); -- it all starts here

cube.NewMenu("main");

cube.MenuItem("quit", "QUIT");

========================

It is all functioning, but in early stages. I am learning Lua and playing with Cube sources (version from 2004, not the 2005 - it has some speed problems). It looks good, but needs lot of work to be done yet.

I can sed You my sources, if you wish...

reply to this message

#4: A bit more...

by enif on 06/21/2006 14:47

-- call a command by ID

function CallCommand(cmd_id)
if user_commands[cmd_id] ~= nil then
if type( user_commands[cmd_id] ) == "function" then
user_commands[cmd_id]()
--else
-- cube.Echo("cmd: " .. id .. " is not a function")
end
--else
-- cube.Echo("cmd: " .. id .. " not found")
end
end

---------------

This one is called from command.cpp. No need to store Lua chunks in C buffers. Only names of the commands defined in commands.lua and autoexec.lua (to avoid scripts recompilation on each call).

reply to this message

#5: Re: A bit more...

by Passa on 06/21/2006 14:48, refers to #4

Any timeframe on a release?

reply to this message

#6: Re: Lua

by Anders1 on 06/21/2006 17:05, refers to #3

Yeah please send me it, if you want... I'd love to see how you implemented Lua.

reply to this message

#7: Lua

by enif on 06/22/2006 10:21

Send. :-)

reply to this message

#8: When?

by enif on 06/22/2006 10:40

I'm not sure, but soon. :-)

It is working now, but a little bit messy. I'm developing it in DevCpp and Xcode 2.3. No global makefile for engine is done (for Windows it is not a problem, for Mac it is a big problem (How to compile something with SDL and Cocoa from command line?)). I can release it right now, but with a long document "How to compile and install the Soulcube engine - a step by step guide". :-)

enif

reply to this message

#9: Re: When?

by Passa on 06/22/2006 11:12, refers to #8

Couldya just compile for Windows and release it? ;)

reply to this message

#10: Re: When?

by enif on 06/22/2006 11:59, refers to #9

I'll tray it... :-)

Problem is, that I can not release it with data - my upload limits are very low.

ok

reply to this message

#11: ...

by enif on 06/22/2006 12:00

I'll try it... :-))))

reply to this message

#12: Re: ...

by Passa on 06/22/2006 13:10, refers to #11

Just distribute the changed files. For your own sake, don't distribute game data again. Thats one way to self-destruct.

reply to this message

#13: ..

by Anders1 on 06/24/2006 14:04

If you send your files to me (anders@anders1.org) I can host them for you somewhere.

reply to this message

#14: First one!

by enif on 06/26/2006 14:33

Hi!

http://soulcube.czweb.org/

...the very first release and VERY VERY ugly web site.

Love me or kill me! :-)
enif


PS: Only sources and libs-bin released. Use data from the original Cube. Thanks!

reply to this message

#15: Re: ..

by enif on 06/26/2006 15:19, refers to #13

Thanks!

I try it myself first, but in future, I will probably need Your help, because I have 2MB limit for upload (http) and our proxy blocks ftp uploads.

Thanks again,
enif

PS: All library sources added to the site.

reply to this message

#16: Re: First one!

by dan454 on 07/01/2006 15:07, refers to #14

Hey! Just got Soulcube to compile... looks good! (it runs anyway, haven't tested it much yet)

This is the direction I like to see Cube going. You got the foundation underway, next milestone will be scriptable entities and all that?

I like the new orginization of data too, instead of lumping everything into 'packages'. It took me a while to trial & error where everything goes though.

BTW, you've set the libs folder at c:\MinGW344, when under a default devcpp install most libs are at c:\Dev-Cpp\lib.

Keep up good work - wish I could help! I'll send bug reports at least.

reply to this message

#17: Re: When?

by dan454 on 07/03/2006 00:43, refers to #10

I've put together a download for soulcube.

It includes all maps & textures, libraries for compiling, and is configured to compile from a default Dev-Cpp install with SDL 1.2.10 devpak applied.

Also includes a compiled cube.exe to see it right away.

Be warned - most commands from the 'Esc' menu haven't been converted to Lua yet. Just enter commands to the '~' console.

Link:
http://houndhoof.spaces.msn.com/

reply to this message

#18: Copyright infringement

by MeatROme on 07/03/2006 01:34, refers to #17

Did you ask all the respective copyright owners about redistributing their material?

I would encourage you to reduce download size by simply distributing your source and/or binaries.

That way you'll get into less trouble with the powers that be ...

reply to this message

#19: ..

by makkE on 07/03/2006 01:59

Redistributing all game media is not appreciated. In fact it´s partially illegal. And a waste of download time, especially for those on slower connections.

Make it an add-on that can be extracted into, and co-exsist in an install of the original cube.

reply to this message

#20: Re: Copyright infringement

by Passa on 07/03/2006 02:05, refers to #18

True, I also have a problem with downloading stuff I already have. Make it addon.

reply to this message

   Board Index    Go to next 20 messagesGo to last 20 messages


Unvalidated accounts can only reply to the 'Permanent Threads' section!


content by Aardappel & eihrul © 2001-2024
website by SleepwalkR © 2001-2024
54111959 visitors requested 71896640 pages
page created in 0.024 seconds using 9 queries
hosted by Boost Digital