### Author Topic: Terror in the hypermaze  (Read 1367 times)

0 Members and 1 Guest are viewing this topic.

#### MasterGy ##### Terror in the hypermaze
« on: April 05, 2021, 05:22:21 PM »
Hi ! I'm building a game for the 4d maze. The main elements are there, it can only be expanded according to the scheme. It will include strategy, action, lots of enemies, lots of unique movement enemies, and more.
That's all for now. Everything still has 4 coordinate points. To objects, to enemies, to me. Since it is scientifically interesting to change the projection, I left the space button in it to change perspective, although the same maze remains. The enemies and I can come and go in the hyperspace corridor.

If you just want a simple 3D maze, write so that one of the planes is 0 at the beginning of the program, for example:

street_x = 3 'street in plan X
street_y = 3 'street in plan Y
street_z = 3 'street in plan Z
street_a = 0 'street in plan A

If you want a 2D maze, let 2 planes be 0, e.g.

street_x = 3 'street in plan X
street_y = 3 'street in plan Y
street_z = 0 'street in plan Z
street_a = 0 'street in plan A

Have fun !

#### MasterGy ##### Re: Terror in the hypermaze
« Reply #1 on: April 05, 2021, 06:08:49 PM »
just a piece of advice: if you are averse to your situation being opaque in 4d or 3d, write:

street_x = 9 'street in plan X
street_y = 9 'street in plan Y
street_z = 0 'street in plan Z
street_a = 0 'street in plan A

If program write "In this perspective, the exit leads through a hyper corridor", press space! So simple and enjoyable and playful, easy to get out in 2d.
or press space until you see a maze in 2d projection

funny..my :) set to 2d, give her or 600 enemies and find the exit
« Last Edit: April 05, 2021, 06:51:43 PM by MasterGy »

#### bplus ##### Re: Terror in the hypermaze
« Reply #2 on: April 06, 2021, 12:37:23 AM »
Man I can barely handle 2D, nice work!

And this is extremely interesting image (I cut and rotated): #### MasterGy ##### Re: Terror in the hypermaze
« Reply #3 on: April 07, 2021, 09:03:10 PM »
355 / 5000
Fordítási találatok
The thing is built. I can’t jump on a modern high-quality display with maptriangle, but I try to balance it with mood, spin, physics. I am completely addicted to development. I’m experiencing a lot of things that must have been experienced by many in the ’90s. I will include its usability and a few more ideas, but I will show you until then.

#### MasterGy ##### Re: Terror in the hypermaze
« Reply #4 on: April 07, 2021, 09:14:15 PM »

Fordítási találatok
Bplus, thank you! There are so many discoveries! Math is the most beautiful thing in the world for me! I'm not clever, I just have a lot of time! Sometimes 2 things are not understood and then the two things meet at the same time and everything becomes clear :) 1 good wine and everything becomes clear! :) If I didn’t bring myself to the level, I couldn’t solve a few things!

#### Raven_Singularity

• Forum Regular
• Posts: 158 ##### Re: Terror in the hypermaze
« Reply #5 on: April 09, 2021, 07:16:41 AM »
This is pretty crazy looking.  I have no idea what's going on.  Why are hoards of emoticons attacking you?

#### MasterGy ##### Re: Terror in the hypermaze
« Reply #6 on: April 09, 2021, 04:09:43 PM »
I've only been dealing with this for days.
There were a lot of things that could go unnoticed.
-from the start surface you can set what kind of maze we want (2d / 3d), how many enemies.
-physics: bullets bounce off the wall and zigzag for a while, if we shoot a big fireball, it throws back
-Moving enemies is also somewhat strategic
- If you are aiming from one direction and attacking, you will hear a sound
I want even smarter enemies, more varieties. So far, I've got it.
I want you to give it a try and write about it, maybe if you notice a mistake.

« Last Edit: April 09, 2021, 04:39:25 PM by MasterGy »

