Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Pascal / Delphi XE5+ with AGKPascal

Author
Message
keithml
18
Years of Service
User Offline
Joined: 25th Jul 2005
Location: Florida
Posted: 19th Apr 2014 16:25
Hi. I am excited about using AppGameKit with Delphi. It is by far my preferred development system, so support for Delphi was a big selling point for me. Kudos to the developers and testers who made this possible!

Is it possible to use Delphi XE5/6s rather slick multi-platform compilation to Android/Apple or do you still have to use Free Pascal and go through some hoops?

Thanks,
Keith
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 19th Apr 2014 16:57
Good thinking. I'll be investigating this shortly. XE5 is great - but I'm getting fed up with expensive updates to Delphi that should be a lot cheaper for recent purchasers.

This is probably mainly a linker issue - so should be possible.

-- Jim - When is there going to be a release?
keithml
18
Years of Service
User Offline
Joined: 25th Jul 2005
Location: Florida
Posted: 19th Apr 2014 18:12
I would agree with the pricing problem. Changing to a twice a year model is not a good idea. They are pretty much forcing you into their subscription service that gives you 2 updates a year at the price of 1 update.

Keith
keithml
18
Years of Service
User Offline
Joined: 25th Jul 2005
Location: Florida
Posted: 25th Apr 2014 21:16
Jim. I know you have not looked into this in detail yet, but can you give me some sort of general idea at what obstacles there are in porting the Free Pascal stuff (for iOS and Android) to work with Delphi?

Keith
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 5th May 2014 09:47 Edited at: 5th May 2014 23:54
If you have XE5 you don't need to use AppGameKit for anything except high-performance games. The core problem is integrating the AppGameKit interface to OpenGL with FMX. I've been working flat out on stuff I get paid for, so I will try it when I can see light at the end of the tunnel!

-- Jim - When is there going to be a release?
keithml
18
Years of Service
User Offline
Joined: 25th Jul 2005
Location: Florida
Posted: 5th May 2014 17:34
Understood! I can definitely understand being buried in work. Good luck finding the other side of the mountain ...

Keith
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 5th May 2014 23:58
Thanks, Keith! Adding new technology is always a bit of a learning curve.

-- Jim - When is there going to be a release?
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 17th May 2014 11:16
Just to let you all know - I've been looking at this. It may take a while, because it's very complicated.

Firemonkey mobile does not permit the types:

AnsiString
AnsiChar
PAnsiChar

This means that AGK.pas will need a modified FMX interface section, because AnsiStrings etc are widely used. In many case the default Unicode string type can be used - but there's a lot of potential for mess-ups. Another option is "array of Byte", but this could get nasty.

Free Pascal uses 8-bit char type by default, so it's not a problem using Lazarus/FPC. Delphi uses Unicode. Lazarus is ghastly to use as an editor after the superb Delphi IDE, so it would be nice to be able to get a Firemonkey version working. I will have another play.

-- Jim - When is there going to be a release?
keithml
18
Years of Service
User Offline
Joined: 25th Jul 2005
Location: Florida
Posted: 17th May 2014 21:37
It appears there is an easy fix for this!

[href]http:// http://andy.jgknet.de/blog/2013/10/the-return-of-the-byte-strings/[/href]

Keith
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 18th May 2014 00:40
There is absolutely NO way I'm going to patch system DCUs. I need Delphi to make a living. What happens when there's an update? Chaos.

The native char type for iOS and Android is widechar (as it is for Windows). So really the AppGameKit string type should catch up. This is unlikely to happen in the next few weeks, months, possibly years - so we need to find some workarounds that will be reliable.

I will ponder!

-- Jim - When is there going to be a release?
keithml
18
Years of Service
User Offline
Joined: 25th Jul 2005
Location: Florida
Posted: 18th May 2014 06:14
I agree that AppGameKit should be unicode by now. Bummer.

I certainly understand your aversion to changing out system dcus. Let me know if you have a better option, but as a last resort, I don't think it is really that big of a deal to switch out the dcus. Simply make a copy of both dcus. When compiling with AppGameKit copy in the ansi friendly one, for everything else copy in the official one. The rare times Delphi gets updated, copy back the official ones and tap your foot until an updated ansi version arrives.

Keith
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 18th May 2014 11:41 Edited at: 18th May 2014 12:40
I take your point. But it's a bit ugly. It would be good if AppGameKit could work out of the box.

