Welcome, Guest. Please login or register.
Amiga Kit Amiga Store Hollywood MAL AMIStore App Store A600 Memory

AuthorTopic: GL4ES Round 4: Down the hole  (Read 980 times)

0 Members and 1 Guest are viewing this topic.

Offline kas1e

GL4ES Round 4: Down the hole
« on: April 18, 2021, 07:36:58 PM »
... First words ...



More than a year passed since the latest GL4ES releases, but that didn't mean no one works on it!

But for the first, a few notes right at the beginning before we go further:

NOTE1: Radeon RX users - BE SURE that you set Prefs: PowerManagment to HIGH! Automatic PowerManagment in Radeon RX drivers works wrong probably due to not having
           DMA in the driver and as result resources didn't raise when needed, which causes low FPS in most games. So you should set it to HIGH, save, reboot, and
           then you will have the maximum possible FPS from your Radeon RX. Not doing this will cause lower your FPS quite a lot !!!


NOTE2: Since now, the minimum requerements for everything listed below are:

   -- Warp3DNova.library >= v1.83
   -- ogles2.library >= v3.1
   -- RadeonHD >= 3.7 or RadeonRX >= 2.4 (with Prefs:PowerManagment set to HIGH)

Everything is a part of Enhancer 2.0. If you will be on anything less, you will have all sorts of issues, bugs, crashes, and rendering glitches of all sorts. You are warned!

NOTE3: all images in this text are clickable for URLs or full-size images

... Intro ...

So. Since last time, Hans works quite heavily to improve Warp3DNova, Daniel works on ogles2.library, ptitSeb works on GL4ES library, Capehill works on SDL1/SDL2 library and I just
collect everything in one place and tried to make good use of it.



If you didn't know what GL4ES are, is an OpenGL 2.x/1.5 to GL ES 2.0/1.1 translation library, with support for Pandora, ODroid, OrangePI, CHIP, Raspberry PI, Android, and AmigaOS4.
It is written by Sebastien "ptitSeb" Chevalier, I only handle the AOS4 version, but all changes (including AmigaOS4 ones) most of the time done by ptitSeb.



For AmigaOS4 translation done via ogles2.library and which in turn works on top of warp3dnova.library

With GL4ES we have not only OpenGL1.x as with MiniGL, but OpenGL 1.x, OpenGL2.x, and even some limited OpenGL3.x support.

Q: How it works?
A: GL4ES emulate fixed-pipeline via auto-generated GLSL shaders and send them to ogles2 which in turn parse & patch them, convert to SPIRV format and send to warp3dnova for compilation and execution.

Q: Are shaders that come with OpenGL apps works too?
A: Yes. They also go through gl4es for adding little bits, and then the same send to ogles2/warp3dnova for compilation and execution.

Q: Why not made full OpenGL? Why just not port MESA over Warp3DNova?
A: Because it's harder and there weren't thousands of developers willing to do so. Only Daniel was able to take the task, and to make something in the real time frame it was chosen to go the OpenGL ES route.
   But anyone feels free to make a MESA port over Warp3DNova, of course.

Q: Is it faster than MiniGL over old Warp3D? Is it better?
A: It is faster in most cases a lot. In some cases where the old GL_BEGIN/GL_END route used, speed can be the same, just without MiniGL bugs.
   But in other cases it much faster. As GL4ES works over opengles2 & Warp3DNova, we have hardware TCL, VBO, and all stuff.

Q: Why some things are fast, but other ones are not _THAT_ fast as we hope?
A: Because currently, we don't have DMA/GART implemented in graphics drivers.

You can grab the ready to use AmigaOS4 SDK for GL4ES on os4depot or from my GitHub page there:

https://github.com/kas1e/GL4ES-SDK/tags

Now, to the releases, what we have today?

... Releases ...

1). Worlds



You're Reyk, a highly trained agent of a secret interdimensional agency: the Order. Pack yourself with deadly weapons and experimental equipment, then journey through the portal to strange parallel worlds!
Assassinate your targets, sneak in enemy bases and investigate mysterious anomalies to uncover the odd link between these worlds...

That how a brief description of the game looks like. The game out in 2016, done by Curius Planet and closed source. The game is based on Irrlicht Engine.



By some luck, I got sources from the authors, and thanks to never-ending work on Warp3DNova by Hans, Ogles2 by Daniel, GL4ES by ptitSeb, and SDL1/2 by Capehill
we can play a more or less modern game on AmigaOS4.



The game uses a lot of shaders everywhere (about 30 original OpenGL ones, and about 100 internal GL4ES ones). And this is probably the most demanding game for today in terms of shaders on our OS.