#### MasterGy ##### Re: Terror in the hypermaze
« Reply #7 on: April 10, 2021, 07:56:17 AM »
I fixed the "emenies" slider because it was out of proportion to the difficulty. It was unfortunate that they attacked strongly even on a small level. It can now be adjusted as required.

#### MasterGy ##### Re: Terror in the hypermaze
« Reply #8 on: April 10, 2021, 10:35:15 PM »
He won't let you rest!
With the appearance of a modern game, I can’t compete, but this _maptriangle is a miracle in qb64. I try to give as much to ergonomics, manageability and physics as possible.
-If the enemy comes close, I'll move away
-if you bite into it, you will have your eyesight for a moment (fisheye)
-what you shoot a bullet and bounce back will hurt you too
-if many people hurt at the same time, you have a harder time moving at first, you feel the pain

« Last Edit: April 10, 2021, 10:39:36 PM by MasterGy »

#### MasterGy ##### Re: Terror in the hypermaze
« Reply #9 on: April 12, 2021, 10:58:36 AM »
there will also be tasks in the game, for this it is good to have a compass. I'm having trouble with that. i can't put a nice texture with maptriangle3d on the screen because depending on where i put it, it shows it in perspective as well. An older problem is that I can't clip a hardware image and then delete it with _freeimage because memory is overflowing. Therefore, I am forced to draw the 3d compass in a simpler way. I'll expose you if it's interesting.

Code: (qb64) [Select]
`monx = 600: mony = 600: mon = _NEWIMAGE(monx, mony, 32): SCREEN mon: _DEST moncp(0) = 1 'arrow heightcp(1) = .5 'arrow widthcp(2) = .5 'arrowhead heightcp(3) = cp(1) * .3 'bottom widthcp(4) = .2 'Z-size'-------------------------------------------------------------------cpp(0, 0) = cp(1) / 2: cpp(0, 1) = 0: cpp(1, 0) = 0: cpp(1, 1) = cp(2): cpp(2, 0) = (cp(1) - cp(3)) / 2: cpp(2, 1) = cp(2)cpp(3, 0) = cp(1) - cpp(2, 0): cpp(3, 1) = cp(2): cpp(4, 0) = cp(1): cpp(4, 1) = cp(2): cpp(5, 0) = cpp(2, 0): cpp(5, 1) = cp(0)cpp(6, 0) = cpp(3, 0): cpp(6, 1) = cp(0)DIM dp(13, 5), textq(13, 1)FOR ap = 0 TO 6: FOR ap2 = 0 TO 1        dp(ap2 * 7 + ap, 0) = cpp(ap, 0) - cp(1) / 2        dp(ap2 * 7 + ap, 1) = cpp(ap, 1) - cp(0) / 2        dp(ap2 * 7 + ap, 2) = (ap2 * 2 - 1) * cp(4) / 2NEXT ap2, apmc\$ = "a0a1 a1a2 a2a5 a5a6 a6a3 a3a4 a4a0 b0b1 b1b2 b2b5 b5b6 b6b3 b3b4 b4b0 a0b0 a1b1 a2b2 a3b3 a4b4 a5b5 a6b6 " 'lineszoom_x = 4800zoom_z = 10DO: _LIMIT 30    DO: LOOP WHILE _MOUSEINPUT    angle1 = _WIDTH(mon) / 2 - _MOUSEX / 50    angle3 = _HEIGHT(mon) / 2 - _MOUSEY / 50    'rotating    FOR ap = 0 TO 13        px0 = dp(ap, 0): py0 = dp(ap, 1): pz0 = dp(ap, 2)        px1 = px0 * COS(angle1) - py0 * SIN(angle1)        py1 = py0 * COS(angle1) + px0 * SIN(angle1)        px2 = px1 * COS(angle2) - pz0 * SIN(angle2)        pz1 = pz0 * COS(angle2) + px1 * SIN(angle2)        py2 = py1 * COS(angle3) - pz1 * SIN(angle3)        pz2 = pz1 * COS(angle3) + py1 * SIN(angle3)        dp(ap, 3) = px2: dp(ap, 4) = py2: dp(ap, 5) = pz2    NEXT ap    FOR amc = 0 TO LEN(mc\$) / 5 - 1        FOR ap = 0 TO 1            apx = VAL(MID\$(mc\$, 2 + ap * 2 + amc * 5, 1)) + ((ASC(MID\$(mc\$, 1 + ap * 2 + amc * 5, 1))) - 97) * 7            zc = (dp(apx, 5) + 2) * zoom_z            p(ap, 0) = dp(apx, 3) * zoom_x / zc + monx / 2            p(ap, 1) = dp(apx, 4) * zoom_x / zc + mony / 2        NEXT ap        LINE (p(0, 0), p(0, 1))-(p(1, 0), p(1, 1))    NEXT amc    _DISPLAY: CLSLOOP`