EDIT:

I've looked at this very closely now, and it's a nightmare, but will keep trying!

If we can't get it to work, I have another suggestion. The Delphi IDE is excellent. So why not use it instead of Lazarus, which isn't? Then we add a tool to the Delphi IDE to compile, link and sign using FPC instead of Delphi, and manage deployment via USB if required. All of this is possible. It means you develop your Windows version until you're happy, then smack it out to Android in more or less one step. This has the benefit of working for all Delphi versions, not just XE4/5/6/n.

-- Jim - When is there going to be a release?
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 18th May 2014 15:08
Progress:

I'm a bit more positive about a direct interface.

The hack does not need to replace android DCUs for system.ByteString because there aren't any!

Don't need AGKPas' interface to Java because XE5 has it already.

Don't need to edit XML files because XE5's provisioning does it.

Hmmmm!

-- Jim - When is there going to be a release?
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 26th May 2014 18:04
As a new Delphi user, thanks to the many positive posts of Jim Hawkins, I am now an XE6 user, and managed to make 1 test app & deploy on android & ios to test the whole deployment process.

I have everything set up good, so there is no way I am going to set for anything less than AppGameKit for XE6
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 26th May 2014 18:32
Is it worth me continuing, then? I have slightly (!) more time now.

-- Jim - When is there going to be a release?
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 26th May 2014 20:20 Edited at: 26th May 2014 20:23
+1 for me, but i don't know if there are 100s of AppGameKit users using T3

on the other hand why doesn't TGC make an agk plugin for delphi and try to reach Embarcadero users? they have the sources it would be easier for them
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 26th May 2014 22:15
If TGC compiled with anything but VS it would be easy. VS is not compatible with Gnu or any other compilers, I think, so we can't link the lib files, and have to resort to DLL for PC. Shame.

-- Jim - When is there going to be a release?
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 26th May 2014 22:17
so i have to ask again, why does tgc not want to "help out" in this matter? having agk to integrate with as many systems as possible can only get new users onboard
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 27th May 2014 00:19 Edited at: 27th May 2014 00:19
I understand fully that once you go down a particular route it can be difficult to backtrack. In this case, I've repeated ad nausea over years that dependence on VS is a serious error, to no avail. We can't link to .lib files because they're COFF.

To be brutally honest - if you have the power of FMX at your disposal, AppGameKit is pointless. FMX is far from perfect - but it's there, it works on Windows, OS X, and Android. I really like the TGC team, but I think that they have fallen behind, at least for professional users.

-- Jim - When is there going to be a release?
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 27th May 2014 12:09
Here's a complete program being written that demonstrates just some of the power of XE5/6

http://www.youtube.com/watch?v=YAE7N1XGPf4

-- Jim - When is there going to be a release?
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 27th May 2014 15:59
JimHawkins, I am a total newbie in Delphi, I have only done 1 app to test the whole process from conception to deployment, and my main aim is to use it to write productivity apps with buttons, listviews etc...

I have not yet checked out the graphical side of FMX and if it can do 2d sprites at 60fps, so I cannot compare it to AGK.

I am using Construct2 to do game prototypes and the fast deployment and constant updates are unmatched by AGK
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 27th May 2014 16:12
thanks for the 3d game link, its an eyeopener.

my only disappointment so far is that i cannot find a lot of books or resources aimed at the newbie for XE5 or XE6. I know that Delphi is not as popular as Visual Studio, C# & .Net but i thought there would be more options. For now I'm plodding along, I made 1 app without too many problems
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 27th May 2014 16:41
bj - There are lots of videos on YouTube.

It's not really frame-based, but timer-based, so it's a bit hard to compare.

-- Jim - When is there going to be a release?
keithml
18
Years of Service
User Offline
Joined: 25th Jul 2005
Location: Florida
Posted: 28th May 2014 15:52
What's missing in FMX is a ready to go and supported physics/particle/sprite game API. There is a lot of development to do before you get to create your game itself. That's why I like the idea of using AGK.
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 28th May 2014 16:16
I'm making progress on FMX + AGK. Bear with me.

-- Jim - When is there going to be a release?
keithml
18
Years of Service
User Offline
Joined: 25th Jul 2005
Location: Florida
Posted: 28th May 2014 18:20
Awesome!