Key Features:
    - Explore 8 atmospheric worlds, full of secrets and mysteries.
    - Sneak in enemy bases using suppressed guns, experimental equipment, incredible powers... or your bare hands.
    - Fight against masked madmen, mysterious dimensional creatures, giant birds equipped with chainguns, and more.
    - Collect points by completing missions and finding secrets, then use them to upgrade your equipment with powerful weapons and specialized outfits.
    - Play minigames, fight in the dangerous colosseum or accomplish training missions between your main missions.
    - Witness the consequences of your actions when coming back on a world...


AmigaOS4 port changes:

  -- gl4es is used for OpenGL (so ogles2/warp3dnova)
  -- build based on amigaos4 port of Irrlicht engine: https://github.com/kas1e/Irrlicht
  -- amigaos4 specific changes
  -- builded with gcc 10.3.0
  -- fixed original issues which show ups only on AmigaOS4 due to its very sensitivity to a bugs nature.
 

NOTE: Be warned, that

1). Setting Video Quality more than "Medium" will try to use Vertex Shaders which need access to textures, and accessing to textures from Vertex Shaders is currently not supported in Warp3D Nova. There
is the report about http://www.amiga.org/developer/bugreports/view.php?id=714
At first, I thought to just disable the ability to choose more than "Medium", but in the future, it will be probably fixed in Warp3DNova, so things may work automatically after. But in meantime didn't use Video Quality bigger
than Medium.

2). "Cache Size" option set more than "Medium" will go past 2 GB of system RAM pretty quick. But we currently can't go past 1.8 GB of memory in a normal way, so once you will try to set more, you will quickly be out of system memory
and have a freeze of the OS. So, didn't use more than Medium, it's an optimal value already (which, may also sometimes be out of our 2GB barrier, so don't forget to saves when possible).

3). Changing resolution, Window/Fullscreen modes, and any other settings will have an effect after you quit and restart the game again.

4). In beginning it can be a bit hard to play, so you have training mode at the start. Follow it, and you will be able to dig in quickly. Also, remember that to skip long intros you can hit "TAB".
There is also no usual "save" like you press "ESC" and save at any time: saves there in the rooms with beds which you need to find.


For AmigaOS4 recommended requirements: X5000, Radeon RX (for better speed and complex shaders) with 2 GB of GPU memory and 2GB of System Memory. You can expect from 25 to 120 FPS across the game. In most cases, it's ~50FPS.
On X1000 with RadeonHD it should be ok too, just with a bit lower graphics details. With all minimal settings maybe be possible to play on SAM460/SAM440.

The game's data files are quite big, about 1.5 GB (due to the music & sound files mostly) and you can data files from grabbing the STEAM release version:

https://store.steampowered.com/app/304850/Worlds/

AmigaOS4 archive can be downloaded as usuall from os4depot (in upload query currently).

Alternatively, for a time being, with allowing from the author, I upload the full AmigaOS4 version ready to run with data files included on some free hostings, so at least for a few weeks, you can get it like that:

https://mega.nz/file/FM8ilBoI#yebEDO9x50J7r4l2KfTbEiQ_R5BzE5RmXIsivpfyiQE
https://dropmefiles.com/M02hP


Watch the video to see how it all looks like (if you want to see it without training level and how it all in full action, start from 12:00 in the video):

Youtube video of Worlds gameplay in action on AmigaOS4, 1920x1080 full HD

Enjoy and don't forget to check AmigaOS4's readme coming withing archive.


2). Eldritch



Eldritch is a "rogue" game like Minecraft, Barony, and co, and this one didn't use GL4ES, but directly OpenGL ES2. Lots of works were spent
to make it be Big Endian aware (probably the most boring game in that terms) and AmigaOS4 friendly.

Originally developed by David Pittman and published 7 years ago by Minor Key Games. Thanks to code-work done by ptitSeb we can play it on AmigaOS4 as well:



AmigaOS4 port changes:

  -- directly using opengles2.library
  -- builded with gcc 10.3.0 with -flto
  -- many (mean a lot!) of general big-endian changes
  -- amigaos4 specific changes

A game needs about 256MB of GPU memory and 512 MB of RAM. As usual, X5000 is preferable.

Please report all the bugs found to my GitHub repo there:

https://github.com/kas1e/Eldritch

See how it all in action:

Youtube video of Eldritch gameplay in action on AmigaOS4, 1920x1080 full HD



3). Gorynlich




Gorynlich (aka Goblinhack v2) is a top-down dungeon romp with single and multiplayer options. The game is written in 2016 by Neil "goblinhack" McGill, and were adapted to works on AmigaOS4 with
the help of ptitSeb (who do the initial port to Pandora and made some necessary optimization and code rewrite) and with tips from the original author.



A game needs 256 MB of GPU memory and 1GB of system memory.

The game was written not as optimal as expected, it was the first game from the author, so don't expect an ultra-speed for "pure 2d game". With big help from ptiSeb and author, i were able to reach decent performance, and so on Radeon RX 560 and x5000, you may expect ~50 FPS.

