Author Topic: Terror in the Maze (graphics enhancement + surround sound)  (Read 3163 times)

0 Members and 1 Guest are viewing this topic.

Offline MasterGy

  • Seasoned Forum Regular
  • Posts: 327
  • people lie, math never lies
    • View Profile
Terror in the Maze (graphics enhancement + surround sound)
« on: February 14, 2022, 06:51:05 am »
I figured out a quick shading for _MAPTRIANGLE 3d.
After making the car game, I took out Terror in the maze again and was surprised that the 3D rendering was often incomprehensible. When I made the game, I didn’t see it objectively. After looking at it again for a long time, I saw that there was confusion, not seeing what was happening. Galleon's idea of ​​shading the maze is very good! But only the maze became shaded, not the other elements. The enemies, the hundreds, or occasionally thousands of shrapnel, and the fire of the dragon were not shielded. Not because it would have required a lot of distance measurement, and the display would have stalled due to the many SQRs. In fact, for a thousand items, even a simple multiplication means a lot.
I came up with a good solution. Suppose we use 20 shades of 1 texture. The depth of _MAPTRIANGLE 3d Z is between 0 and -16384. I create an array DIM SHADOW (16384) and populate it proportionally from 0 to 20.
00000000111111111222222222 .... and so on.
This allows the shadow to be read without calculation from the Z value of the existing maptriangle.
De! the problem with that is cheating. If the observed object is not in front of us, but a little to the side, the Z-value will be less, so the object will become lighter, even though the distance from us is the same.
I came up with a solution for this:

 
solut01.jpg


Thus, with no calculations, thousands of textures appear shaded in front of us, creating the best 3D effect.
In addition, many changes:
-I also changed the generation of the maze walls. it’s not even programming, it’s more about color theory. I tried a lot to understand why that lot of color isn’t good, and I learned a lot during the making of the car game.
-as a car game, I also made this for surround sound. in principle it's written for a 4.0 sound system, but I can't try it, but the 2.0 stereo works. It is especially advantageous when we do not yet see the dragon but hear its direction.
-Many little things have been added to the program. I added what I needed and took what I didn’t. For example, the compass made no sense in the game.
-I added a multi-style maze texture to the game. Shown in the video. Everyone can choose which one is more enjoyable to play with.
-the gun gets hot in our hands if we shoot a lot. This will prevent the player from shooting recklessly, but not empty the magazine.
The course of the game has not changed.
Get the next round of ammo. Watch out, because if the monster gets close to you, it will take you away and run away with it! Shoot down every monster that approaches! If you have the ammo, the fairy will take you to the box that contains the dragons. Behind the box is the ammunition needed to blow up the next box. We can detonate the box if we have the ammunition and we will fire a 100% shot with the right mouse button!
Convert the 'starter' and 'titm_game' files to exe. The game starts with 'starter'.



comparison with old graphics before repair:
old:


Download:
https://drive.google.com/file/d/19GsqDs2Jt3m2oRWKZMh_C350rEgEp8nv/view?usp=sharing

Offline _vince

  • Seasoned Forum Regular
  • Posts: 422
    • View Profile
Re: Terror in the Maze (graphics enhancement + surround sound)
« Reply #1 on: February 17, 2022, 08:39:37 pm »
nice, do you do all your 3D work using only MAPTRIANGLE and nothing _gl just like your flight simulator?  The 2D or 3D version of maptriangle?

Offline MasterGy

  • Seasoned Forum Regular
  • Posts: 327
  • people lie, math never lies
    • View Profile
Re: Terror in the Maze (graphics enhancement + surround sound)
« Reply #2 on: February 18, 2022, 08:54:27 am »
I started learning about opengl many times, but I always gave up. And it would be good to know. Using _maptriangle is simple, I just have to count a lot before I get a position of 1 point. I use a mix of _maptriangle 2d and 3d.