Hi megamarc79,
on website there are some examples but i don't found Pseudo 3D road (scaling). Can you share some example about it?
Thanks
Sesilla
Hi megamarc79,
on website there are some examples but i don't found Pseudo 3D road (scaling). Can you share some example about it?
Thanks
Sesilla
The scaling pseudo 3d road is an unfinished sample I was working on. The still image appears ok, but the effect in motion is wrong so I didn't publish the source code. It's not a limitation of the engine, but a misunderstanding on how to implement the effect corrctly. Some real games that used this technique properly were Namco's Final Lap and Suzuka 8 hours series.
Hi Pascals and Megamarc!
I was on my break time and unable to read the post responses, sorry.
Thanks to Megamarc for the awesome library!
I will try to port/translate Tilengine Super Mario to Object Pascal with Tilengine Object Pascal Wrapper.
v1.10 released
- Improved animation engine with new tileset sequencer
- Improved spriteset loader with new csv format compatible with Leshy SpriteSheet Tool
- New blending mode: modulation
- Many small bugfixes and improvements
- New "SuperMarioClone" sample that showcases many of the new features
Last edited by Thyandyr; 29-05-2017 at 02:43 PM.
For Delphi on Windows
1) Change project output directory to ..\..\..\bin\
2) In Benchmark method CreateWindow('A', CWF_NONE); instead of CreateWindow(nil, CWF_NONE);
3) Copy everything from Tilengine-master\lib\win32 to Tilengine-master\bin
4) Compile
5) Open command promt to Tilengine-master\bin
6) Run TileEngine_Benchmark.exe
Now... that makes the benchmark work. I still have no idea what it does, some odd stuff appears on a window and the exe exits gracefully.
CPU 12.5%C:\Users\Admin\Downloads\Tilengine-master\bin>TileEngine_Benchmark.exe
Tilengine benchmark tool ObjectPascal
http://www.tilengine.org
Normal layer..........
217194570 pixels/s.
Scaling layer..........
331034483 pixels/s.
Affine layer..........
64602961 pixels/s.
Blend layer..........
132780083 pixels/s.
Scaling blend layer...
204255319 pixels/s.
Affine blend layer....
54825814 pixels/s.
Affine blend layer....
423841060 pixels/s.
Colliding sprites......
228571429 pixels/s.
C:\Users\Admin\Downloads\Tilengine-master\bin>
The same project in C outputs:
C:\Users\Admin\Downloads\Tilengine-master\bin>Tilengine benchmark tool
Written by Megamarc - Jun 1 2017 19:20:44
Library version: 1.13.0
http://www.tilengine.org
Syntax: benchmark format
format : pixel format (16 or 32)
PS. Got to love the authentic look of old CRT pixels
Last edited by Thyandyr; 01-06-2017 at 05:32 PM.
This adds the version number in Delphi as it is the C example.Code:var Version: Integer; Begin // Get version Version := uTileEngine.GetVersion; Writeln( 'Library version: ' + ((Version shr 16) and $FF).ToString + '.' + ((Version shr 8 ) and $FF).ToString + '.' + (Version and $FF).ToString );
Commented lines are from the C example.Code:// load layer (tileset + tilemap) // tileset = TLN_LoadTileset ("Sonic_md_bg1.tsx"); tileset := uTileEngine.LoadTileset('Sonic_md_bg1.tsx'); // tilemap = TLN_LoadTilemap ("Sonic_md_bg1.tmx", "Layer 1"); tilemap := uTileEngine.LoadTileMap('Sonic_md_bg1.tmx', 'Layer 1');
Pascal header:
function LoadTileset(filename : string) : Pointer; cdecl; external dllname name 'TLN_LoadTileset';
function LoadTilemap(filename, layername : string) : Pointer; cdecl; external dllname name 'TLN_LoadTilemap';
Should be:
function LoadTileset(filename : PAnsiChar) : Pointer; cdecl; external dllname name 'TLN_LoadTileset';
function LoadTilemap(filename, layername : PAnsiChar) : Pointer; cdecl; external dllname name 'TLN_LoadTilemap';
and possibly for many others lines in the header...
Last edited by Thyandyr; 01-06-2017 at 07:14 PM.
How do I use this without the built-in windowing?
SetRenderTarget sounds like it might do the trick, but how do I get pointer to a framebuffer in VCL?
Sets the output surface for rendering.Code:TLNAPI void TLN_SetRenderTarget ( uint8_t * data, int pitch )
Parameters
data Pointer to the start of the target framebuffer pitch Number of bytes per each scanline of the framebuffer
I don't get this command. What sort information can be passed in 8 bit pointer? Memory address for lego computer?
The source is not included so I cannot go look there what is done with the 'data'. Can you add a function returning the array of data created and let the users do what they want with it?
Haaalp plz I don't understand!
Last edited by Thyandyr; 01-06-2017 at 09:41 PM.
I will ask megamarc and return here with answers.
Bookmarks