Looks solid, but why is it all procedural?
Because I like it All object-oriented things(for example sprite engine) will be in separate units.Originally Posted by Brainer
Wow... yet another game library in pascal. Awesome job. Your feature list is quite impressive. How long did it take you to complete this?
It seems to me that alot of pascal dev's are making their own engines (yes I'm guilty too ). I would like to see an updated list of all game engines written in our lovely language, because I feel that there might be too many with a lot of overlapping features. I rather see one or two well supported/maintained ones than 10+ libs that are maintained by individuals. After all, we should be making games instead of engines.
This is also worrying me, because I feel that my engine project is getting more "redundant" day by day, so I need to think of ways to make a difference.
However, don't let this stop you from developing your engine. Looks like it can compete with Andorra or PhoenixLib.
Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.
Maybe, but I don't like them - too many depends and huge size... Also there is no well support for Linux-developers(As I remember Andorra can't be compiled without modifying a source code, but maybe something changed in the latest version).Originally Posted by chronozphere
Oh, I can't answer exactly I started it three years ago, but there was many pauses between developing. And ZenGL was changing every time(there even was a simple 3D one time ). After one year of fun I have reworked it. In 2009 I added MacOS X support for one commercial project(I made a port of game that was written on Asphyre for Windows). Now it used in another one commercial project(with versions for Windows and MacOS X), and in some other "secret" projectsOriginally Posted by chronozphere
Last edited by Andru; 11-11-2010 at 11:41 AM.
Anyway, I tried to bench the basic sprite drawing as best I could. I more or less just took a modified miku example with no auto-spawning / deleting, no movement, no randomized initing, anim, etc. The engine seems a bit sluggish, unless I'm not performing the most basic drawing. I can draw a max of 2900 sprites at 30 FPS with ZGL. With Game Maker, which is notoriously slow, it can still handle drawing a max of 6300 sprites at 30 FPS. I think ZGL needs some optimizations somewhere.
What sprites did you use in Game Maker, and what about sorting sprites by layers(in Game Maker)? Also, give me a log file please, and info about your PC. And if you can - attach "benches" here(with sources and exe for Game Maker bench ), please.Originally Posted by dazappa
Rendering in ZenGL is well optimized, be sure. Seems only Sprite Engine have some "problem" with stable sorting algorithm, or something happened in your benchmarksOriginally Posted by dazappa
Last edited by Andru; 12-11-2010 at 06:08 AM.
(So in my case, the limit is my GPU, likely. I have an i5 @ 2.3ghz, and an nvidia 310m) Time to play with ZGL some more now I guess. The particles demo has a warning not to use it in the source, but it seems to have run just fine for me! I can still post my mini-benches if you still want them heh.
Yeah, fillrate is very criticalOriginally Posted by dazappa
Particles subsystem is not ready for simple use... all parameters are set by code, and there is no emitter manager in ZenGL for now.Originally Posted by dazappa
Last edited by Andru; 12-11-2010 at 07:12 AM.
Currently playing around with point in poly (which seems to work), but I am very confused with mouse_x()/y() and mouse_dx()/dy().
Here's a scenario:
The mouse coords initialize to where the mouse was when the game was launched, but never update after.Code:if(col2d_PointInTriangle(mouse_X(),mouse_Y(),p1,p2,p3)) then begin // Visual response end; text_Draw( fntMain, 0, 64, 'FPS: ' + u_IntToStr( zgl_Get( SYS_FPS ) ) +' | '+u_inttostr(mouse_x())+','+u_inttostr(mouse_y()));
Coords output are changing as I move the mouse, but still no collision response.Code:if(col2d_PointInTriangle(mouse_DX(),mouse_DY(),p1,p2,p3)) then begin // Visual response end; text_Draw( fntMain, 0, 64, 'FPS: ' + u_IntToStr( zgl_Get( SYS_FPS ) ) +' | '+u_inttostr(mouse_dx())+','+u_inttostr(mouse_dy()));
No collision responseCode:if(col2d_PointInTriangle(mouse_X(),mouse_Y(),p1,p2,p3)) then begin // Visual response end;
For some reason this works the way I want it to.Code:if(col2d_PointInTriangle(mouse_X(),mouse_Y(),p1,p2,p3)) then begin // Visual response end; text_Draw( fntMain, 0, 64, 'FPS: ' + u_IntToStr( zgl_Get( SYS_FPS ) ) +' | '+u_inttostr(mouse_dx())+','+u_inttostr(mouse_dy()));
Anyway, I can't really find docs anywhere so I'm a bit confused about their behaviors, but at least I got it working the way I wanted after some very random guessing.
Did you watch this demo - "02 - Input"? There are few lines of code in function Timer(at end of it) that very important:The mouse coords initialize to where the mouse was when the game was launched, but never update after.
Code:// EN: Necessarily clear all the states. key_ClearState(); mouse_ClearState(); joy_ClearState();
Last edited by Andru; 12-11-2010 at 07:14 PM.