www.jpct.net

jPCT-AE - a 3d engine for Android => Projects => Topic started by: Thomas. on August 27, 2012, 09:20:03 pm

Title: My game for Android
Post by: Thomas. on August 27, 2012, 09:20:03 pm
So, finally I have some screens of my game. I'm working on this game for 2 years (programming in java for 2,5 years only). There is list of completed features, todo list and some screens.

edit: originally it was to be a fps game, but I decided that, puzzle platform game like Portal or C.U.B.E on Android devices would be much more interesting

what is done:
- dynamic per-pixel lighting - point, spot, directional in any number of
- image distortions and color adjustments - water, glass
- depth of field, motion blur, blur
- interactive objects - buttons, caps, panels, levers (controlling by moving finger on screen), waters (by player moving and gun shoot, but for smaller surface only for performance reasons)
- dynamic objects - slide doors, rotate doors, elevators, rogalo (accelerometer controlling)
- particle system
- position sensor - for doors, particles, lights,...
- object properties (everything) are loaded from XML
- multiplayer - in this time working for two players only, I have no devices for testing... and through bluetooth only
- and... menu, notification system for updates, download manager (new version and data)

todo:
- this two things is needed for public beta (tech demo):
- a lot of objects and one good looking map, weaponts
- animations of shoot and reloading

- environment, normal and light mapping
- finish rogalo (collisions)
- physics (jBullet is not suitable for mobile devices, so either write my own, or somehow use native bullet library)
- dynamic and pre-rendered shadows
- environment - rain, grass, trees
- interactive panels (like Doom 3)
- and of course, some missions, enemies,...

