Post new topic Reply to topic  [ 5 posts ] 
 Post subject: PolyConsole (early noodling, ignore)
PostPosted: Sat Nov 26, 2011 2:38 am 
User avatar
OK this is highly unpolished but I'm so excited I'm posting it anyway!

Something I've been trying to do for months is get a project together which is written in C++, but still plugs in to Polycode's LUA-bridge features. Out of the box Polycode can do C++ or LUA but not both in one program. But I have now successfully bullied it into doing both in one program anyway!

In effect, what I've got here is a window you can type the Polycode LUA examples into ( like this ) and it will execute them as you go (see pictures below). The idea with this code is that eventually instead of starting with a blank screen, one could write a game in C++, and then at any time drop into this console and type in, like, sun:setColor(0,1,0,1); if you just really wanted to see what it would look like if the sun were green. I'm planning to build my next game project around these tools :D

Mac test build: http://vote.grumpybumpers.com/j/p/conso ... mplate.zip
Source: https://bitbucket.org/runhello/polyconsole

Where I need to go with this next:
- Console could be cleaner, 'paste' sure would be nice.
- print() output is not yet printed back directly into the window and error messages are oblique.
- There should be an option to log the things printed into/out of the console.
- The LUA code can only see the base Polycode libraries. I need to figure out how to run the binding script against my own project so that LUA can also see variables and functions and classes declared within the game itself.
- Right now the project is mac only (it's just based on the template project...)!

Also note: The linked project will only compile against my personal fork of Polycode, because it uses getScreenInfo(). But the build script is set up to download from my fork so that's ok.

Image

Image


Last edited by mcc on Sun Apr 29, 2012 6:30 pm, edited 2 times in total.

 Profile  
 
 Post subject: Re: PolyConsole
PostPosted: Sat Nov 26, 2011 5:56 am 
Site Admin
User avatar
Wow, that's really neat! Can't wait to see where you take this!


 Profile  
 
 Post subject: Re: PolyConsole
PostPosted: Mon Nov 28, 2011 3:56 am 
User avatar
mcc, as always, fantastic work you clever bastard


 Profile  
 
 Post subject: Re: PolyConsole
PostPosted: Mon Dec 12, 2011 7:25 am 
User avatar
Update: I remain stuck on being able to do much with the console part of this because of the "only able to load one library's worth of bindings" problem I describe in this thread. I have tried two lines of attack on this, neither effective. Because of this problem I can load and run Polycode lua scripts but only as long as they are self-contained, I cannot make any of my personal C++ classes or functions visible to LUA code.

I have however pushed some updates to the bitbucket page with some major progress on the other set of functionality I was hoping to add here. In the following image, all the polygon entities were loaded out of an SVG file drawn in Inkscape:

Image

The polygons currently aren't added to a physics space, but they will be soon. My hope is I can draw a scene full of physics entities and then in Inkscape give each one a on_collision="" attribute which contains lua code to be executed.

If I can figure out the crash problem (in my create_lua_library thread from the Help forum) by this weekend, I hope to use all this as library code in a Ludum Dare entry.


 Profile  
 
 Post subject: Re: PolyConsole
PostPosted: Fri Dec 23, 2011 8:47 am 
User avatar
Link: A screenshot from this project I thought was exciting.


 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


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

Search for:
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group