Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - MichaelJPCT

Pages: 1 [2] 3 4
Feedback / would anyone want a sound engine for JPCT?
« on: December 06, 2016, 11:58:16 pm »
since JPCT doesn't provide a sound engine, and openAL looks too complicated for me, i searched for a sound engine which can play sound with volume and pitch control like this: setVolume(0.6) , setPitch(0.8).
i ended up using socket and a sound server made with a Python module.
socket is chosen for IPC because it's easy to program and another(and same) machine can be used as server.
Python module PyGLET is used as the server app because it's simple to use and it fullfils my need to control volume and pitch directly.
i have used the engine to play several sounds simutaneously and it looked reliable on local machine.
i can post all source code here, would anyone be interested in this?

Feedback / Developing JPCT-AE program on Android device
« on: September 16, 2016, 02:18:34 pm »

Most people develop Android apps on a PC, then test run in Android Emulator, then do further testing on real Android device. But sometimes you don't need a PC to develop Android apps - you can write code, compile, and test run on an Android device.
I'm introducing the basic usage of AIDE - an Android app which can compile another Android app, with JPCT-AE.
For this to work well, you need these:
1) latest version (2016) of AIDE, free version will do
2) an Android device fast enough, such as quadcore A53/A72 CPU
3) a real keyboard
4) a not-so-small screen, say 10 inch or more
5) jpct-ae.jar

when AIDE is launched, if no project is opened, AIDE lets you choose whether to learn lessons or to code, just choose "for experts".
then if no project is created yet, you choose to create a new Gradle project.
by default AIDE creates project folder inside /mnt/sdcard/AppProjects/.
after project is created, you create a folder named "libs" in /YourProjectFolder/app/, then copy jpct-ae.jar into folder "libs".
then you are ready to write codes.

you can also copy your Gradle or Eclipse project folder from PC to Android device and continue with the old project.

here are some basic operations you need to know when you work with AIDE:
1) to handle files, choose menu VIEW, then FILES, then click on the file to open. on the top of screen there are file tabs that you can click and a menu shows up providing CLOSE FILE options.
2) to build, just click the button looking like a triangle on top right corner of the screen.
3) in menu VIEW, there is LOGCAT, which is important for debugging.
4) in menu PROJECTS, there is REFRESH BUILD, you need to do that sometimes - when you find your app behaves like un-updated.

In this way, you can spend most development time on Android device - writing code. you only need a traditional PC to process images, sound, or build 3d models.

Support / can the engine disable frustum cull ?
« on: September 11, 2016, 07:34:45 am »
for some special case , an app may do frustum cull by itself, if the engine does frustum cull also, then the work is done twice. so i wish the engine can disable frustum cull.

Support / app not run in Android 5.1
« on: September 06, 2016, 08:12:10 pm »
i tested my app in Android 5.1 , it doesn't work.
i read the logcat i found FileNotFoundException . the file is like "/mnt/sdcard/myFolderName/myFileName.png" (pseudo names)
i don't know why, since:
1) the files are there and they can be opened by a image viewer.
2) the app runs on Android 4.2.2 and 4.4.2.

Support / can framebuffer be smaller than sceen?
« on: September 03, 2016, 06:16:01 pm »
i have an idea that i want to keep the game window's aspect ratio, for example 16:9, while the screen of device is usually not accurately 16:9.
can i have a framebuffer smaller than the screen and keep some black margins around the framebuffer?

Support / blitting problem in rtt
« on: August 31, 2016, 09:31:02 am »
i found if i draw object3d in rtt (with World,Camera), then blitting in rtt had wrong size - much larger.
my rtt texture size is 128x32.

Support / no setDepthBufferWrite?
« on: August 31, 2016, 08:13:16 am »
i have an object (a sky plane, or sky dome) which should not affect depth buffer. but in JPCT-AE there is no setDepthBufferWrite(), so now i have to clear depth buffer after drawing the sky.
it would be better if there is the setting.
also, setDepthBufferTest() could be useful too.

Support / default shader lighting problem
« on: August 29, 2016, 04:13:03 am »
i have a JPCT app ported to JPCT-AE. i see a grey object with default shader has color problem. its faces are either grey or total black according to light direction, look like very much overbrighted.
my device has PowerVR540 GPU and Android 4.2.2.
what could be the cause?

Support / trying to make fake shadow with RTT texture applied to a mesh
« on: August 20, 2016, 05:34:56 pm »
i am trying to make fake shadow. my approach is like this:
stick a transparent mesh on an object3D which should be a shadow receiver, but in fact the transparent mesh is the receiver;
render the shadow caster object into a texture and project the texture onto the transparent mesh;
the RTT should have alpha information - the part covered by shadow caster is opaque and black, other part is fully transparent.

now i wonder how to render into the alpha channel of RTT texture - i want to use openGL hardware framebuffer for the RTT task (faster) so the texture should be directly used in GPU (not downloaded for further process).
is setAsShadowMap() meant for this?

Support / fog formula?
« on: August 18, 2016, 06:53:59 pm »
some parts of my scene are rendered with shader while some are not.
i need to know the formula of fog in GL's fixed function rendering and use it in shader so that all parts in the scene have the same fog effect.
i use these settings on the parts without shader:
setFogParameter(100f,20000f, r,g,b)

Support / get unloadTexture flag?
« on: August 16, 2016, 05:46:43 pm »
i think it's good that TextureManager has a flag indicating whether a texture is loaded/unloaded, if one needs to strictly manage texture memory usage.

Support / alpha channel in image file?
« on: August 14, 2016, 02:12:20 pm »
i have a texture which is supposed to act like a mask - some part see through, some part masked - think of 1-bit alpha.
i tried with setTransparencyMode(0) , the result is close, but in JPCT i have to use black color for the see-through part, which doesn't work for me - i need the see-through part to be blue, because there is a little edge area of the texture still visible.
i tried to use image file with transparency information - transparent png and 32-bit TGA. the png transparency doesn't work and tga can't be loaded.
what else can i try?

Support / is there Z-offset options?
« on: August 14, 2016, 01:07:17 pm »
i couldn't find any.

Feedback / hotspot JVM garbage collection strategy?
« on: August 14, 2016, 08:47:58 am »
in my JPCT app, i use constant framerate(30fps) by adding Thread.sleep at the end of each frame update. as long as the time needed for each frame update doesn't exceed 0.033333 sec, the app runs well.
but if a full gc is performed, a frame will be delayed, and i can't predict when a gc will be performed.
is there any gc mode that does gc "little by little" so every gc doesn't take longer than... say 0.015 sec ?
can gc be performed when my main thread sleeps?

Support / multiple coordinates for texture stages?
« on: August 12, 2016, 10:32:27 am »
i created a heightmap terrain using Object3D(pos,normal,uv,index,textureID) method.
if i want the the terrain to have at least 2 layers of texture tile - one large tile(repeat 4x4) & one smaller tile of noise(repeat 128x128). in what way should i set it up?
should i use shader?

Pages: 1 [2] 3 4