Android Question Bouncing Ball (VR+raytracing)

MasterGy

Member
Licensed User
Hello!

This is the last post in the raytracing thread, for testing purposes.
Some thoughts on the game:

-STRUCTURE: there is no hierarchical menu system. When the game starts, all service modules (drawing, phone orientation, texture loading monitor) are started, so it reacts in real time and immediately to all statements and actions.

-VR : also works in vr mode. when switching, it automatically switches the control from touch control to orientation control (where you look, it goes there). Due to the different camera positions and different eye-viewing angles of the two images, a real 3d-back can be perceived in Vr glasses. Raytracing makes this particularly interesting. It is an interesting experience, because the distance from a reflective object is not the same as the distance from the starting point of the light reflected by the object. So, due to the reflective spheres, the distance visible in them will be perceived by our brain as depth.

- BOUNCING BALL : bouncing ball. I adapted some visual effects to the rhythm of the music. The bouncing of the ball follows the beat of the music. As an interesting feature, I added a surround sound for the bounce of the ball. There are two sound patterns for bouncing. One is the original thump sound, and the other is a version of this sample with the high notes removed. If you face the ball, the sound of the thump is sharp. If we stand with our backs, then it is dull. When you hit the ball, SOUNDPOOL starts both sound samples, and during playback, it continuously adjusts the volume and ratio of the two sound samples, depending on the distance and the angle you are standing in relation to the ball.

-RENDERING - Calculation of movements and drawing is in the UI (timer 1/60). These do not use a lot of resources. A separate service module performs the drawing. There is a timer in the service module that is set to 1/60s (so this is the maximum FPS). Checks to see if the previous render has finished. If there is none, it divides the image (or images) according to the settings and starts separate THREEDs, which render different parts of the image to a BITMAPCREATOR! There are 3 'PAGES'. It renders them one after the other. He doesn't pay attention to anything, he doesn't care about anything, he just works. How much you can perform per second depends on the speed of your phone. In the UI, the 1/60 timer monitors whether a new 'PAGE' has been created. If yes, then canvas.drawbitmap page.bitmap<--(which is a bitmapcretor). And so on...again and again..





Rewinding the forum in time, there were several people who added to it, built it, shared it, tried it out, and reported on it. By now, everyone is hiding their project. It's just a hobby for me. I really like the B4A environment, I'm happy to make something.

All I would like is testing.

I have a Samsung galaxy a13, a14 and a xiaomi redmi 12 phone. All three phones are the cheapest category. 2 slightly fast and 6 slow processors in each. Raytracing is very computationally intensive. I could only try it with low frame/s or low resolution. I would be very curious to see how fast they run on different phones.
To make the answer uniform, I would ask the question like this:

1. what phone?
2. at what percentage should the "texture quality" be in order for the game to run at 20 frames/s?

I am interested in all information. I would especially like to know how it runs on an S-series Samsung? There are already 8 powerful processor cores. Unfortunately, I don't have a chance to try it, so I would be grateful for any feedback.

I think I've done everything I can to optimize it, and I don't think it can be sped up anymore. If anyone has any ideas on this, I'd appreciate it.


The video is bad because of the recording, the sound also slips :(



You only need to attach the 'threading' lib to the project, I attached it in zip. I put the download link in the attached txt.
 

Attachments

  • bouncing_ball_downloadlink.txt
    82 bytes · Views: 13
Top