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/AppGameKit Studio Showcase / Runtime Perlin Landscape Test

Author
Message
paul5147
18
Years of Service
User Offline
Joined: 11th Jan 2006
Location: Hot & Sunny
Posted: 30th Mar 2013 13:11 Edited at: 30th Mar 2013 14:05
Hi everyone, i think this is my first post here, so hello to you all. I needed a break from my race track editor over in DBPro and decided to have a play around with AppGameKit now it has some 3d commands. Having downloaded the latest beta i set about looking through the help on the 3d commands only to discover that they are, how shall i put this, limited shall we say, and yes i know its a beta, but i guess i`ve just been spoiled over in DBPro. Still not to be put off i gave it a shot and for a few hours work i`m impressed. Especially the performance on my cheap phone that it even runs with the lighting shaders, still not sure why it needs them to simply texture and shade a simple 3d object, but it works.
It a simple perlin noise landscape generated at run time, but without vertex commands the only way i could see to do this is to export it as an obj file including its normal and uv data and then reload it back in, i thought this would be ridiculously slow but it appears not, even calculating the normals doesn`t seem to trouble it.
So far so good, i cant wait for this to become an official part of AppGameKit if this is what its capable of now i can see some good things ahead.The FPSC to AppGameKit tool looks promising as well, has anyone tried it?

I`ve attached the project zip if any one wants to try it and let me know the sort of fps you get on your devices,thanks.

Attachments

Login to view attachments
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 31st Mar 2013 12:10
That looks awesome

I Think you are the first to do one with proper normals and lighting in agk

Be sure to post the code for this in the codebase,its the same as for dbp but simply select agk as language.
I could see this to be usefull in future Projects.

I hope mike max see this as it would improve his cool racer game even more

Android 2.3 , ZTE Skate , 480x800 , 800 mhz , Samsung Galaxy Y , 240x320 , 832 mhz , Sony ericson arc 480x854 , 1 ghz
Android 4.0 , Dmtech 3g 9738B , 1024x768 , 9.7 inches , 1.2 ghz
MikeMax
AGK Academic Backer
12
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Paris
Posted: 31st Mar 2013 15:24
It's a cool project
paul5147
18
Years of Service
User Offline
Joined: 11th Jan 2006
Location: Hot & Sunny
Posted: 6th Apr 2013 21:16
Another quick test now i have the hang of the normals and uv data for AppGameKit objects,i decided to nock together a quick editor in DBPro and output the results as obj format for loading back into AppGameKit,just to see if everything looked right,apart from the uv data being flipped for some reason,i think this is down to the obj format using the opposite rotation for its vertexdata,and easily fixed,every thing went ok,this opens up a lot of options for level creation outside of AGK.The video capture software doesn't seem to like the AppGameKit window but i can assure you it does run at a smooth 60fps even on my budget android phone.The normals do there job properly with a basic point light shader,i tested by repositioning the light to the camera position and changing the range and color values and everything worked as expected in 1089






If anyone wants the DBPro editor code let me know and ill post it up,it is a bit rough and the directories are hard coded so you would have to change them to suit yourselves
The Zoq2
15
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 6th Apr 2013 23:10
That looks awesome, I would love to see the DBP code... I have been looking into doing something like this myself.
paul5147
18
Years of Service
User Offline
Joined: 11th Jan 2006
Location: Hot & Sunny
Posted: 7th Apr 2013 19:44 Edited at: 7th Apr 2013 19:46
Had a bit of spare time to kill so i redid the uv data part of this to give it better textures.
Its now an 8 by 8 grid with a tile-able texture applied to each object,which is then modified to show the track with either a plain texture or,a texture that shows the direction of the track,rotated to suit.The DBpro part uses matrix1 an sparkys collision plugins,so make sure you have them if you want to try the editor,and make sure you set the AppGameKit directory to what ever you use.It is easy to start playing with the settings for tile size and number and shouldn't throw up any problems with the editor as long as you stick to power of 2 numbers,though i cant guarantee what effect it will have in AppGameKit which has been hard coded to an 8 by 8 grid,but if you want more feel free to modify it.For me i get a steady 60 fps on my phone with these values which is all i need for now.


AGK and DBPro projects Attached

Attachments

Login to view attachments
paul5147
18
Years of Service
User Offline
Joined: 11th Jan 2006
Location: Hot & Sunny
Posted: 13th Apr 2013 18:10
I know the thread title doesn't really match this any more and if we ever get a proper wip board i'll start posting there. I've taken this as far as i really can without starting to spend silly amounts of time on it that i don't really have.I have other projects i need to get finished first and this is just a distraction at the moment,i never realized how far AppGameKit would have come in such a short time, or that it would be so easy to get this up and running at a respectable frame rate on what can be some fairly under powered hardware like my phone. So what we have here is a 16 by 16 grid of tiles,each of these is 128 DBPro units square, these are subdivided into 17(0-16) by 17 vertex's,all with proper normal mapping so the lighting works correctly,which ends up with a fairly big area to play with.Now there's no way you could display all this without culling of some kind so that was next on the list of things to do,basically achieved by only showing the objects in a 3 by 3 grid around the camera and hiding the rest.That lead onto some nasty popups,so a bit of fog was needed,that meant having to delve deeper into shader programming,which crudely solved the problem but then looked strange against the black backdrop,so i stuck in a faded sky to blend with the fog.
Image showing the terrain in the very basic editor which demonstrates the size of it and the normals at work.

A video of one lap of the track,this takes over two and a half minuets which demonstrates the shear size of this

If any one wants the code for this lot let me know,but if you have all ready downloaded the version from my last post you would be hard pressed to spot the differences other than the size of the terrain and slightly modified shader,the biggest change was the culling which added a whole 9 lines!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 13th Apr 2013 18:48
That is pretty impressive.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
paul5147
18
Years of Service
User Offline
Joined: 11th Jan 2006
Location: Hot & Sunny
Posted: 13th Apr 2013 19:12
Thanks Ancient Lady,now if i could only get this to compile to an APK i would be able to show it off outside the house,but so far eclipse doesn't want to play,i can see a re-install coming on and if that fails, a large hammer!
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 13th Apr 2013 20:43
Good luck and Happy Programming!

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master

Login to post a reply

Server time is: 2024-11-23 11:53:19
Your offset time is: 2024-11-23 11:53:19