#### MasterGy ##### Re: Terror in the hypermaze
« Reply #10 on: April 13, 2021, 03:48:26 PM »
Hello !
Unfortunately, there has been no work since Easter, so I had a lot of time to play. Now comes a lot of ideas, inspiration (you know, when you buy a cigarette in the store and have to talk to someone and get annoyed and look at something like a UFO, and while he’s talking about his life, you can’t wait to code the idea). Unfortunately work from tomorrow, construction, 400km a day, and I’m the driver, so it would be nice not to be up until morning. And there are a lot of ideas and floods of ideas. I’m exposing what’s going on now because I don’t know when I can continue. (I come home at the end of the day, happy to live and get up in the morning). COMPASS! (I finally managed not with LINE, but with MAPTRIANGLE, I suffered for 3 days to point in the right direction. I had to do what I did recently, for example, Earth revolves around the maze and the compass position ultimately comes from Bplus’s game, so that if you suddenly turn back, the compass should not “suddenly,” slowly, “get in the right position.” Because I don’t know when I can continue, I will unload, although there will be key gates, enemies, fire-throwing enemies, etc. saj but unfortunately I will mix concrete from tomorrow and so on. path-cube without losing the role of the maze, thus larger spaces), physics.

sorry, I did not turn back the adjustability of the enemies. here's the good demo

« Last Edit: April 13, 2021, 10:54:03 PM by MasterGy »

#### MasterGy ##### Re: Terror in the hypermaze
« Reply #11 on: April 15, 2021, 03:36:46 PM »
I just show it interestingly. in order to build a key-gate system into the maze, I need to know the path of passage because of the arrangement of the gates. I experimented in 2d to understand and see.

