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 Classic Chat / Tough decision. AGK or Android SDK.

Author
Message
Fallout
22
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 9th Sep 2013 15:31
So I'm working on a new game for mobile which is going to be in 3D. After some initial ground work making tools, I've now moved onto testing different development methods. Specifically, AppGameKit for Android and coding in Eclipse/SDK/OpenGL ES 2.0 directly. The test was simply rendering 400 meshes of the type I'll want to display and checking FPS.

Results were:
37 FPS average with AGK
51 FPS average with the droid SDK

Other considerations are:
- It's significantly more work to code in the droid SDK, especially with OpenGL, as it's very easy to introduce bugs.
- There's a load more flexibility coding in OpenGL, but again, those memory/buffer bugs!
- Java OO is a much nicer way to develop than AppGameKit procedural. I haven't looked into Tier 2 yet though. Perhaps that's the solution.
- I will need to have all the power of Google Play, AdMob, In-App purchasing APIs etc.
- But one day I may want to port to iOS ... so AGK.

I was hoping for a more significant FPS variation than 40%, one way or the other, to make the decision easier, but nope! It's sitting on the fence. I will definitely be pushing poly counts hard.

At the moment I'm leaning towards having a go with AppGameKit Tier 1, thinking of it as a prototype, seeing how far I get and then making the call on Tier 2 or Eclipse/SDK/OpenGL when I know what the AppGameKit shortfalls are, and if they'll be improved.

Just voicing my concerns and happy to accept all input and thoughts.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 9th Sep 2013 16:54
Before Jim chimes in I'll point out there's also what he calls "Tier 3", AppGameKit for Pascal. Might be worth a look too if you want to try everything.

Tier 2 is probably the way to go for you, you can code in C++ for all platforms effectively. I haven't tried any T2 projects yet but as a GDK Dev you'd be all set as far as I can tell...

"Everything should be made as simple as possible, but not simpler."
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 9th Sep 2013 17:13
Tier2 should be much closer to the speeds you get with the SDK, but as you already pointed out - 15fps is not really worth the extended development time, I'd see the point if it was more, but right now I'd say it was a fair trade-off, 40% frame rate for smoother/faster development.

I'd definitely get started with Tier1, use abstraction as much as possible, get the game fleshed out - it's so much nicer to use C++ when you have a solid plan for development... really I'd say that you won't get the same benefits when you go to Tier2, if you don't nail down the game design with Tier1 first, not with something as complex as a space exploration/trading game.

I am the one who knocks...
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 9th Sep 2013 17:20
The trick with making the design in Tier 1 and then moving to Tier 2 is that some things do behave differently.

In Tier 1, any time you call Sync() it updates all the display stuff and all of the user/device inputs (touches, accelerometer, key presses, etc.).

In Tier 2, the user/device inputs are updated either at the beginning or end of the app::Loop() method. Calls to Sync() anywhere will update display elements and physics. But it does NOT update the user/device inputs.

I have a fairly comprehensive Tier 2 tutorial for doing a basic state machine to handle the issue. But it became longer than we expected and I am trying to find the time to split it up (it will eventually go into the help system). But I am under the gun to actually get my WIP published. After that, I can get it done.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 9th Sep 2013 17:21
Is it the starship game? That would be awesome

I made a very simple game in tier 1(bomb breaker), just to try it out, the broadcasting is a great feature and there is an online apk builder which is also awesome. I think these are the only two things I will miss though.

If you are like me and wanting game dev to be a career then this is my approach.

I am using AppGameKit tier 2 and building up a set of tools/libraries which will be the base for all my games so I am not starting from scratch every time. Also, much of the base consists of non AppGameKit code so porting a game to a different renderer would be a little easier should I choose to do so in the future. Some of the things I have finished or am currently working on are as follows.

Event Managing System
Process Managing System
GUI (small agk dependency)
PhysX Vehicles
Canvas (large agk dependency)
Procedurally animated spiders(insects/aliens) - was a uni project but I've added it to my framework.

If you think any of that could help you with your game then give me a shout I would be more than happy to help with any project.

I tend to only do really quick prototypes in tier 1, use tier 2 for more detailed prototypes because then you will almost certainly be left with some usable code for your project.

Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 9th Sep 2013 17:30 Edited at: 9th Sep 2013 17:33
Quote: "In Tier 2, the user/device inputs are updated either at the beginning or end of the app::Loop() method. Calls to Sync() anywhere will update display elements and physics. But it does NOT update the user/device inputs."


This could explain a tier 1 issue some of us had with the ultrabook sensors and touch. My app had to run at over 100 fps to be responsive to the sensors, if I used tier 2 I could have just let the loop run as fast as possible while calling sync() 60 times per second. This could be another example of the flexibility of tier 2.

Edit: I am taking the approach now that you should only call sync() in one place in your game, with only the odd exception.

Fallout
22
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 9th Sep 2013 17:53
Thanks for the input and thoughts guys, and thanks Ms Ancient for the heads up on those issues. I probably would've piled in and been head scratching for a while when I hit that issue.