screens:
First screens of my game, which I have (2011. 2. 4.):
(http://s12.postimage.org/hjer36ss9/image.jpg) (http://postimage.org/image/hjer36ss9/) (http://s16.postimage.org/vuzva17sx/image.jpg) (http://postimage.org/image/vuzva17sx/)

2012. 8. 27:
(http://s9.postimage.org/o39rxxiln/device_2012_08_27_195853.jpg) (http://postimage.org/image/o39rxxiln/) (http://s7.postimage.org/gbimkaelj/device_2012_08_27_200225.jpg) (http://postimage.org/image/gbimkaelj/) (http://s9.postimage.org/8i1n5glez/device_2012_08_27_200247.jpg) (http://postimage.org/image/8i1n5glez/) (http://s11.postimage.org/n2u3zh1mn/device_2012_08_27_200428.jpg) (http://postimage.org/image/n2u3zh1mn/) (http://s11.postimage.org/kcks2a4xr/device_2012_08_27_200636.jpg) (http://postimage.org/image/kcks2a4xr/) (http://s7.postimage.org/t74ec9y07/screenshot_2012_08_27_20_30_39.jpg) (http://postimage.org/image/t74ec9y07/)

video:
http://youtu.be/e0BFkRQChCk (http://youtu.be/e0BFkRQChCk)

More details in the coming posts ;)
Title: Re: my FPS game for Android
Post by: EgonOlsen on August 27, 2012, 09:42:46 pm
You did a great job with all the effects and it looks really good. Just make sure to add an actual game on top of all this... ;)
Title: Re: my FPS game for Android
Post by: AGP on September 02, 2012, 06:43:09 am
Looks really good, congratulations. Is the 55 fps on your Galaxy S3?
Title: Re: my FPS game for Android
Post by: Thomas. on September 02, 2012, 09:48:56 pm
On my SGS3 it is 60fps without blur effects. With DOF it is 45, blur 52 and with motion blur 58fps. Blur effects can not be combined. I did not test the game with advanced effects on any other device.
Title: Re: my FPS game for Android
Post by: Thomas. on October 09, 2012, 12:43:29 pm
I'm working on navigation mesh for NPCs and the map editor, but I have got nothing to show at this moment. However, I tried my game on Tegra3 device and results are unexpected...
SGS3 x HTC One X
load into test map... same on both, about 6.5 seconds
running on high details... 58-60fps x 25-28fps
high + DOF... 45fps x 20fps
Title: Re: my FPS game for Android
Post by: EgonOlsen on October 09, 2012, 08:43:08 pm
Tegra isn't particularly great IMHO...you have to keep in mind that it's an immediate mode render, where PowerVR, MALI and Adreno are tile based deferred renderers, which make then more efficient in almost every case. From my experience with it, Tegra is inaccurate like Mali (i.e. worse than PowervR), has the worst depth buffering of all times unless you use some NVidia extension in your config chooser and it's performance isn't that great either. All these "enhanced by Tegra" titles on Google Play are just clever marketing IMO.
Title: Re: my FPS game for Android
Post by: K24A3 on October 11, 2012, 12:20:12 pm
The newer Tegra3 chipset seems fine, I don't know if it's tile based deferred now but I'm getting 60fps frame rates compared to Tegra 2's ~25FPS. ES2.0 Rendering quality also looks quality.
Title: Re: my FPS game for Android
Post by: EgonOlsen on October 11, 2012, 02:55:01 pm
The newer Tegra3 chipset seems fine
I was actually talking about Tegra 3... ;D
Title: Re: my FPS game for Android
Post by: Thomas. on October 16, 2012, 04:02:25 pm
Logic game from first person? Any idea?
Title: Re: my FPS game for Android
Post by: EgonOlsen on October 16, 2012, 07:55:31 pm
For an ingame puzzle?
Title: Re: my FPS game for Android
Post by: Thomas. on October 17, 2012, 09:32:39 am
No, I probably change style of game. Something like Portal or QUBE could be interesting. When I started with this project, maybe one or two games were on google play, now I have no what new to bring. And I had no idea about time demanding of developing this style of game.
Title: Re: my FPS game for Android
Post by: fireside on October 17, 2012, 11:33:41 am
A logic game would probably be even more time consuming, plus it's hard to change in mid stream.  Best thing to do is narrow the scope.  A target type game, probably, where the creatures or whatever just keep coming in a limited area.
Title: Re: my FPS game for Android
Post by: Thomas. on October 17, 2012, 12:28:52 pm
At the moment game has not nothing common with shooter game (except weapon model). For example, Portal has "simple" maps which are created in map editor, it is much faster way how to create map compared with 3Ds max (modeling, UV mapping, texturing) and I can also implement map editor into game. And about creatures in limited area, there is free Dead Trigger. What I can do more? Cooperative multiplayer but worse graphics. This kind of game requires tens of people in my opinion, I'm alone...
Title: Re: my FPS game for Android
Post by: fireside on October 18, 2012, 07:32:12 pm
Maps would be a good idea, but logic puzzles have to be thought out individually.  If you don't have any work in the shooter part, I suppose it wouldn't be much trouble to change though.  A logic puzzle is just done in reverse.  You make a clear solution and then put obstacles in the way.  There will always be games like the game you are doing.  You just have to do something that sets it apart a little bit.
Title: Re: my FPS game for Android
Post by: EgonOlsen on October 18, 2012, 10:47:38 pm
I see your point and i really think that it's a good idea to go that way instead of creating the 30th standard shooter...but i'm not a big fan of games like Portal, so i don't have any ideas to contribute.
Title: Re: my FPS game for Android
Post by: abed2000abed on December 07, 2012, 04:22:31 pm
Can I please ask you how you draw this very nice game , meaning what the tools you use to draw then export it to android application

i try to draw human and Move fingers this project for convert Text-to-sign language , thanks for your help :)
Title: Re: my FPS game for Android
Post by: Thomas. on December 08, 2012, 08:45:05 am
I don't get your question... Which software I'm using for 3D graphics? 3Ds max 2012...
Title: Re: my FPS game for Android
Post by: abed2000abed on December 08, 2012, 09:42:50 am
ohh sorry what i'm try to doing convert Text-to-sign language , as you know sign language need to change hands and the face in some how , what i can use to start doing this in android i should be use 3Dmax and export it and import it to Eclipse , or if you know another way
Title: Re: my FPS game for Android
Post by: Thomas. on December 08, 2012, 02:05:28 pm
I think bones will be the best way, but I have no experience with this... how you can do it can be found here (http://www.jpct.net/forum2/index.php/board,10.0.html).

http://www.youtube.com/watch?feature=player_embedded&v=G3MLLsaKKxI (http://www.youtube.com/watch?feature=player_embedded&v=G3MLLsaKKxI)
Title: Re: my FPS game for Android
Post by: abed2000abed on December 08, 2012, 03:41:13 pm
Thanks a lot i will try to found best way for it :)
Title: Re: my FPS game for Android
Post by: Thomas. on December 28, 2012, 11:06:48 pm
These are the two new screens from the game. Lights are created by build-in map editor. Currently I am working on dynamic shadows. With a friend, we invented the game's logic, but I did not get to implementation yet.