Code: (qb64) [Select]
`RANDOMIZE TIMERmaze_x = 140 'maze size Xmaze_y = 40 'maze size Y'preparation -------------------------------------------------------------------------------------------------------------------------------------------IF maze_x / 2 = INT(maze_x / 2) THEN maze_x = maze_x + 1IF maze_y / 2 = INT(maze_y / 2) THEN maze_y = maze_y + 1monx = (maze_x + 10) * 8: mony = (maze_y + 5) * 16: kep = _NEWIMAGE(monx, mony, 32): SCREEN kep: _SCREENMOVE 0, 0d(0, 0) = 0: d(0, 1) = -1: d(1, 0) = 0: d(1, 1) = 1: d(2, 0) = -1: d(2, 1) = 0: d(3, 0) = 1: d(3, 1) = 0k\$(0) = "±" 'fal / adjustable wallk\$(1) = " " 'nem bejart ureg / non walked roadk\$(2) = "W" 'lehetoseg / possible wayk\$(3) = "Ű" 'szilard fal / standard wallk\$(4) = "." 'bejart ureg  / walked roadk\$(5) = "." 'belepesi pont  / entry pointDIM maze(maze_x - 1, maze_y - 1) AS _BYTE '0-fal 1-ureg 2-lehetoseg'create empty maze --------------------------------------------------------------------------------------------------------------------------------------FOR tx = 0 TO maze_x - 1: FOR ty = 0 TO maze_y - 1: k = 0        IF tx = 0 OR ty = 0 OR tx = maze_x - 1 OR ty = maze_y - 1 THEN k = 3        IF tx AND 1 AND ty AND 1 THEN k = 1maze(tx, ty) = k: NEXT ty, tx'start position -----------------------------------------------------------------------------------------------------------------------------------------DO: sx = INT(maze_x * RND(1)): sy = INT(maze_y * RND(1)): LOOP WHILE maze(sx, sy) <> 1: maze(sx, sy) = 4'way searching ------------------------------------------------------------------------------------------------------------------------------------------DO: REDIM way(9999, 2): wdb = 0    FOR tx = 0 TO maze_x - 1: FOR ty = 0 TO maze_y - 1            IF maze(tx, ty) = 4 THEN                van = 0                FOR t = 0 TO 3                    vpx1 = tx + d(t, 0): vpy1 = ty + d(t, 1): vpx2 = tx + d(t, 0) * 2: vpy2 = ty + d(t, 1) * 2                    f = (vpx2 > maze_x - 1 OR vpx2 < 0) OR (vpy2 > maze_y - 1 OR vpy2 < 0)                    IF NOT f THEN                        IF maze(vpx1, vpy1) = 0 AND maze(vpx2, vpy2) = 1 THEN                            FOR t2 = 0 TO 3: vpx3 = vpx2 + d(t2, 0): vpy3 = vpy2 + d(t2, 1): IF maze(vpx3, vpy3) = 4 THEN GOTO kovi                            NEXT t2                            maze(vpx1, vpy1) = 2: way(wdb, 0) = tx: way(wdb, 1) = ty: way(wdb, 2) = t: wdb = wdb + 1                            kovi:                        END IF                    END IF                NEXT t            END IF    NEXT ty, tx    IF wdb THEN        aw = INT(wdb * RND(1))        FOR t = 0 TO 2            hovax = way(aw, 0) + d(way(aw, 2), 0) * t: hovay = way(aw, 1) + d(way(aw, 2), 1) * t            IF (maze(hovax, hovay) = 2) OR (maze(hovax, hovay) = 1) THEN maze(hovax, hovay) = 4        NEXT t        FOR tx = 0 TO maze_x - 1: FOR ty = 0 TO maze_y - 1: IF maze(tx, ty) = 2 THEN maze(tx, ty) = 0        NEXT ty, tx    END IFLOOP WHILE wdb'entry point 1sx = 0: sy = 3: IF maze(sx + 1, sy) <> 4 THEN sy = sy + 1maze(sx, sy) = 4: start_x = sx: start_y = sy'entry point 2sx = maze_x - 1: sy = maze_y - 3: IF maze(sx - 1, sy) <> 4 THEN sy = sy - 1maze(sx, sy) = 4exit_x = sx: exit_y = sy' it has taken so far to build the maze. contained in the maze array ------------------------------------------------------------------------------------------------FOR tx = 0 TO maze_x - 1: FOR ty = 0 TO maze_y - 1        IF maze(tx, ty) <> 4 THEN maze(tx, ty) = 0NEXT ty, tx'drawingsy = INT((mony / 16 - maze_y) / 2) + 1: sx = INT((monx / 8 - maze_x) / 2) + 1FOR tx = 0 TO maze_x - 1: FOR ty = 0 TO maze_y - 1: LOCATE sy + ty, sx + tx: PRINT k\$(maze(tx, ty)): NEXT ty, txDIM dj1(tx - 1, ty - 1), dj2(tx - 1, ty - 1): dj1(start_x, start_y) = 1FOR tx = 0 TO maze_x - 1: FOR ty = 0 TO maze_y - 1: sum_way = sum_way + ABS(maze(tx, ty) = 4): NEXT ty, txactual = 1DO:    FOR tx = 0 TO maze_x - 1: FOR ty = 0 TO maze_y - 1            IF maze(tx, ty) = 4 AND dj1(tx, ty) = 0 THEN                FOR t = 0 TO 3                    noway = 0                    IF tx + d(t, 0) < 0 OR tx + d(t, 0) > maze_x - 1 THEN noway = 1                    IF ty + d(t, 1) < 0 OR ty + d(t, 1) > maze_y - 1 THEN noway = 1                    IF noway = 0 THEN                        nei = dj1(tx + d(t, 0), ty + d(t, 1))                        hel = maze(tx + d(t, 0), ty + d(t, 1))                        IF nei = actual AND hel = 4 THEN dj1(tx, ty) = actual + 1: find_way = find_way + 1                    END IF                NEXT t            END IF    NEXT ty, tx    actual = actual + 1    sy = INT((mony / 16 - maze_y) / 2) + 1: sx = INT((monx / 8 - maze_x) / 2) + 1    FOR tx = 0 TO maze_x - 1: FOR ty = 0 TO maze_y - 1: LOCATE sy + ty, sx + tx: PRINT k\$(maze(tx, ty)): NEXT ty, tx    sy = INT((mony / 16 - maze_y) / 2) + 1: sx = INT((monx / 8 - maze_x) / 2) + 1    FOR tx = 0 TO maze_x - 1: FOR ty = 0 TO maze_y - 1: LOCATE sy + ty, sx + tx            ert = dj1(tx, ty)            '            IF ert > 0 THEN PRINT CHR\$(97 + ert)    NEXT ty, tx    LOCATE 1, 1: PRINT find_way, sum_wayLOOP UNTIL find_way = sum_way - 1'atlagolasave = 1FOR tx = 0 TO maze_x - 1: FOR ty = 0 TO maze_y - 1: sum = 0: c = 0        FOR q0 = -ave TO ave: FOR q1 = -ave TO ave                IF tx + q0 < 0 OR tx + q0 > maze_x - 1 OR ty + q1 < 0 OR ty + q1 > maze_y - 1 THEN _CONTINUE                IF maze(tx + q0, ty + q1) = 4 THEN c = c + 1: sum = sum + dj1(tx + q0, ty + q1)        NEXT q1, q0        dj2(tx, ty) = sum / cNEXT ty, tx'celrajzactx = exit_x: acty = exit_yDO    LOCATE sy + acty, sx + actx: PRINT "Ű"    max = 999999    FOR t = 0 TO 3        IF actx + d(t, 0) < 0 OR actx + d(t, 0) > maze_x - 1 OR acty + d(t, 1) < 0 OR acty + d(t, 1) > maze_y - 1 THEN _CONTINUE        IF dj2(actx + d(t, 0), acty + d(t, 1)) < max AND maze(actx + d(t, 0), acty + d(t, 1)) = 4 THEN max = dj2(actx + d(t, 0), acty + d(t, 1)): need = t    NEXT t    actx = actx + d(need, 0): acty = acty + d(need, 1)LOOP UNTIL start_x = actx AND start_y = acty`

#### OldMoses

• Seasoned Forum Regular
• Posts: 440 ##### Re: Terror in the hypermaze
« Reply #12 on: April 15, 2021, 08:22:49 PM »
Amazing stuff. Devilishly hard to orient yourself and stay that way. Does it have an off switch?

#### MasterGy ##### Re: Terror in the hypermaze
« Reply #13 on: April 15, 2021, 10:38:55 PM »
what do you mean, switch off?

#### bplus ##### Re: Terror in the hypermaze
« Reply #14 on: April 15, 2021, 11:48:43 PM »
He means an escape key.

If all else fails there is Alt+F4.