Author Topic: starting with android  (Read 3953 times)

0 Members and 1 Guest are viewing this topic.

Offline Stonemonkey

  • Pentium
  • *****
  • Posts: 1310
  • Karma: 96
    • View Profile
starting with android
« on: June 11, 2016 »
This is just a test from writing some graphics stuff and may or may not lead to anything, its only for android on arm devices ie phones and tablets. You will need to set your device to install from unknown sources and it does ask for various permissions, the program does not need those permissions and does nothing untoward but the c4droid app i am writing code with creates the APK file with the manifest file and I have not yet found a way to edit permissions in the manifest file.

Hopefully this link works, its from google drive but ive never tried linking to it before.

https://drive.google.com/file/d/0B4tuUL8KZB7UX2ZxVnZyX2s5Qms/view?usp=drivesdk

touch where you want to move to, touch red bar to fire. Unfortunately its just a graphics and touchscreen test and you cant actually hit anything.

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2731
  • Karma: 485
    • View Profile
    • http://www.rbraz.com/
Re: starting with android
« Reply #1 on: June 11, 2016 »
 :goodpost:
Works really well for my old Samsung with android 4.1.2.

Are you using opengl for it?
Challenge Trophies Won:

Offline Stonemonkey

  • Pentium
  • *****
  • Posts: 1310
  • Karma: 96
    • View Profile
Re: starting with android
« Reply #2 on: June 11, 2016 »
thanks, no, its software rendered (640x480) but SDL2 loads the bitmap into a texture and does hardware scaling to fit it to the screen.

glad to hear it works on other devices :)

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2731
  • Karma: 485
    • View Profile
    • http://www.rbraz.com/
Re: starting with android
« Reply #3 on: June 11, 2016 »
Nice, SDL is really good library.

I'm testing opengl es 2 for now, and I don't have anything to show yet, I'm really new on this  :D

Challenge Trophies Won:

Offline Stonemonkey

  • Pentium
  • *****
  • Posts: 1310
  • Karma: 96
    • View Profile