(http://s8.postimage.org/xxxc9v3ox/device_2012_12_28_223644.jpg) (http://postimage.org/image/xxxc9v3ox/) (http://s8.postimage.org/ltr9kd5kh/device_2012_12_28_224107.jpg) (http://postimage.org/image/ltr9kd5kh/)

I am going to upload the video of current state tomorrow ;)
Title: Re: my FPS game for Android
Post by: EgonOlsen on December 28, 2012, 11:45:55 pm
So...it's no longer a fps game anymore (just asking, because you've mentioned a few post before that you would like to turn it into something else)?
Title: Re: my FPS game for Android
Post by: Thomas. on December 29, 2012, 12:07:35 am
Yes, it will be logic game with time travel. Maps will be simple because I would like to be able to create levels in build-in editor. I do not want to spend the years of the completion of the game ;)
Title: Re: my FPS game for Android
Post by: Thomas. on December 30, 2012, 12:39:25 am
So here is first public video. It shows basic movements, water, some interactive objects, build-in map editor (only lights now), menu and not completed dynamic shadows. Please excuse the quality of the record...

http://youtu.be/e0BFkRQChCk (http://youtu.be/e0BFkRQChCk)
Title: Re: my FPS game for Android
Post by: EgonOlsen on December 30, 2012, 10:07:44 pm
Nice work! It's good to see that it's supposed to become a real game now, not "just" a tech demo. Your project was very beneficial for jPCT-AE because it pushed the limits.
Title: Re: my FPS game for Android
Post by: Thomas. on December 30, 2012, 10:26:22 pm
Thanks, good to see that someone likes my work :)
Title: Re: my FPS game for Android
Post by: Thomas. on January 03, 2013, 06:44:42 pm
Map editor now supports also particle emitters. This required scrollable list, so it is also new implemented thing.
Title: Re: my game for Android
Post by: Thomas. on January 16, 2013, 09:27:15 pm
I forgot to upload image of particle emitter editor, so here it is. I have also implemented the menu switcher, I was inspired by the Android 4.0 ones. I expanded the possibilities of lights (automatic discard distance, max intensity, max normal attenuation,...). For now I have enough creation of the menu and the map editor. The next thing will be possibility to return back in time. I have postponed it, because I have to rewrite some parts of the code.

(http://s8.postimage.org/6gr9lwzo1/device_2013_01_16_203219.jpg) (http://postimage.org/image/6gr9lwzo1/) (http://s8.postimage.org/am6rlkmtt/device_2013_01_16_202235.jpg) (http://postimage.org/image/am6rlkmtt/)
Title: Re: my game for Android
Post by: EgonOlsen on January 18, 2013, 03:19:22 pm
The next thing will be possibility to return back in time.
Once you managed to do that, don't forget to write down the lottery numbers... ;)
Title: Re: My game for Android
Post by: Thomas. on January 30, 2013, 09:24:47 pm
So, my level loader is rewritten and supports multi-core CPUs. But differences between single-core and multi-core is very small, much much smaller than I expected. Anyway, rewritten level loader is three times faster, than the one written more than year ago. Next thing, warning and error logs are saved in file for better debugging on many devices... and all logs are showed in dev section for my testings. Next. Interaction and crazy links (open door -> timer -> particles -> turn off lights) are ready to record, time travel is coming ;) ... Now I have to finish school project, artificial intelligence, I chose simple TicTacToe AI, so I'll soon be able to work on the game. There is nothing new to show. Maybe just new ListBox (same as C# + autoscroll and text wrapping). Scroll over thousands items without any lags :)

