PDA

View Full Version : Luna Game Pascal



drezgames
15-06-2017, 07:57 PM
1474

Luna Game Pascal™ is a modern, modular, object oriented programming language based on Object Pascal, a light-weight IDE and an advanced 2D game engine for Windows® PC. The engine uses Direct3D® for hardware accelerated rendering. It's robust, designed for easy use and suitable for making all types of 2D games and other graphic simulations. There is support for surfaces, textures, sprites, audio, streams, archives, databases and much more.


LANGUAGE FEATURES
- Luna Game Pascal is modern, modular, object oriented and base on the Object Pascal programming language.
- Namespaces, nested classes, inheritance
- Static(shared) members, indexed properties, default parameters.
- Overloaded routines, operator overloading, delegates, exception handling, regular expressions.
- Conditional compilation.
- Direct calling dll-defined routines.
- All calling conventions register, pascal, cdecl, stdcall, safecall are supported.
- EXE generation (standard win32).
- DLL generation (standard win32).

IDE FEATURES
- Multiple Project Support
- Toggle Code Folding
- Syntax Highlighting
- Project Options
- Single file project format
- User Feedback/RSS Feeds from IDE (Help->Feedback/RSS Feeds)
- File operations: open, close, close all, save, save all
- Edit operations: undo, redo, cut, copy, past, select all
- Search operations: find, find again, find/replace
- Compile/Compile & Run
- Build ZIP/Single EXE Distros
- Param Hints (API Routines)
- Code Completion (API Routines) (Ctrl+Space)
- Integrated CHM Help
- Editor Options (Options->Editor Options)
- Context sensitive Help (F1) in the editor (place the cursor on a keyword and press F1 or right click).
- File Tabs with hints
- Entire game engine API is accessible
- EXE generation with version info and application icon

ENGINE FEATURES
- A thin Object Oriented framework for object efficient
management.
- Uses Direct3D 9 for 2D hardware rendering.
- Uses 32bit surfaces and textures.
- Free scaling, rotation, alpha blending and other special effects.
- Windowed and full screen modes.
- Frame based timing support.
- Low-level INI file and high-level configuration file support.
- Memory mapped buffers
- Unified Streaming system (memory, file, EXE resources, zip archive).
- True-Type fonts
- Graphic primitives (lines, circles, rects, points).
- Advanced polygon rendering (scale, rotate, control line segment visibility).
- Titled texture rendering
- Advanced sprite management.
- Polypoint collision system for fast precise collision detection.
- Mouse and keyboard input management.
- Unified audio system with support for WAV | MP3 | MID | OGG | MOD | IT | S3M | XM music formats.
- Comprehensive math routines (vectors, angles, line intersection, clipping).
- Log file support.
- SQL database support (MySQL local & remote | SQLite local only).
- Networking (reliable UDP).

SCREENS
1469 1470 1471 1472 1473

Thyandyr
15-06-2017, 08:50 PM
Can't wait to try it out!

drezgames
15-06-2017, 09:43 PM
Thanks! Testing things now (and finding bugs.... haha). Interesting how when you think you got everything locked down and your ready to go.. you do one more test and find a bug. But good though, finding and squashing them. I read somewhere a long time ago that "every single line of your code needs to execute at least once..." There always seems to be that allusive one-off bug that hides in the corner waiting to spring forth. Or the giant "I gotcha" bug that pops out and makes you rethink your whole design process. Ain't programming fun? Haha! :D

drezgames
18-06-2017, 08:11 PM
Version 2017.1.alpha released! 8)

Thyandyr
18-06-2017, 08:59 PM
I got to go to sleep, but I noticed the chm does show Contents and index, but not any text in the main window.