Keith
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 28th May 2014 22:45
It's a bit complicated unifying the systems. The symbolic names for the Java interface are different. Doing my best!

-- Jim - When is there going to be a release?
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 29th May 2014 14:59
Just to keep you all up to speed - I'm making good progress on this. It's not easy, and I now REALLY appreciate Erik's work on it.

The XE5 Android system has a lot of helper functions which may simplify some code eventually, making the interface easier to maintain and giving us access to all Android functionality.

It's still in the compiler error message stage as I try to convert the interface that works in FPC but doesn't in Delphi.

It will be necessary to have some conditional Uses clauses in projects, but I'll try to make that as clear as possible when I get it going and can generate some templates.

Be patient! This is NOT easy.

-- Jim - When is there going to be a release?
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 29th May 2014 18:45
@keithml somewhere I saw a box2d thing for Delphi
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 29th May 2014 19:09
http://www.fmxexpress.com/box2d-physics-engine-for-delphi-xe6-firemonkey-on-android-ios-windows-and-osx/

This is for XE5/6 - haven't tried it. But I have a strange feeling that this kind of thing could overtake AGK's engine very rapidly.

-- Jim - When is there going to be a release?
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 30th May 2014 22:20
yes that's the one it was on fmxexpress

i have not tried out any games related stuff with xe6 yet, as i am mostly using it to build productivity apps, but if it mirror's agk basic sprite features I might as well start converting my 2 projects from c++ to pascal!!!
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 31st May 2014 00:10
You can mix C++ and Pascal in the same project! Not that I've tried it.

-- Jim - When is there going to be a release?
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 31st May 2014 14:14
The box2D is actually very good - well worth a look, and very professionally programmed. I think it's the entire Boxd2 system. The multi-test project shows everything.

However - obvious there's no audio - so to actually use it ffmpeg or OpenAl would be needed.

-- Jim - When is there going to be a release?
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 31st May 2014 14:24
apparently, you cannot use c++ code in the same delphi unit

on the other hand you can compile delphi units as it, in c++ builder!

i didn't know that, so thanks for the tip!
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 31st May 2014 14:42
Correct - not in the same unit, but as part of a project. It's an amazing feature.

-- Jim - When is there going to be a release?
keithml
18
Years of Service
User Offline
Joined: 25th Jul 2005
Location: Florida
Posted: 10th Jun 2014 17:14
Jim,

Hi. Just curious how things are going on the AppGameKit Delphi project.

Keith
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 10th Jun 2014 18:51
Had to divert to actual work. Can compile, but some Java interfacing to fix up!

-- Jim - When is there going to be a release?
keithml
18
Years of Service
User Offline
Joined: 25th Jul 2005
Location: Florida
Posted: 11th Jun 2014 15:49
Sounds like progress to me.

Keith
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 12th Jun 2014 19:49
The trouble is that I have so much else to do, and at the age of 71 I need to focus on the job in hand. My multi-tasking skills have descended to the crap levels of iOS!

-- Jim - When is there going to be a release?
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 16th Jun 2014 18:21
I'm going to put my hands up here and say that this is for too complex to be worth months of effort. The methodologies are very different, the Java interfaces are different, and, given the power of CE5/6, most things can be done more simply in other ways.

To explain a little more: the start-up mechanisms are so different that I have simply have no idea how to integrate them.

Sorry to disappoint, but there are times when "Way beyond me" is the only thing to say.

Jim

-- Jim - When is there going to be a release?
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 18th Jun 2014 15:00
we need some other sdk to make a 2d plugin for Delphi then. AppGameKit is still too far behind anyway, so it's not worth spending all that time to have a half-baked sdk implemented
keithml
18
Years of Service
User Offline
Joined: 25th Jul 2005
Location: Florida
Posted: 18th Jun 2014 17:08
You gave it a try! I guess I'll have to install the Free Pascal compiler and give it a try for the Android part. It would have been cool though.

Keith
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 18th Jun 2014 20:04
I can get a one-off compile from Lazarus without Eclipse.

Except for the fact that the new version has a Java import error I haven't fixed yet! When I have, I will explore automatic send via adb.

It's actually faster than XE5!

-- Jim - When is there going to be a release?

Login to post a reply

Server time is: 2024-04-25 15:56:42
Your offset time is: 2024-04-25 15:56:42