AmigaOS4 port changes:

  -- gl4es is used for OpenGL (so ogles2/warp3dnova)
  -- amigaos4 pathes, stack cookie
  -- builded with gcc 10.3.0
  -- fixes of original game's code bugs
  -- global and a big rewriting by ptitSeb to make it fits on machines with low rams
  -- speed up changes

The game is open-sourced, and you can find the latest code with AmigaOS4 changes there:

https://github.com/kas1e/Gorynlich

Don't forget to report bugs on https://github.com/kas1e/Gorynlich/issues as well.

And check the video to see how it looks like in action on my x5000:

Youtube video of Gorynlich gameplay in action on AmigaOS4, 1920x1080 full HD


4). Also, there are few re-releases of previously released games, but with a bit of fixes and changes:

4.1). Fricking Shark rerelease :



FrikingShark is a Remake of Taito's classic Flying Shark with a 3D C++ engine that uses OpenGL and OpenAL.



 -- Working with all inbuild shaders now. Mean no micro-pauses at the beginning and better visual effects. Shaders enabled by default now (Resources/Scripts/GameGUI.cfg/ItnoreShaderSupport=0)
 -- Much improved speed when original game's shaders in use (in original win32 version when shaders in use FPS is worse in compare when they not, for us it better now)
 -- faster loading
 -- recompiled with GCC 10.3.0 (smaller binary)

  video of FrikingShark in action on AmigaOS4, 1920x1080 full HD


4.2). Night of the Zombies re-release :



NIGHT OF THE ZOMBIES it's a first-person shooter where you must survive endless waves of attacking zombies, earning points that may be used to purchase weapons, unlock new areas, etc. Every next round, zombies become stronger, faster, and more hungry!




 -- faster loading. Before it was 55 sec to load up everything, now it's 30 seconds.
 -- faster speed in the game itself.
 -- added FPS counter in the window mode (in the title bar)
 -- a much cleaner look of NPOT 2D images
 -- fixed "high score" to be empty at the beginning.
 -- recompiled with GCC 10.3.0
 
Youtube video of Night Of The Zombies in action on AmigaOS4, 1920x1080 full HD
 
4.3). SuperTuxKart re-release :



One of the first Irrlicht based games I was able to deal with is SuperTuxKart 0.8.1:



 -- much faster startup: 7 seconds now instead of 17
 -- working FBO usage. So now you have a much faster "car choice" screen, as well as an FPS increase in the game itself. Because of which FBO enabled now by default.
 -- small speed-ups everywhere: for example, when you choose a level before, there was a little "pause" in sound for 1-2 seconds, now there is almost none.
 -- all original shaders coming with game working. (you can see how post-processing (motion blur) shaders working for example in the "Subsea" level when we "accelerates").
 -- fixed loading of addons which were broken since hardcoded http://stkaddons.net/ expired in favor of new  https://online.supertuxkart.net
 -- added data/cert.pem and necessary code to handle SSL connections
 -- display FPS is ON by default
 -- recompiled with GCC 10.3.0


Youtube video of SuperTuxKart 0.8.1 in action on AmigaOS4, 1920x1080 full HD

5). GL4ES SDK 1.2 update



In the end there first update to GL4ES SDK.

As on os4depot you always have the latest version of SDK, I create a GitHub repo where all versions will be placed. It's always useful to have older versions of SDK in case of some bugs introduced in the last one.

https://github.com/kas1e/GL4ES-SDK/releases/

Remember, that work on SDL1/SDL2 done by Capehill. All I do is wrote a replacement to MiniGL for both SDL libs, so they use GL4ES instead, and pack this all up. Those changes can be found there:

https://github.com/kas1e/SDL1_GL4ES
https://github.com/kas1e/SDL2_GL4ES


The changelog doesn't fit in amiga.org post limits, so go to GitHub mentioned above if you in interest at all.

And as usual, want to give a big thank you to:

to ptitSeb for gl4es and all his help with everything
to Daniel for OpenGL ES2 and all his help with everything
to Hans for Warp3DNova and all his help with everything
to Capehill for never ended work on SDL1/2, glSnoop, and all his help with everything
to AEON/AmigaKit because of which we have OpenGL ES2 and Warp3DNova
to others for all the help and tests
 
The following users thanked this post: TribbleSmasher

Offline amigakit

Re: GL4ES Round 4: Down the hole
« Reply #1 on: April 18, 2021, 07:58:26 PM »
Thanks so much for your hard work too :-)

Your dedication to getting new content out for users is commendable and very much appreciated
www.AmigaKit.com - Amiga Hardware/Software Dealer

New Products  --   Customer Help & Support -- @amigakit

USA Toll Free Order Tel: 1-888-698-6758