[Neko] neko call to c function when embedded

lee at designrealm.co.uk lee at designrealm.co.uk
Fri Nov 2 21:27:11 CET 2007


Hi Janko,

That's fine, I know what it's like to want to build your own engine.  
NME uses SDL as a dll, so I think it should be okay, license wise.  
Also, NME uses the SGL extension, so transforms such as scaling,  
rotation and alphas are also doable. If Allegro is your thing, you  
could also consider using my nGame library, which wraps 100% of the  
Allegro library, though I've not built a framework around it, so you'd  
have to use it as you would use the Allegro library in C, only within  
haXe instead.

I'm always tinkering with game engines, and at some point, I'd like to  
make a decent 3D engine wrapper, only I don't fancy doing that for a  
library you'd have to pay for. Plus, it's important to me that the  
engine is cross-platform...

Anyway, good luck in your work, and please feel free to post any  
questions to the lists. We're always available to answer questions.

Regards,
Lee








Quoting janko metelko <janko.itm at gmail.com>:

> Hi
>
> Maybe it's just my inflexibility but I have somewhere in the back of my head
> (from reading various chats on indiegamer) that SDL is more low level, that
> it doesn't support HW-accelerated scaling and rotating (at least by default)
> and that it's GPL (Which is not a problem if you use it as dll (I think they
> talked something like that)) .. I know for some developers who make
> excellent games with SDL and some with Allegro, but I started with PTK back
> then so I also already know it well.
>
> At least for now my goal is more to make an engine that does all generalized
> stuff in c/c++ so nekovm scripts just define the game specific code in
> neko...
>
> best regards,
> Janko
>
> On 11/2/07, lee at designrealm.co.uk <lee at designrealm.co.uk> wrote:
>>
>> Hi Janko,
>>
>> Why not take a look at my NME library?  It is fully usable, and there
>> is a chapter devoted to it in the upcoming Pro haXe and Neko book.
>> It's based on SDL, so should work on Windows, Linux and Mac, though
>> I've only created binaries for Windows at present.
>>
>> Lee
>>
>>
>>
>>
>>
>>
>>
>> Quoting janko metelko <janko.itm at gmail.com>:
>>
>> > Hi Lee,
>> >
>> > Yes , I imagine I have to somehow register them to let neko know what to
>> > call ..
>> >
>> > I will look at the xcross example and tell if I find something..
>> >
>> > I have no clue yet what I will do and if I will succeed making Haxe +
>> PTK in
>> > some good way... right now I am just trying to find a way to make some
>> game
>> > in a higher level language and with a stability (dx on win, opengl on
>> mac)
>> > that a casual games need.
>> >
>> > I was looking for hundrets of solutions for 2 weeks and tried many of
>> > them... I decided not to work in c++ any more a year ago
>> > because of how complicated compilers are to set up (at least to me- I am
>> not
>> > too low level person)... I made games with haxe in the meantime but now
>> I
>> > will try to make something that can be sold on portals and nothing
>> except c,
>> > c++ and blitzmax, TGB that I found supports DX -pc /OGL - mac (but I
>> didn't
>> > like blitzmax, and torquescript also doesn't seem like an fullround
>> modern
>> > language) on some normal level .. So I eneded up back in c trying to
>> make
>> > this but I can't be sure I will succeed. If I was good enought in c++
>> then I
>> > wouldn't search for these higher level languages anyway. I right now
>> don't
>> > plan to do a binding but to embed nekovm into a c++ program... but I
>> don't
>> > have a clear picture what is the best path so that might change.
>> >
>> > Thanks for your reply,
>> > Janko
>> >
>> > This is probably possible, though you'll have to force the
>> >> registration of the functions in your C code to the Neko VM. Take a
>> >> look at the xcross lib in haXeLib which includes the standard
>> >> libraries into a single exe. This should shed some light on the topic.
>> >>
>> >> When you're successful wrapping PTK, are you going to submit it to the
>> >> community? It would be interesting to have another decent 2d library
>> >> available for Neko.
>> >>
>> >> Regards,
>> >> Lee
>> >>
>> >>
>> >>
>> >>
>> >> Quoting janko metelko <janko.itm at gmail.com>:
>> >>
>> >> > Hi,
>> >> >
>> >> > I am trying to embedd nekovm with 2d game library (PTK) to make a
>> neko
>> >> > scriptable game engine. It wors but I have one question..
>> >> >
>> >> > Is this possible to do (or even normal ussual)?
>> >> >
>> >> > the engine starts and opens the screen, then it loads the neko .n
>> file
>> >> with
>> >> > script and calls loadResources function in neko.. that function
>> function
>> >> > calls back the functions for example loadImage("img.png"); that is
>> >> defined
>> >> > back in C and which loads the images in it's array or LList.
>> >> >
>> >> > (I saw how neko calls functions in native dlls via loadprimitive but
>> >> that is
>> >> > probably a different thing)
>> >> >
>> >> > thanks best regards,
>> >> > Janko
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Neko : One VM to run them all
>> >> (http://nekovm.org)
>> >>
>> >
>>
>>
>>
>> --
>> Neko : One VM to run them all
>> (http://nekovm.org)
>>
>





More information about the Neko mailing list