To pick up Van's point and then ramble about everyone elses, Tier 2 C++ would still be significantly less complicated than Android SDK + OpenGL. Unless there are some new libraries out that I'm unaware of, OpenGL is a right old rabbit warren. To do my performance test I had to lift classes from an older droid OpenGL project I was working on, and many thousands of lines of model loaders, meshes, renderers, buffers, factories blah blah is required for well structured OpenGL programming. If Tier 2 handles all that for me (as I'm sure it does) then that's most of the Android SDK approach complexities removed.

I've already used Tier 1 to work on an app, so have done some serious AppGameKit work, though never used 3D in AGK. Can't see that being an issue though. Before that I did C++ and GDK to write Carnage (RIP ) so using a TGC library in C++ has a lot of appeal. Programming in OO calling a TGC library is almost second nature!

I don't think the FPS for my test would be any different in Tier 2, as it was purely a static render test, but there will be a lot of AI, collision, etc calculations going on, so native C++ sounds good for that. Plus the game will have complex data structures and objects. I am really down with the usefulness of OO and inheritance when dealing with complex simulations.

And Matty, yep this is the space game. This'll be the third (and most serious) attempt at it. I'm still using DBPro to make my development tools, as it's so quick and easy. Perhaps I should be using Tier 1 AppGameKit, but anyway, I already have the majority of a ship hull designer tool done and it saving to a file format, so it's time to get developing the game and making my ship interactive!

I'll give you a shout if I have any thoughts. In fact, once I've made a dent in this thing and have something to show, I'll start a WIP.

At the moment I'm leaning towards jumping straight into Tier 2 and seeing where it takes me.

Thanks for your thoughts guys. It's helped me to rationalise it all.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 9th Sep 2013 18:34
For what it's worth I think it's a real shame you didn't finish Carnage

"Everything should be made as simple as possible, but not simpler."
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 9th Sep 2013 18:35
Didn't finish Carnage 'yet'

Good projects don't die, they just go on the perpetual back burner.

I am the one who knocks...
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 9th Sep 2013 18:44
Yeah, my backburner is the size of a house now...

"Everything should be made as simple as possible, but not simpler."
Fallout
22
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 9th Sep 2013 19:30
Yeah, it is a shame. My back burner is a volcano too. If I ever get into the right position again, I'd like to revisit it.
Fallout
22
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 9th Sep 2013 22:25 Edited at: 9th Sep 2013 22:25
Woah, what a faff it is getting this to work with Eclipse. Gave up for the night. Maybe picking AL's brains tomorrow I fear.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 9th Sep 2013 22:40
Mostly, if you follow the steps in the Tier 1 Android guide to get your basic Eclipse setup done and then the Tier 2 Android guide for some extra bits, then you have a good start.

If you are using Tier 2 and add your own code files to the template.cpp one, then make sure to edit the <andproj>/jni/Android.mk file to add the file names between Core.cpp and template.cpp.

And, if you are using any media and use full path names like '/media/imag.png' in your Load commands (like I do), make sure to copy your entire media directory into the <andproj>/assets/media directory.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Fallout
22
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 9th Sep 2013 23:03
Hi AL. I went through most of the Tier 2 guide and got most of the way there, but have some of the usual environmental errors. I've never used cygwin before, or have much experience with make files etc. I don't really enjoy blindly going through a step by step guide without having a full understanding of all the components. Also the guide is a little 'indecisive' in places, such as "It's a good idea to" or "you might want to" which leaves me wondering if my errors are because I chose the wrong path!

So fresh eyes tomorrow morning, and I'll take my time getting each bit in place, then will be back in tears if I still can't figure it out.

Cheers for the pointers.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 9th Sep 2013 23:18
Well, fortunately, once you have cygwin installed and the configuration in your project set up, you can use the HardCodedCompileScript.bat to do the actual compilation. And then you don't need to go into cygwin at all.

You might need to edit the file to make sure that it is using the correct path for where the ndk is installed.

Odds are good that just about any issue you run into has been discussed somewhere in this or the AppGameKit Android forum.

Path choices are the kind of thing people like to have control over. So I sorta understand the wordage in the guides.

I used C:\Android for the basic Android, C:\Android\android-ndk and C:\Android\android-sdk for the ndk and sdk, respectively. I go for simple stuff. I use C:\TGC\AGK108<subversion> for my actual AppGameKit installs so that I can keep multiple for testing stuff against.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Fallout
22
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 11th Sep 2013 13:20
Cheers AL. After some faff with paths, includes, environments, blah blah it all seems to be working and I'm running the AppGameKit template app on my device. Now the real fun/pain begins ...
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 11th Sep 2013 16:11
I hope you enjoy the process.

Remember, if you add your own code files (.cpp/.h) to copy them to the <andproj>/jni directory and add the .cpp file names between Core.cpp and template.cpp in the <andproj>/jni/Android.mk file. Otherwise they won't be part of the compilation.

Happy Programming!

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Fallout
22
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 11th Sep 2013 16:50
Thanks AL. It's still somewhat of a toss up between this and just using the SDK. I'm missing the intellisense, and having to check the log for errors isn't ideal (not a huge hassle though). No context sensitive help. Slightly longer compile time and a few extra clicks required to get to testing the app. No huge dramas, but it does feel quite hacky, unlike using the SDK or using Tier 1. Still think I'll give it a good go though and see how I feel about it.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 11th Sep 2013 17:15 Edited at: 11th Sep 2013 17:19
Well, you can do the development in MS VS Express 2010, with all the things you are looking for, and then just copy the code files to the Android project and build it. This is how I handle my stuff and I use the same code files in Windows, Android, iOS and Mac (copying across computers).

For cross compatibility and clean compile, this is what I start with as a basic template (taken from a state machine tutorial being worked on).
template.h:


template.cpp:


I did a quick copy and edit of the actual code, which has lots of things going on including actual calls to setup and game processes (in another file). But you might get the idea.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master

Login to post a reply

Server time is: 2024-11-24 19:51:22
Your offset time is: 2024-11-24 19:51:22