(http://s1.postimage.org/v1it2c3hn/device_2013_01_30_211810.jpg) (http://postimage.org/image/v1it2c3hn/)
Title: Re: My game for Android
Post by: Thomas. on February 02, 2013, 10:17:34 pm
Because I was very curious to see what CPU cores are doing, I did simple performance monitor.

(http://s17.postimage.org/conlfc3qz/device_2013_02_02_215932.jpg) (http://postimage.org/image/conlfc3qz/)

edit: If anyone would like the source code (of PerformanceMonitor), I can provide.
Title: Re: My game for Android
Post by: EgonOlsen on February 02, 2013, 11:50:15 pm
I would be interested in that. You might want to add it to the wiki in the code snippets section!?
Title: Re: My game for Android
Post by: kbjansen on February 03, 2013, 02:19:32 pm
your whole project looks just awesome - Congratulations!
Very nice object textures, lights, shadows and impressive 'debug' menu. This CPU-Display looks good, too!
I believe that this will become an awesome game. Please stay tuned and keep us up to date :D
Title: Re: My game for Android
Post by: Thomas. on February 03, 2013, 07:01:34 pm
So, source code of performance monitor with example is on this page (http://www.jpct.net/forum2/index.php/topic,3201.0.html) ;)

I would be interested in that. You might want to add it to the wiki in the code snippets section!?

No problem ;)
Title: Re: My game for Android
Post by: EgonOlsen on February 03, 2013, 08:48:15 pm
No problem ;)
Do you have an account for the wiki? I can't remember...
Title: Re: My game for Android
Post by: Thomas. on February 03, 2013, 08:53:09 pm
No, I have not it yet ;)
Title: Re: My game for Android
Post by: EgonOlsen on February 03, 2013, 08:57:59 pm
You should have got one now. Check your email.
Title: Re: My game for Android
Post by: Thomas. on February 16, 2013, 03:52:57 pm
I started rewriting Jitter Physics to java. This physics engine should be faster than JBullet and supports multi-core CPUs. I have not much free time, anyway now is transcribed about 10% (it is little bit harder than I expected).
Title: Re: My game for Android
Post by: EgonOlsen on February 19, 2013, 10:50:06 pm
I started rewriting Jitter Physics to java. This physics engine should be faster than JBullet and supports multi-core CPUs.
Apart from the multi-core support...what makes you think that this will be faster?
Title: Re: My game for Android
Post by: Thomas. on February 20, 2013, 08:00:40 pm
I started rewriting Jitter Physics to java. This physics engine should be faster than JBullet and supports multi-core CPUs.
Apart from the multi-core support...what makes you think that this will be faster?

jBullet takes about 55ms for 125 inactive boxes and 420ms when are active. Bullet takes 4ms for 125 inactive boxes and 28ms for active. Both are on single-core. I hope, I can get more from java. And why it is so much when no longer active? There is nothing to calculation in my opinion. I did not find any solution how I can get "simple" physics of sphere, mesh and box in jPCT except jBullet...
Title: Re: My game for Android
Post by: EgonOlsen on February 21, 2013, 09:40:52 am
There is nothing to calculation in my opinion.
Maybe it takes it's time to determine that something isn't active. It's like with the trees and plants in my rpg. I basically have to scan through all entities in the whole world to see if they will be visible in the next frame or not. In that case, you can optimize that by using some spatial subdivision of course, but in case of a physics engine, that might be different. Another thing might be that JBullet hasn't been written with Android/Dalvik in mind. A lot of things that are free on the desktop are costly on Android. If you ignore this, you end up with really bad performance...but if you embrace it, you can really tweak things. It might be worth a shot to look at the JBullet code instead of porting some other engine and see if there's room for improvement by doing some micro.
Title: Re: My game for Android
Post by: Thomas. on February 21, 2013, 10:37:51 am
I'm not physics programmer, but I thing that when are velocity and every others transformation variables less than epsilon, there are nothing to calculate until some of it will not be changed. I contacted author of java port and he said that it is not optimized for Dalvik and that he do not plans to support multi-core processors. I was thinking about optimize jBullet, but physics is very expensive and without multi-core it be meaningless, in my opinion.
Title: Re: My game for Android
Post by: EgonOlsen on February 21, 2013, 02:05:56 pm
I had a quick look at the jBullet sources and they already look pretty much like something that Dalvik might like...except for this Stack-thing. It's doing a lot of Stack.alloc()-calls which refers to some other library that obviously instanciates temporary objects on the stack by doing some twisted bytecode fiddling...and i don't really think that this is a very good idea on Android, because Dalvik actually doesn't use Java-Bytecode but has to convert it.
What i would try to do, is to replace this Stack-class by some pooled entity class, i.e. something that takes the alloc-call and simply returns an instance from a prefilled pool. Of course, these instances would never be returned to the pool and so this implementation will run into either an empty pool or an OOM error, but it might be sufficient to see if that actually can help to improve things.
Title: Re: My game for Android
Post by: Thomas. on February 21, 2013, 10:01:23 pm
I agree that the rewriting engine from one language to another would take a lot of time. I'm willing to optimize some of the physics engine and provide the library. I found ode4j (http://www.ode4j.org/), this engine supports multi-core CPUs, but has known bug with ray-cylinder collision. JBullet discourages me from key missing support for multiple cores. What you mean Egon?
Title: Re: My game for Android
Post by: EgonOlsen on February 21, 2013, 10:19:24 pm
It's up to you. Personally, i wouldn't rely too much on multiple cores on a mobile device, at least not without giving that quick-and-dirty Stack-replacement a try. It shouldn't be much work and it might help. It it does, you have to modify the JBullet sources to actually deallocate the pooled objects, of course. If it doesn't, you can still try to port something else.
Title: Re: My game for Android
Post by: Thomas. on March 17, 2013, 09:43:34 pm
Two news. Shadows are already working. And if you go at the home screen and back, game is immediately up. Nothing more, I did not have time.

