GameMonkey Script

GameMonkey Script Forums
It is currently Tue May 22, 2018 7:37 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Sat Sep 01, 2012 3:27 am 
Offline

Joined: Sat Sep 01, 2012 3:12 am
Posts: 12
Hello GM Community,

I've been thinking of a project to use gamemonkey script in for a long time, and finally have one, so I nabbed a copy, and took a peek.

Well, I have no idea what to compile - I searched for a readme or something that would actually explain what files I need to compile into my project or what folders to use for including files. Then I'd also need to know if there are any dependencies.

I'm sure there is a pile of similar posts, and I'm happy to be linked to those, but I think there should be a readme and/or some sort of sample makefile in the download, as it would probably save this forum from a handful of posts.

I noticed in the src directory there is a pile of different gm* directories, none of which have any sort of readme or some sort of direction.

Thanks for any help,
-MrBarry


Top
 Profile  
Reply with quote  
PostPosted: Sat Sep 01, 2012 6:10 am 
Offline

Joined: Mon Dec 15, 2003 1:38 pm
Posts: 701
Hi mrbarrysoftware and welcome to the forum :) There is some info on building GM in the FAQ. I'll describe it below as well...

1) Copy all the files from src\gm (not sub folders yet) to your project.
2) Delete gmDebugger.cpp or don't include it in your project.
3) Copy gmConfig_p.h from one of the platform folders. win32msvc is the only one I maintain.
4) Compile as you like, as static lib or directly as part of your project.

You may need to modify the gmconfig_p.h for your platform. This is mostly to map GM types to appropriate compiler types. You may need to set endian and perhaps map some standard library functions.

After that...
5) Add some src\binds files that you need or grab some bindings and extensions from elsewhere.

If you have Windows and a Express copy of Visual Studio or better it can be helpful to browse the example projects.

Let us know how you go.


Top
 Profile  
Reply with quote  
PostPosted: Sat Sep 01, 2012 3:56 pm 
Offline

Joined: Sat Sep 01, 2012 3:12 am
Posts: 12
Alright, that's what I started doing, and I guess I missed that in the FAQ.

Have you thought of moving things to cmake or something similar? And also maybe implementing some sort of community wiki?

Also, if GameMonkey supports threading, do I need to link to any additional libraries, or is threading something I'd have to implement myself? I'm not actually interested in threading, at least from my current goals, but I just want to make sure I've got all the dependencies worked out.

Take care, and thanks for pointing that out,
-MrBarry


Top
 Profile  
Reply with quote  
PostPosted: Sat Sep 08, 2012 12:06 am 
Offline

Joined: Mon Dec 15, 2003 1:38 pm
Posts: 701
No other libs are required for GM. With OS threading there are 2 important things to consider:
1) The compiler itself is not thread safe due to legacy use of Flex. So if running multiple VMs in different threads, mutex the compile call.
2) GM objects cannot be shared between VMs in the same or different thread. Each GM object belongs to the VM that created it. You may freely create multiple VMs in the same or different threads, just keep the data separate or communicate via a different channel.

As for GM internal threading, it is entirely a single threaded cooperative model. This works well when scripts behave nicely, performing small amounts of work before exiting or yielding. Because GM is not natively compiled, heavy lifting should be done in native code.

I don't care to maintain make files, though I'm happy for others to do so. As of this year, I host the GM website so I could host a wiki, otherwise it may be best to move everything to a code sharing or hosting service like GitHub. I am not current with which is the most popular or featured.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group