Re: starting with android
« Reply #4 on: June 11, 2016 »
Im mixing things up a bit, using sdl2 for load/save bmp and touchscreen but my own buffers for drawing then sdl2 to get it on the screen.
Im pretty new too and have had a bit of trial and error so far but some of my previous stuff should fit into this, doing some inline asm but cant get the compiler to like floating point instruction :(

Offline Stonemonkey

  • Pentium
  • *****
  • Posts: 1310
  • Karma: 96
    • View Profile
Re: starting with android
« Reply #5 on: September 10, 2016 »
Finally found a way to get fpu code into c4droid, turns out that the compiler is software fp only but by using

asm(".fpu vfp");
or
asm(.fpu neon");

I can access the vfp or neon hardware and the latter has simd ops.

Offline inc.

  • Contact me @ skype: a5recordings
  • Amiga 1200
  • ****
  • Posts: 261
  • Karma: 19
  • I SPEAK ENGLISH & GERMAN as good as i can :D
    • View Profile
Re: starting with android
« Reply #6 on: September 11, 2016 »
Nice.  I made a jump n Run game in the past with libgdx.

If you wanna give a test, get it for free from playstore:
Rapid Hop Jack

Or here: http://www.rapidhopjack.de
Have fun.

Another one i made:
Don't tap Black @ Google playstore
currently coding in PureBasic: GLSL Shader Maker & Editor Tool for further Demo coding usage

Offline Stonemonkey

  • Pentium
  • *****
  • Posts: 1310
  • Karma: 96
    • View Profile
Re: starting with android
« Reply #7 on: September 11, 2016 »
Cool stuff inc. Ive got plans for a puzzle game i might make some time but im working on a graphics/IO lib first for now.

Offline inc.

  • Contact me @ skype: a5recordings
  • Amiga 1200
  • ****
  • Posts: 261
  • Karma: 19
  • I SPEAK ENGLISH & GERMAN as good as i can :D
    • View Profile
Re: starting with android
« Reply #8 on: September 11, 2016 »
sounds good. i have another game in progress:
http://www.inc-games-design.de/

i have attached a level test. playable on pc -> use the joystick on the right with left mouse btn. it is a *.jar file.
normally simple double click the file and it start to run.

the plan is: more than 100 level and many more.

« Last Edit: September 11, 2016 by inc. »
currently coding in PureBasic: GLSL Shader Maker & Editor Tool for further Demo coding usage

Offline Stonemonkey

  • Pentium
  • *****
  • Posts: 1310
  • Karma: 96
    • View Profile
Re: starting with android
« Reply #9 on: September 11, 2016 »
Lol, I'm not sure if it is good. I started making it before using blitz basic and had it working although the graphics were just some dodgy placeholders. I posted it somewhere, maybe here, with 4 or 5 levels but i must've made them too hard for starting off with so no one really knew what to do.

Ive tried you two off the play store, nice work, that hopping one is really frustrating. My PC's pretty knackered at the moment so i dont use it for much and I'm just on android most of the time.

Offline inc.

  • Contact me @ skype: a5recordings
  • Amiga 1200
  • ****
  • Posts: 261
  • Karma: 19
  • I SPEAK ENGLISH & GERMAN as good as i can :D
    • View Profile
Re: starting with android
« Reply #10 on: September 11, 2016 »
that hopping one is really frustrating.

 :clap:  ;D ;D
currently coding in PureBasic: GLSL Shader Maker & Editor Tool for further Demo coding usage

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2731
  • Karma: 485
    • View Profile
    • http://www.rbraz.com/
Re: starting with android
« Reply #11 on: September 12, 2016 »
Very nice games Inc, well done :)

Challenge Trophies Won:

Offline Stonemonkey

  • Pentium
  • *****
  • Posts: 1310
  • Karma: 96
    • View Profile
Re: starting with android
« Reply #12 on: November 18, 2016 »
This is a slightly upgraded version of what I posted in what are you working on, Ive improved the stepping for the parallax occlusion mapping but might be able to improve that some more and optimise other areas a bit. It's in freebasic but I'm intending on porting it over to android c++ later. Not sure what else to try to get it to do at the moment.

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2731
  • Karma: 485
    • View Profile
    • http://www.rbraz.com/
Re: starting with android
« Reply #13 on: November 19, 2016 »
Looks pretty cool!

Is it software rendered or hardware?
Challenge Trophies Won:

Offline Stonemonkey

  • Pentium
  • *****
  • Posts: 1310
  • Karma: 96
    • View Profile
Re: starting with android
« Reply #14 on: November 19, 2016 »
It's software.

Since I was already interpolating the camera/eye vector in texture space for the normal mapping, the parallax mapping was relatively simple to do and once I'd done it I realised it's pretty much like tracing through a voxel landscape. At the moment I'm stepping through the heightmap 1 element at a time and doing that for every pixel and that slows things down, so I'm looking around for ways to speed that up a bit.
« Last Edit: November 19, 2016 by Stonemonkey »

Offline Stonemonkey

  • Pentium
  • *****
  • Posts: 1310
  • Karma: 96
    • View Profile
Re: starting with android
« Reply #15 on: September 03, 2017 »
Finally got round to porting this onto android, it works but is a bit slower than the pc version although some improvement should be possible. It's software rendered parallax mapping, each face of the cube is made of 2 tris with the depth effect created by the mapping.

Rotate your device onto its side to get fullscreen otherwise it'll be quite small.

When installing the apk, it will ask for permissions, the program does nothing dodgy but the app (c4droid) I'm using to write this automatically adds the permission requests.

https://drive.google.com/file/d/0B4tuUL8KZB7UR2ZCcld4S3hHYTg/view?usp=drivesdk

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2731
  • Karma: 485
    • View Profile
    • http://www.rbraz.com/
Re: starting with android
« Reply #16 on: September 05, 2017 »
Stonemonkey: Works fine here, it looks running at low framerate thought, 15 or 20 fps it seems, but I'm using an old/crap phone to test it :).


For me, I've done a lot of tests with java + opengl Es2 using Android Studio, and this demo is how far I've gone, until got distracted by other things :D

So, It's a very basic 2D game engine:
www.rbraz.com/temp/app-debug.apk

Challenge Trophies Won:

Offline Stonemonkey

  • Pentium
  • *****
  • Posts: 1310
  • Karma: 96
    • View Profile
Re: starting with android
« Reply #17 on: September 05, 2017 »
Yep, it's fairly slow. A couple of areas to improve are height map traversal, at the moment it steps through the height map 1 step at a time. The other area is reworking it in inline asm, there is some asm but doing the whole inner loop should help things a bit.
I'll have a look at your work when I get home.

Offline Stonemonkey

  • Pentium
  • *****
  • Posts: 1310
  • Karma: 96
    • View Profile
Re: starting with android
« Reply #18 on: September 05, 2017 »
Cool rbz, makes me wonder if there's a way parallax mapping could be used effectively in a sprite based game.