(http://s22.postimage.org/ohns7hix9/device_2013_03_17_212701.jpg) (http://postimage.org/image/ohns7hix9/)

edit: Shadow map in the screenshot has 1024*1024.
Title: Re: My game for Android
Post by: EgonOlsen on March 19, 2013, 10:40:29 pm
Looks nice!! Can you provide some stripped down version of the shadows to be integrated into the engine's core, if you find the time?  ;)
Title: Re: My game for Android
Post by: Thomas. on March 20, 2013, 08:24:52 am
I have no solved one thing. Send into fragment shader whether device supports high precision or not. At this moment are all calculations in medium precision. But it should not be a problem. As soon as I get back from school, I will send you the code ;)
Title: Re: My game for Android
Post by: Thomas. on May 24, 2013, 06:01:10 pm
I updated shader for lighting. Now are supported specular color, normal and parallax mapping in tangent space (first screenshot contains test wall with parallax mapping). Number of lights is limited with normal mapping, because Mali400 supports only 16 vec4 varying variables. I also edited light attenuation function for discard calculating of lights in large distance, however lights look almost same as before. I tried scene where all objects use parallax mapping, but the game crash on gl out of memory error. Settings menu is reorganized and better in my opinion. Camera rotation and player move are filtered and looks very smooth. Motion blur is much better, now. I added light glow support, but first I have to create some good looking texture. I tried the game on Samsung Galaxy S4. Fps is somewhere between 55 and 60 and with depth of field it is about 33. I think, it is very good when is taken into account that SGS4 has more than 2 times more pixels than SGS3. But. I am losing motivation. I hope that the game will ever finish. There is still too much work...