drezgames
18-06-2017, 09:32 PM
1) are you able to display any .chm file on your machine?
2) there most likely is that security feature in place that locks down .chm viewing on some machines (apparently they can contain harmful scripts??)
3) if #2, I think you can right-click on the .chm and select "unblock" .chm viewing. (have you have admin rights for the "unblock" to show up)
See this link (https://social.msdn.microsoft.com/Forums/ie/en-US/60da78e5-c351-4f22-bd75-192a609d08c5/downloaded-chm-doesnt-show-solved?forum=iewebdevelopment)

Let me know.

Thanks.

Thyandyr
19-06-2017, 08:23 AM
.chm works fine on my work computer with 32bit/Win7, home computer is 64/Win10. Now that you said so, I think it does not by default even know what .chm is, so I probably have made some chewing-gum setup and that is why it's not working. I'll have another look tonight when I get home.

SilverWarior
19-06-2017, 05:13 PM
If your Windows (Win 2000 and above) does not recognize .chm file type there are two most likely causes for it.
1. At some point you had another program installed that was assigned for opening .chm files and later you removed that program from your computer.
2. You performed a custom Windows installation without installing any help system components which are opening .chm files by default.

So I suggest you check to se if Windows help components are installed and reinstall them if necessary to fix file assignments.

drezgames
19-06-2017, 07:20 PM
@SilverWarior, good points. Thanks!

drezgames
20-06-2017, 03:22 AM
Let me get your opinion, I have a version of the help with html files which will avoid the issues with .CHMs. Would this be better? I do like the fact that a .chm is compressed and self contained. Let me know your thoughts.

1475

Thyandyr
20-06-2017, 08:22 AM
Sorry I was asleep all evening. Better luck tonight?

drezgames
20-06-2017, 05:32 PM
I have not release the build using the raw HTML pages, yet. I was trying to get an idea of if this would be preferred over a .chm file.

Advantages:
- I can theme the window since its part of the calling process
- I can control the output of the help system more easily
- all the advantages of direct control

Disadvantages:
- Have to manage lots of html files in the distro

GameMaker Studio 2 and Unity are using html files so maybe its a better option? I know for myself I like simple and elegant and a single .chm is appealing. But there is the issue already mention that will be an problem with CHM. But, I would like to know other people thoughts on this.

Thyandyr
20-06-2017, 07:36 PM
The .chm opens now all the way. I did not re-download, I did not restart my computer, I didn't do anything! Weird... Computers...

I agree single file help chm or pdf is more appealing. HTML help can be hosted online or separate compressed download as backup.

SilverWarior
20-06-2017, 08:09 PM
I agree single file help chm or pdf is more appealing.

Yes single file help does seem appealing. But the problem with .chm (Microsoft compiled HTML Help) is proprietary technology owned by Microsoft so there are probably some limitation of where you can use it. So if you are thinking about supporting any other platform besides Windows you would probably have to change it.

drezgames
20-06-2017, 08:32 PM
@Thyandyr, ahh... glad you got that working. I know right, computers.

@SilverWarior, again very good points you've brought out.

For now, I think I will go with HTML files. I got the integration in and working. I can context search just like with a .CHM now. It automatically themes, blah blah... again all the advantages of direct control. Plus, it will provide some "future proofing" if/when I decide to move to other platforms.

Interestingly, I dug up some tech I made some time ago (one of my many unfinished projects, haha) where I was able to take the raw html file help system, compress to a zip. I installed an protocol handler (for example lgp://index.html), this would fire an event and I could then fetch the files from inside the zip and display them as normal. This totally worked..... at that time. However, I played around a few hours last night trying to get it work, sadly I was not able to. I know its doable, just have to figure out why the protocol handler is not being initialized properly. Anyway, maybe I can get that working at some point.

Thyandyr
20-06-2017, 10:17 PM
Physics example,

I changed

body := Physics_CreatePolygonBody(MousePos.X, MousePos.Y, Random_Rangef(10, 45), Random_Rangei(4, 4), 1000);

to make heavy squares.

I see funny "non physical" effects, like pivot point in the center of the sqare keeping them floating. Very entertaining but perhaps not intended behaviour.

drezgames
20-06-2017, 10:56 PM
Haha, cool! Still tweaking the physics engine. More work to be done on it for sure. Thanks for giving it a workout!

SilverWarior
21-06-2017, 04:15 PM
However, I played around a few hours last night trying to get it work, sadly I was not able to. I know its doable, just have to figure out why the protocol handler is not being initialized properly. Anyway, maybe I can get that working at some point.

Are you trying to initialize the protocol system wide or in scope use user login session?
You sad that you dug up this tech from long time ago. So I'm guessing it probably predates the UAC (User Account Control) that has been introduced with Windows Vista.

Also does this new protocol only registers for Internet Explorer or is it made available for any installed Browser?

drezgames
21-06-2017, 05:41 PM
@SilverWarior

I found the protocol stuff here (https://jasontpenny.com/blog/2010/03/23/custom-protocol-handler-in-delphi/). I used it before to build the help system and it worked before for me. It will register the protocol and setup a callback within the current process and then remove it on shutdown. I think the issue maybe related to DLL vs EXE. I did some more test last night and placed into an EXE and it will register properly then. I got the files coming in from the HTML folder via the handler and I feed that to browser. It displays the help system interface, but when I click on a link, it then tries to load internet explorer. Not sure what is going on now. This was working perfectly before (maybe 2-3 years ago I think). I got the mime types correct. I see some javascript errors too. Maybe you can figure something out.

Note, the examples work, they are simple static html files. I'm reading in a webhelp system generated by Help & Manual. It could be related to the template too. The more complex ones, im seeing a race condition when it loads, but the classic webhelp template loads just fine. I can navigate around, but any link tries to load IE. I see my protocol handler in the address bar of IE too. It should be continuing to fire to my handler. So something is wrong I have to figure out. Once I get this working, I can then redirect those files from a zip file. If I go WebBrowser1.Navigate('lgp://index.html'), the help system will load in and display. Any links clicked there after, will try to load IE.

SilverWarior
21-06-2017, 09:19 PM
Could you please show me the example of the code you use for loading of custom HTML files? When I'm looking at the example code I can't figure out how to do that properly as in example everything is hardcoded.
Well I did manage to change the first HTML page, but I don't know how to open proper HTML based on the link you have clicked. I'm guessing I need to parse/extract needed infromation from aUrl variable but I just can't wrap my head around how >:(

drezgames
22-06-2017, 12:48 AM
Hi, yea sure. Here is the handler for the test project i'm working this evening. I just figured out how to prevent the new browser window popup Problem. You have to cancel it and then do a new navigation to the URL. The problem now is how to keep the link content within the frame. When you click on a link, the URL will be something like this: lgp://index.html/and.html, this will display and.html within the frame contents of index.html. Gosh, I can't rem now how I made this work. I don't have the old project code version where I got all these little PITA things sorted out. I rem now running up against each one and sorting them out one by one. Once I can get the frame thing sorted out, then I can start trying to read from zip.



procedure TForm2.MyProtocolHandler(aURL: string; var aMIMEType: string;
const aPostMIMEType: string; const aPostData: array of byte;
aMemoryStream: TCustomMemoryStream); // TProtocolCallback
var
fn: string;


procedure WriteOutString(const aStr: string);
var
utf8Out: UTF8String;
begin
utf8Out := UTF8Encode(aStr);
aMemoryStream.WriteBuffer(Pointer(utf8Out)^,
Length(utf8Out) * SizeOf(AnsiChar));
end;


procedure WriteOutFile(const aFilename: string);
var
ms: TMemoryStream;
begin
ms := TMemoryStream.Create;
try
ms.LoadFromFile(aFilename);
ms.SaveToStream(aMemoryStream);
finally
ms.Free;
end;
end;


procedure WriteOutTextFile(const aFilename: string);
var
ms: TStringList;
begin
ms := TStringList.Create;
try
ms.LoadFromFile(aFilename);
WriteOutString(ms.Text);
finally
ms.Free;
end;
end;


function FindMimeType(const url: WideString): string;
var
mimetype: PWideChar;
begin
mimetype := nil;
FindMimeFromData(nil, PWideChar(URL), nil, 0, nil, 0, mimetype, 0);
Result := mimetype;
end;


begin
// remove any slashes from the front
while (aURL <> '') and (aURL[1] = '/') do
Delete(aURL, 1, 1);
// remove any slashes from the back
while (aURL <> '') and (aURL[Length(aURL)] = '/') do
Delete(aURL, Length(aURL), 1);


if aURL.Contains('index.html?') then
aURL := aURL.Replace('index.html?', '')
else
aURL := aURL.Replace('index.html/', '');
if aURL.IsEmpty then
aURL := 'index.html';


// get mime type
aMIMEType := FindMimeType(aURL);


fn := TPath.Combine(TPath.GetDirectoryName(ParamStr(0)), 'HTML\' + aURL);
WriteOutFile(fn);
end;


procedure TForm2.WebBrowser1NewWindow3(ASender: TObject; var ppDisp: IDispatch;
var Cancel: WordBool; dwFlags: Cardinal; const bstrUrlContext,
bstrUrl: WideString);
begin
Cancel := True;
WebBrowser1.Navigate(bstrUrl);
end;

drezgames
22-06-2017, 01:57 AM
@SilverWarior,

Ok, this is what I got. I can now click on the local links and they will open up properly inside the frame of the help system. SWEET! Now, the last nagging thing is getting the javascript to work.


procedure TForm2.FormCreate(Sender: TObject);begin


FMimeTable := TIdMimeTable.Create;
NewHttpProtocolHandler('lgp', MyProtocolHandler);
WebBrowser1.Silent := True;
WebBrowser1.Navigate('lgp://index.html');
end;

procedure TForm2.MyProtocolHandler(aURL: string; var aMIMEType: string;
const aPostMIMEType: string; const aPostData: array of byte;
aMemoryStream: TCustomMemoryStream); // TProtocolCallback


procedure WriteOutString(const aStr: string);
var
utf8Out: UTF8String;
begin
utf8Out := UTF8Encode(aStr);
aMemoryStream.WriteBuffer(Pointer(utf8Out)^,
Length(utf8Out) * SizeOf(AnsiChar));
end;


procedure WriteOutFile(const aFilename: string);
var
ms: TMemoryStream;
begin
ms := TMemoryStream.Create;
try
ms.LoadFromFile(aFilename);
ms.SaveToStream(aMemoryStream);
finally
ms.Free;
end;
end;


procedure WriteOutTextFile(const aFilename: string);
var
ms: TStringList;
begin
ms := TStringList.Create;
try
ms.LoadFromFile(aFilename);
WriteOutString(ms.Text);
finally
ms.Free;
end;
end;


function FindMimeType(const url: WideString): string;
var
mimetype: PWideChar;
begin
mimetype := nil;
FindMimeFromData(nil, PWideChar(URL), nil, 0, nil, 0, mimetype, 0);
Result := mimetype;
end;


function GenFilename(url: string): string;
begin
Result := TPath.Combine(TPath.GetDirectoryName(ParamStr(0)), 'HTML\' + url);
end;


begin
// remove any slashes from the front
while (aURL <> '') and (aURL[1] = '/') do
Delete(aURL, 1, 1);
// remove any slashes from the back
while (aURL <> '') and (aURL[Length(aURL)] = '/') do
Delete(aURL, Length(aURL), 1);


// index.html/? indicate a frame operation
if aURL.Contains('index.html/?') then
begin
// remove index.html/? from the url
aURL := aURL.Replace('index.html/?', '');


// load in the frame
WriteOutFile(GenFilename('index.html'));
end;


// check for index.html/
if aURL.Contains('index.html/') then
begin
// remove from url
aURL := aURL.Replace('index.html/', '');
end;


// if empty endpoint is the frame index else endpoint is a specific file
if aURL.IsEmpty then
aURL := 'index.html';


// get mime type of file
aMIMEType := FindMimeType(aURL);


// load the file
WriteOutFile(GenFilename(aURL));
end;


procedure TForm2.WebBrowser1BeforeNavigate2(ASender: TObject; const pDisp: IDispatch;
const URL, Flags, TargetFrameName, PostData, Headers: OleVariant;
var Cancel: WordBool);
begin
//
Statusbar1.SimpleText := URL;
end;


procedure TForm2.WebBrowser1NewWindow3(ASender: TObject; var ppDisp: IDispatch;
var Cancel: WordBool; dwFlags: Cardinal; const bstrUrlContext,
bstrUrl: WideString);
var
s: string;
begin
// cancel new window operation
Cancel := True;


// get the url
s := bstrURL;


// modify url to indicate a frame load operation,
s := s.Replace('index.html/', 'index.html?');


// navigate to modified url that indicates a frame load operation
WebBrowser1.Navigate(s);
end;

drezgames
22-06-2017, 02:27 AM
Ok, I got it reading from the zip file. Seem to work ok. The one problem i'm seeing is that I can not get the index items to collapse. Not sure what's going there, but everything else seems to be working.

1477

SilverWarior
22-06-2017, 04:45 AM
Ok, I got it reading from the zip file. Seem to work ok. The one problem i'm seeing is that I can not get the index items to collapse. Not sure what's going there, but everything else seems to be working.

I'm not sure but not being able to collapse index tree might be due the fact that by default pages that are being displayed in TWebBrowser component or whenever any third part program is using IWebBrowser interface are being opened in backward compatibility mode. In order to avoid that your program must be registered as a Web Browser. See the link bellow for more information
https://stackoverflow.com/a/25843958

Any way with the help of your posted code I can now display and navigate Platform eXtended documentation properly as it consists of just bunch of self contained HTML files (no use of frames). So I don't even need the code in OnNewWindow3 event.

drezgames
22-06-2017, 05:06 AM
Oh sweet! You got it working. NICE!!

Ok, I will check out the link. Thanks.

drezgames
22-06-2017, 06:14 AM
Oh oh! To use the frames, you simple have to do this:


procedure TForm2.WebBrowser1NewWindow3(ASender: TObject; var ppDisp: IDispatch;
var Cancel: WordBool; dwFlags: Cardinal; const bstrUrlContext,
bstrUrl: WideString);
var
s: string;
begin
// cancel new window operation
Cancel := True;
WebBrowser1.Navigate(bstrURL, '', 'hmcontent');
end;

Just specify the frame name and it will "just work" without all the extra loading I was doing before.


begin // remove any slashes from the front
while (aURL <> '') and (aURL[1] = '/') do
Delete(aURL, 1, 1);
// remove any slashes from the back
while (aURL <> '') and (aURL[Length(aURL)] = '/') do
Delete(aURL, Length(aURL), 1);


// check for index.html/
if aURL.Contains('index.html/') then
begin
// remove from url
aURL := aURL.Replace('index.html/', '');
end;


// if empty its the room else endpoint is a file
if aURL.IsEmpty then
aURL := 'index.html';


// get mime type of file
aMIMEType := FindMimeType(aURL);


// load the file
WriteOutFile(GenFilename(aURL));
end;


Now, on to javascript issues. Oh, I tried the emulation and some other stuff, not working so far. Grrrr!

SilverWarior
22-06-2017, 11:43 AM
Could you provide sample of your help webpages you use. After searching my computer I have no webpages which would be utilizing Frames, so I can't see and diagnose problems you are facing. Therefore I can't actually help but only speculate of what might be wrong.

drezgames
22-06-2017, 02:58 PM
Hi, yea sure. Thanks. This link (https://2drealms.com/temp/HTML.zip)!

SilverWarior
22-06-2017, 08:02 PM
Just tested your help and it seems that there is a problem in FindMimeType function becouse it always returns empty string when it is checking Mime Type of Java Scripts (.js files). Consequently no Java Scripts are loaded properly. I guess.

drezgames
22-06-2017, 08:28 PM
I'm getting 'text/plain' for everything except the image files. I just added this:



if TPath.GetExtension(aURL) = '.js' then
aMIMEType := 'application/javascript';

Still get those errors.

Interestingly, if you do this: WebBrowser1.Navigate('file:///' + TPath.Combine(TPath.GetDirectoryName(ParamStr(0)), 'HTML\index.html')), it all works as expected. So the Twebbrowser component can execute the javascript, there is something missing here that we need to do when running it through the protocol handler.

I've been goodling/bing'ing for hours, trying different things.... nothing so far. Sigh.

Akira13
20-08-2017, 10:40 PM
Is it just me, or is this like the fourth time in the last decade or so this guy has released what amounts to essentially the same engine (GameEngine, PyroGine, Hadron, now Luna) aggressively marketed it for a short while, and then removed all download links from both the forums and his website and just disappeared? Very bizarre......

vgo
07-10-2017, 01:02 PM
So it seems...

I'd be interested to try it out, I'm looking for a game engine for an isometric project.

drezgames
07-10-2017, 02:09 PM
Hi, here are the current builds i have of the project:

OneDrive: link (https://1drv.ms/u/s!AuufJLjg6CUXjXJ1x-MLaY4hOjUR)

Akira13
12-10-2017, 02:37 AM
Uh, how do you expect this to be useful without the source code? What is anyone possibly supposed to do with nothing other than a 32-bit DLL (with no headers to describe the methods it contains) and an editor that's nothing more than than a really really stripped down objectively worse version of the Delphi IDE?

For starters, it isn't 2005 anymore... the vast majority of people are using x64 machines. 32-bit is legacy. Any engine that doesn't natively support the creation of x64 binaries is useless. You might say, "oh, but 64-bit machines can run 32-bit binaries!" but you don't realize how much slower 32-bit code is on 64-bit machines. Basically 32-bit anything should be avoided at all costs except when absolutely necessary.

I get that your engine is obviously built in Delphi which has rather poor x64 support, but that's kinda your problem for not using FPC instead...

Secondly, to further the point about it not being 2005 anymore: there is absolutely no one who has any interest these days in using a closed-source engine with all of its functionality contained in a dynamic library. And for good reason: it's a terrible design that introduces unnecessary latency (especially with regards to any vector math methods you might have in there.)

Furthermore if your DLL is compiled in Delphi it means that the most recent instruction set used by the compiler is definitely the ancient SSE... whereas if the code was available, anyone could compile it with the relevant CPU optimization flags for their setup all the way up to AVX2.

Lastly, if your overall reason for it being closed source is that you're expecting to actually sell it and make money, you're delusional. It's just not going to happen, ever, I promise. That's not even me being pessimistic: it's just that in 2017 the game engine market is massively over-saturated and you need to be doing some crazy crazy stuff to even have a remote hope of gaining the slightest bit of visibility. (I.E, not using an outdated verson of DirectX to draw a bunch of pedestrian 2D stuff everyone's seen million times before as your engine basically does. Sorry to be blunt... that's just how it is!)

drezgames
12-10-2017, 03:08 AM
@Akira13
Then you can simply use another product, right?. That is the wonderfully great thing about choices. You asked for the product, that is the snapshot of where its at. There are no plans of being open source. I'm using commercial software/libraries/components to make this product so there is no way it can be open source. It's a shame that you have to be rude AF when you could have simply messaged me privately and I could have explain the situation. But you choose to go the dick'ish route and piss me off. I don't have a problem with people voicing their opinions, but jeez bro, you're acting like I just let you down and prevented you from completing your project. You came at me hard, so yea i'm a little salty right now. Not so much because of your opinion, but more so from your lack of common courtesy. But that is ok, just like 2005 it's good to know that people are still dicks. Sorry to be blunt... that's just how I see it still too.

And furthermore, who are you to dictate how and for whom I make my own projects? You seem to be taking it way more personal than necessary. This is a project that I'm working on and I posted on these forums to get a little feedback. But you come in making all these claims and assumptions. Taking it so personal as if you paid money. Bro, this product is alpha, something I'm working on more so far my own personal use. You're attacking me and making assumptions. You can't dictate to me which development tools I choose to use, really bro? Anyway, after all these years, nothing really has changed around here. I pop in every so often with a project i'm working on (some my own, some 3rd party) just to get some feedback and every time nothing really changes. The state of the community remains the same. This will most likely be my last visit to this site.

I know that if I had something to say like that, I would have message you privately and in a more professional manner. The one thing you learn as you live life, is that it's the wrong assumption to assume the people will conduct themselves in a like manner as yourself. Sigh!

SilverWarior
13-10-2017, 01:41 PM
Uh, how do you expect this to be useful without the source code?

Why wouldn't it be useful without the source code?
There are many closed sourced game engines out there like Unity, Unreal Engine etc. and they are still very popular. So why do you think that Luna Game Pascal needs to be open sourced to be useful?


What is anyone possibly supposed to do with nothing other than a 32-bit DLL (with no headers to describe the methods it contains) and an editor that's nothing more than than a really really stripped down objectively worse version of the Delphi IDE?

Sure Luna Game Pascal needs some good documentation and working examples to become more appealing but since it is still in development and being developed by a single developer (as far as I know) you can't explect it to have same features and same quality as some other game engine that is being developed by a team of hundred or more developers.


For starters, it isn't 2005 anymore... the vast majority of people are using x64 machines. 32-bit is legacy. Any engine that doesn't natively support the creation of x64 binaries is useless.

If anything except 64 bit is useless then why do big game engines still support creation of 32 bit games?
Any way I think that piradyne would love to offer 64 bit support but from what I have seen it seems that Luna Game Pascal has its own custom compiler. Since creating another custom compiler with 64 bit support is not an easy task I'm guessing piradyne might be currently focusing more on other features in order to gain at least some users for his engine.


I get that your engine is obviously built in Delphi which has rather poor x64 support, but that's kinda your problem for not using FPC instead...

You say this like FPC is the only way to go. But it isn't.
Sure Delphi has some flaws but so does FPC. Neither of them is perfect. If one of them would have been perfect then entire Object Pascal Programming community would have switched to that tool already.


Furthermore if your DLL is compiled in Delphi it means that the most recent instruction set used by the compiler is definitely the ancient SSE... whereas if the code was available, anyone could compile it with the relevant CPU optimization flags for their setup all the way up to AVX2.

Not true. As you can read in the Stack Owerflow question bellow Delphi does also support newer instruction sets.
https://stackoverflow.com/questions/6417877/does-delphi-support-all-mmx-sse-instructions

Any way @Akira13 if you know so much about game engines and how they "should" be made why don't you take reign as project leader of PGDCE and help by leading comunity into making one of the best game engines for Object Pascal?

laggyluk
14-10-2017, 08:46 AM
Why wouldn't it be useful without the source code?
There are many closed sourced game engines out there like Unity, Unreal Engine etc. and they are still very popular. So why do you think that Luna Game Pascal needs to be open sourced to be useful?

To be precise full source of UE4 is available on github.



Any way @Akira13 if you know so much about game engines and how they "should" be made why don't you take reign as project leader of PGDCE and help by leading comunity into making one of the best game engines for Object Pascal?

this

SilverWarior
14-10-2017, 03:31 PM
To be precise full source of UE4 is available on github.

Well I didn't know that so I stand corrected.

Akira13
15-10-2017, 01:55 AM
@Akira13
I know that if I had something to say like that, I would have message you privately and in a more professional manner. The one thing you learn as you live life, is that it's the wrong assumption to assume the people will conduct themselves in a like manner as yourself. Sigh!

Admittedly I was a little more aggressive in that message than necessary. I wasn't really "asking" for the "product" though, nor was I personally that interested in it (as it's just a rehash of the same thing you've been posting forever.) I was simply pointing out that you have been following this cycle of releasing essentially the same thing over and over again and then just randomly disappearing and going scorched earth on all links to any downloads for the better part of a decade. Which is extremely odd behaviour IMO, that you've still never attempted to explain. Also, given the fact that it has virtually identical example demos as what you posted as far back as 2010 and earlier, calling it an "alpha product" is rather disingenous as the codebase is obviously years old, don't you think?


You say this like FPC is the only way to go. But it isn't.
Sure Delphi has some flaws but so does FPC. Neither of them is perfect. If one of them would have been perfect then entire Object Pascal Programming community would have switched to that tool already.

It kinda is these days for stuff that falls into the category of what PGD is focused on (i.e. games and other "high-performance-required" 2D and 3D graphics applications.) Delphi's RTL and VCL are certainly more expansive than the FCL and LCL, I don't think anyone would question that, but FPC itself is a massively better compiler than DCC32 that produces far faster code.


Not true. As you can read in the Stack Owerflow question bellow Delphi does also support newer instruction sets.
https://stackoverflow.com/questions/...e-instructions (https://stackoverflow.com/questions/6417877/does-delphi-support-all-mmx-sse-instructions)

Don't think you understood my point. Yes, you can use newer instruction sets in Delphi if you're writing assembly by hand. The Delphi compiler however does not, cannot, and will not make use of anything higher than SSE (or SSE2 with the 64-bit version, occasionally) when generating ASM from Pascal code in the process of compiling an actual "normal" executable. Compare this with FPC where you can simply set the optimization flag relevant to your CPU (which go all the way up to AVX2, again) and the compiler will attempt to make the best use of instructions up to that set that it can.


Any way I thinkthat piradyne would love to offer 64 bit support but from what I have seen it seems that Luna Game Pascal has its own custom compiler.

lol "custom". I guarantee you he's just using the PaxCompiler Delphi component, which does in fact support the 64-bit Delphi compiler.


Any way @Akira13 if you know so much about game engines and how they "should" be made why don't you take reign as project leader of PGDCE and help by leading comunity into making one of the best game engines for Object Pascal?

Obviously this is a "if you're so great why don't you do XYZ thing" sort of suggestion, but I have actually dug around the PGDCE codebase quite a bit in the past year or so... IIRC I had gotten pretty far with replacing that include-file nightmare "template" library it uses with real generic containers from Generics.Collections, and had also begun making a pass at converting the various vector-math records from using free-standing comparison functions to using overloaded internal "class" operators.

If there was any real interest I'd be more than happy to make finishing what I was working on in that regard a personal priority, and then deciding where to go from there. (I think I'd probably look at getting rid of the deprecated fixed-function matrix manipulation routines that the main OpenGL renderer used, next. I mean, it doesn't make a lot of sense to name it TCEOpenGL4Renderer when it calls glLoadMatrixF, glScaleF, e.t.c....)

SilverWarior
15-10-2017, 03:57 AM
but I have actually dug around the PGDCE codebase quite a bit in the past year or so... IIRC I had gotten pretty far with replacing that include-file nightmare "template" library it uses with real generic containers from Generics.Collections, and had also begun making a pass at converting the various vector-math records from using free-standing comparison functions to using overloaded internal "class" operators.

If so why haven't you posted any of the changes you made back to Github repository? Perhaps there would be more interest from others if they would know that someone is working on PGDCE at the moment. But until now I haven't seen any indication that you are working on PGDCE and I'm checking PGD forums almost on a daily basis.

Akira13
15-10-2017, 04:37 AM
If so why haven't you posted any of the changes you made back to Github repository? Perhaps there would be more interest from others if they would know that someone is working on PGDCE at the moment. But until now I haven't seen any indication that you are working on PGDCE and I'm checking PGD forums almost on a daily basis.

I had simply downloaded it a while ago and was working on it locally. I was aware that the original team for the engine for some reason cared about supporting Delphi 7 (which obviously has no generics or operator overloading) meaning none of the changes I was making would be usable. It was just sort of a fun side-project for me.

That being said, again, I'd be perfectly happy to do some "real" development on the repo and commit the changes I'd made personally if anyone was interested (after cleaning them up, haven't looked at them for a while), if it is in fact the case that people have finally realized that Delphi 7 came out in 2002 and is not something that anyone should care about supporting anymore. Also, a game engine that actual game developers might actually want to use in 2017 needs to support OpenGL 3.3+ as the default/base, with MAYBE an OpenGL 2.0 "fallback" (although personally I'd leave it out...) Leave the OpenGL 1.0 fixed function stuff "at home", as they say...

laggyluk
15-10-2017, 07:18 AM
That being said, again, I'd be perfectly happy to do some "real" development on the repo and commit the changes I'd made personally if anyone was interested (after cleaning them up, haven't looked at them for a while), if it is in fact the case that people have finally realized that Delphi 7 came out in 2002 and is not something that anyone should care about supporting anymore. Also, a game engine that actual game developers might actually want to use in 2017 needs to support OpenGL 3.3+ as the default/base, with MAYBE an OpenGL 2.0 "fallback" (although personally I'd leave it out...) Leave the OpenGL 1.0 fixed function stuff "at home", as they say...
I guess dropping D7 and moving away from old GL wouldn't be much of a problem since those interested in them also wore out and don't contribute anymore :P

Akira13
15-10-2017, 11:27 PM
I guess dropping D7 and moving away from old GL wouldn't be much of a problem since those interested in them also wore out and don't contribute anymore :P

I'm not really sure what your point is here, or whether you're agreeing or disagreeing with what I had said... but in case of the latter (or even if not, as I know there are others who do still believe D7 is the best thing since sliced bread, even if you're not one of them), here's what I think:

The bottom line is that while yes, the merits of the newer, 2009+ Delphi versions versus FPC/Lazarus can certainly be debated, the merits of Delphi 7 vs FPC/Lazarus can't be. FPC/Lazarus is objectively better than Delphi 7 in every possible way by a huge margin. Anyone still using Delphi 7 who doesn't want to pay for a newer Delphi version should just switch to Lazarus, end of story. It is a massive upgrade for zero dollars. There's no logical argument to the contrary. (I say this as someone who used Delphi 7 professionally at the time of its release and for years afterwards, by the way. You could not pay me enough to go back to using it after having used Lazarus and newer Delphi versions for as long as I have since.)

So, adding generics/operator overloading/e.t.c to the engine would not actually be excluding anyone, because if they didn't have access to a 2009+ Delphi version they could just use FPC/Lazarus instead, as it supports all the same modern features. (And indeed, using it with FPC would be the first choice of a large number of people, as opposed to a secondary option after Delphi.) Look at something like Castle (which arguably IS the best Object Pascal game engine there is, currently): it only very recently began to make moves towards supporting any form of Delphi at all, and for most of its existence has only supported FPC.

Have you ever seen anyone complaining about that? No, because there is pretty much no real person that is both highly interested in using Pascal for game development, and also completely dead-set on using Delphi 7. Even when Castle does get to a point where it could be considered to have "full" Delphi support, it still absolutely will not support pre-2009 Delphi versions as it makes heavy use of generics and operator overloading. Again though, you won't see anyone complaining, because there isn't actually anyone who sees this as a problem. As I said yesterday, Delphi 7 came out in 2002. It's 15 years old!

How much other 15-year-old computer software or hardware do you use in your daily life? Likely none. What's different about D7 that merits it an exception? Nothing, in reality. It's horribly outdated, and it's not remotely reasonable for anyone to assume that it should still be as usable in all cases as it was when they first got it. Nor do I remotely understand why they'd want to keep using it. Have you actually tried to develop anything in it recently? It's not a good user experience, at all, unless you're wearing several pairs of rose-tinted glasses.

Lastly, to your point about "old GL": I don't think the engine was really trying to use it in the first place. It just had it in a few strange spots, presumably as placeholders. Someone with a GPU that did not support at least OpenGL 2.0 (which is virtually no one) would not have actually been able to run anything written in it anyways.