Search Results
|
Post |
Author |
Forum |
Replies
[asc]
|
Views |
Posted |
|
|
Thread: Tilengine on Java
Post: RE: Tilengine on Java
Hi!
As any native system C library, you can use Tilengine from any language that suports interfacing with system libraries. Java requires a JNI binding to do this. I developed one at the beginning, t... |
|
megamarc |
Support
|
79 |
149,568 |
12-02-2020, 05:21 PM |
|
|
Thread: Tilengine on Java
Post: RE: Tilengine on Java
Hi!
Provided samples should work with old JNI, as they don't use newer features of the engine.
However, to access these newer features, yes, TilengineJNI.c AND Tilengine.java should be updated with... |
|
megamarc |
Support
|
79 |
149,568 |
12-03-2020, 01:27 AM |
|
|
Thread: Tilengine on Java
Post: RE: Tilengine on Java
Hi,
Doing a binding is more a tedious work than a challenging one. It requires repetitive work done by hand that is error-prone, because you have to map every function and data structure, keeping nam... |
|
megamarc |
Support
|
79 |
149,568 |
12-03-2020, 04:39 PM |
|
|
Thread: Tilengine on Java
Post: RE: Tilengine on Java
Hi,
The bindings that are updated more are C# (for compiled, managed language) and Python (for interpreted, scripted language). Other bindings are contributed by other people, or are a proof of con... |
|
megamarc |
Support
|
79 |
149,568 |
12-04-2020, 04:15 PM |
|
|
Thread: Tilengine on Java
Post: RE: Tilengine on Java
You picked two extreme cases :)
In order to communicate, sometimes the binding must do data conversion before passing the arguments. In other cases, it must create and destroy elements that are nee... |
|
megamarc |
Support
|
79 |
149,568 |
12-05-2020, 04:07 AM |
|
|
Thread: Tilengine on Java
Post: RE: Tilengine on Java
Not like the callback one, sure. Any function that passes strings will need the data conversion, same as functions that pass or get structures (structs). But there are already some functions that do t... |
|
megamarc |
Support
|
79 |
149,568 |
12-05-2020, 04:32 AM |
|
|
Thread: Tilengine on Java
Post: RE: Tilengine on Java
Of course, that would be welcome!
If you do that, after cloning the repo in your GitHub and do the modifications, you can do a "pull request". With this, your patch will be integrated back into the... |
|
megamarc |
Support
|
79 |
149,568 |
12-05-2020, 05:23 PM |
|
|
Thread: Tilengine on Java
Post: RE: Tilengine on Java
Hi,
Required JNI header is distributed with the JDK (Java Development Kit). Please read main JTilengine README in GitHub to see how to reference it when compiling, depending on your OS, as its locati... |
|
megamarc |
Support
|
79 |
149,568 |
12-07-2020, 08:27 AM |
|
|
Thread: Tilengine on Java
Post: RE: Tilengine on Java
Hi!
What version of the OS and JDK are you using? I use Windows 10 x64 2004 and OpenJDK 1.8.22.
I've tried the commands I put on github, and they still work for me. Just a minor warning on a fun... |
|
megamarc |
Support
|
79 |
149,568 |
12-07-2020, 06:36 PM |
|
|
Thread: Tilengine on Java
Post: RE: Tilengine on Java
I think I see the problem.
First, check the syntax, this is incorrect:
-I"../Tilengine.dll"
The -I parameter should not be used here. It is used to include headers, but the dll is a binary.... |
|
megamarc |
Support
|
79 |
149,568 |
12-08-2020, 12:00 AM |
|
|
Thread: Tilengine on Java
Post: RE: Tilengine on Java
Congratulations!!
I'm glad you made it work. Keep going! Let me know if you need more support.
Regards, |
|
megamarc |
Support
|
79 |
149,568 |
12-08-2020, 04:58 AM |
|
|
Thread: Tilengine on Java
Post: RE: Tilengine on Java
Yes, Tilengine can read two custom tile properties, that can be queried with TLN_GetLayerTile() (http://www.tilengine.org/doc/group__layer.html#ga1d3932cdfcb024db23a94e4e33f2246e) function into a TLN_... |
|
megamarc |
Support
|
79 |
149,568 |
12-09-2020, 09:33 PM |
|
|
Thread: Tilengine on Java
Post: RE: Tilengine on Java
Yes!
This is the intended use case of the custom "type" attribute :-) |
|
megamarc |
Support
|
79 |
149,568 |
12-09-2020, 10:26 PM |
|
|
Thread: Tilengine on Java
Post: RE: Tilengine on Java
Both are quite complex samples. I think the samples bundled with the engine must be simple and showcase basic features. The creation of working gameplay mechanics is beyond the scope of the engine its... |
|
megamarc |
Support
|
79 |
149,568 |
12-10-2020, 06:14 AM |
|
|
Thread: Tilengine on Java
Post: RE: Tilengine on Java
Hi,
If you check provided samples, you'll see that "line" argument is heavily used inside the raster effect body:
https://github.com/megamarc/JTilengine/blob/6330b9429d2a3b479e1305969f5096bff19463... |
|
megamarc |
Support
|
79 |
149,568 |
12-08-2020, 06:08 PM |
|
|
Thread: Tilengine on Java
Post: RE: Tilengine on Java
Hi!
Raster effect is a global frame feature, that's why you can't have one for each layer. However, you can modify any layer or sprite parameters inside the same callback. That's what the example s... |
|
megamarc |
Support
|
79 |
149,568 |
12-09-2020, 03:29 AM |
|
|
Thread: Tilengine on Java
Post: RE: Tilengine on Java
Hi,
I'll check the attached 7z later, thanks.
For objects, you can use the "Object Layer" feature:
http://www.tilengine.org/doc/md_layers.html#autotoc_md31
These can be directly loaded and dra... |
|
megamarc |
Support
|
79 |
149,568 |
12-09-2020, 04:29 AM |
|
|
Thread: Tilengine on Java
Post: RE: Tilengine on Java
You're doing great work with the binding!
I've updated my local working copy with your latest commit to se what happens. I have a java compilation error that is silly but prevents me from generatin... |
|
megamarc |
Support
|
79 |
149,568 |
12-10-2020, 06:11 PM |
|
|
Thread: Tilengine on Java
Post: RE: Tilengine on Java
I think we're experiencing portability problems here. I cannot run my own TestWindow/TestPanel samples either, java gets complaining about crashes inside lots of innocent functions that otherwise work... |
|
megamarc |
Support
|
79 |
149,568 |
12-10-2020, 08:50 PM |
|
|
Thread: Tilengine on Java
Post: RE: Tilengine on Java
Hi!
I think I know what happens.
In original 32-bit binding and library, returned pointers by the Tilengine native library are handled as jint (32-bit). However, 64-bit builds return 64-bit pointe... |
|
megamarc |
Support
|
79 |
149,568 |
12-11-2020, 03:28 AM |