(http://s20.postimg.org/oj7xc5yex/device_2013_05_24_172403.jpg) (http://postimg.org/image/oj7xc5yex/) (http://s20.postimg.org/hu1dw5d2x/device_2013_05_24_172703.jpg) (http://postimg.org/image/hu1dw5d2x/)
Title: Re: My game for Android
Post by: EgonOlsen on May 26, 2013, 09:58:03 pm
But. I am losing motivation. I hope that the game will ever finish. There is still too much work...
A little hint: Shift from focussing on shaders and effects towards actual game play to get this done... ;)
Title: Re: My game for Android
Post by: Thomas. on November 11, 2013, 02:54:19 pm
Because I probably never continue in this project, I decided public what I have at the moment. App has many bugs and you can load only map named room01. Data will be downloaded after first start (FTP server not among the best) ~15MB. If you have any problem with downloading data, unzip this zip (https://dl.dropboxusercontent.com/u/26148874/FPS%20game%20DATA.zip) to Android/data/. I enabled developer mode by default, so we have access to everything ;)

APK file (https://dl.dropboxusercontent.com/u/26148874/Game.apk)

Variables saved in Android/data/mygame/config.cfg
Code: [Select]
dev
engineDebug
showFps
antiAliasing
padAutoHide
padVisibility
firePadVisible
maxFPS
fpsLimit
xPositionOfPad
yPositionOfPad
cameraSensitivity
xPositionOfFireButton
yPositionOfFireButton
xPositionOfEquip
yPositionOfEquip
comperssTexture
centerCamera
checkForUpdates
textureQuality
menuTrans
traslationMenuEffect
saveLogs
invertCameraY
gameGUITransparency
lightGlowEffect
cameraFilter
shadingMode
Title: Re: My game for Android
Post by: Wolf17 on November 11, 2013, 05:58:37 pm
  Hi Thomas!

I got some errors .....
error : couldn't read file from InputStream
         ......couldn't load text files
          ......Drawing thread terminated
         java.lang.StringIndex.........

Its very lengthy..... did I installld it wrong?

Are you discontinuing this project?  :(
You can even make a mystery/escape game with some great sci-fi story ! It looks great from the screenshots!

Title: Re: My game for Android
Post by: Thomas. on November 11, 2013, 06:09:41 pm
It is strange, you can delete files in Android/data/mygame and download it again. Could you provide me log.txt file from "mygame" directory?
Title: Re: My game for Android
Post by: Wolf17 on November 11, 2013, 06:14:00 pm
Sure!

[attachment deleted by admin]
Title: Re: My game for Android
Post by: Thomas. on November 11, 2013, 06:19:16 pm
Are you discontinuing this project?  :(
You can even make a mystery/escape game with some great sci-fi story ! It looks great from the screenshots!

Main problem from beginning was that I never found someone who can make maps, objects, textures. For one person it is to much work...

  Hi Thomas!

I got some errors .....
error : couldn't read file from InputStream
         ......couldn't load text files
          ......Drawing thread terminated
         java.lang.StringIndex.........

Its very lengthy..... did I installld it wrong?

It seems on problem with getClass().getResourceAsStream(...)

edit: fixed ;)
Title: Re: My game for Android
Post by: EgonOlsen on November 11, 2013, 09:09:24 pm
I can't run it...it installed fine, then downloaded the data but obviously failed after downloading maybe 50-60%. Now i can't seem to force it to re-download. I would copy the zip-content into Android/data just as you suggested, but i can't write anything into that folder. At least not via USB connection (i haven't tried it directly on the device). I also can't delete a mygame folder in there, because there is none.
If i start the game, i get a selection menu to choose a level and then...nothing (black screen)...  :(
Title: Re: My game for Android
Post by: Thomas. on November 11, 2013, 09:17:03 pm
It is strange, because right after finish download is created file download_complete.dat, without this file you will be asked for download. There is only one solution. Delete the mygame folder. I can recommend X-Plore (https://play.google.com/store/apps/details?id=com.lonelycatgames.Xplore&hl=cs) file manager.
Title: Re: My game for Android
Post by: EgonOlsen on November 11, 2013, 11:05:42 pm
I was able to delete it on the phone and it re-downloaded the data. At least the room level works fine now.
Title: Re: My game for Android
Post by: Wolf17 on November 12, 2013, 01:59:27 pm
 Re downloading fails everytime when I try to do it. I still could not make it run on my device . I only got a black screen with time at upper right corner. Maybe my old device is not supported?(I am using the filedata u provided in above link.)
Title: Re: My game for Android
Post by: Thomas. on November 14, 2013, 10:58:41 pm
This behavior I never met. Which device do you has? I can only recommend delete and copy data again...
Title: Re: My game for Android
Post by: Wolf17 on November 15, 2013, 06:53:45 am
This behavior I never met. Which device do you has?
It is old sony wt19i ....adreno 205 gpu,1ghz single core processor.
Title: Re: My game for Android
Post by: jangojo on November 18, 2013, 03:21:57 pm
Wow  , that's cool , I like this video . I think it will be a serious game . Congratulations .