Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

The 20 Line Challenge / 3D Random Maze

Author
Message
Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 22nd Aug 2006 23:52 Edited at: 23rd Aug 2006 04:12
I have written random maze generating code in DBP before. This one is still based off the same algorithm. I have even made it 3d before (using a matrix). This time I changed my code to make a 3d maze object.

Slayer 93 wrote the create_vertex function which I use. There was no reason to change his function, so I just used it exactly how he wrote it (except I compressed it). Anything larger than 65*65 doesn't work because of the limit which "set object normals" has. I can't imagine anyone making it through a 65*65 3d maze anyway.

10 (really long) lines-


Uncompressed-


Edit: Forgot to mention, you are trying to get to the yellow sphere.

sadsack
20
Years of Service
User Offline
Joined: 27th Nov 2003
Location: here
Posted: 23rd Aug 2006 02:35
very nice, that could be come a game when it grows up.
renny
Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 23rd Aug 2006 04:23
Thanks.

Please post the dimensions of the largest maze you beat.
25*25 is it for me.

flashing snall
18
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Boston
Posted: 23rd Aug 2006 06:35
i tried 25x2, but got hopelssy lost

great code. definty could be one of those never ending games where you have a time limit and point, and mmunchies!

Your signature has been erased by a mod
Sixty Squares
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 23rd Aug 2006 17:07 Edited at: 23rd Aug 2006 17:08
AMAZING CODE!

I managed to beat a 27x27 maze!

But... I made a minimap

Xenocythe
18
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 23rd Aug 2006 17:34
Nice work. Didn't take a overhaul look at your code, but I saw how you created vertexes and then made a emsh out of it- very clever. But I ask, how did the mesh genereate in faces? Are the vertexes connected?


Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 23rd Aug 2006 19:39 Edited at: 23rd Aug 2006 19:43
The verticies are automatically connected as triangles. That means the first 3 verticies are connected to form a triangle, and then the next 3 verticies are connected to form a triangle, and so on. The triangles are not connected to each other, they are just positioned next to each other. All the square faces you see in the maze are actually 2 triangles.

@Sixty Squares- A minimap is cheating, but good cheating, so congradulations as you have the highest score so far.

Xenocythe
18
Years of Service
User Offline
Joined: 26th May 2005
Location: You Essay.
Posted: 23rd Aug 2006 20:28
Heh, I see.


Sixty Squares
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 24th Aug 2006 00:34
Quote: " A minimap is cheating"

Yeah, I know

Hobgoblin Lord
18
Years of Service
User Offline
Joined: 29th Oct 2005
Location: Fall River, MA USA
Posted: 24th Aug 2006 20:26
I beat a 41x41 using the right hand rule. larger then that and sometimes it seems it does not make a complete maze and leaves some walls blank.

http://www.cafepress.com/blackarrowgames
Check out my great stuff here
Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 24th Aug 2006 22:31 Edited at: 24th Aug 2006 22:31
Well done on beating a 41x41!
I just beat a 43x43 maze by trying the right hand rule.

I don't know what you mean when you say it doesn't complete a maze and leaves walls blank. I have never seen this.

Sixty Squares
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 24th Aug 2006 22:43
Right Hand Rule? What's that?

Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 25th Aug 2006 00:05 Edited at: 25th Aug 2006 02:37
You only use one hand. You only use the arrowkeys, never turning the camera, so it is impossible to get turned around.

Whether you use your left or right hand doensn't actually matter, that's not the point.

Here is a new challenge-
Balls of Fiery Doom
Try to reach the end of the maze now. It forces you to look where you are going, because those fires burn.

If you click on a sphere it will be force up and away from you. But beware, they slide quite a bit, and it could backfire.

My record: 15x15

Uncompressed code-


Compressed code-


Sixty Squares
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 25th Aug 2006 04:44 Edited at: 25th Aug 2006 04:45
Here's what I found:
-The new texture hurt my eyes bit it was awesome!
-The fireball did nothing. I click on it and nothing happens. I go in it and nothing happens.

And what is that "ode create dynamic sphere" stuff? I seem to support it but I don't know what it is

Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 25th Aug 2006 05:20 Edited at: 25th Aug 2006 05:24
Ode is physics built into DBP; naturally it is undocumented.

I don't see why the fire balls aren't doing anything on your computer. I can't imagine how you couldn't be hurt by standing in it. The test is simply "if object collsion(3,0)>3", where object 3 is placed at the camera and objects 4 and up are the fire balls.

I can't really help because I have no idea why it wouldn't work. What version of Dark Basic Pro are you using?

Sixty Squares
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 25th Aug 2006 18:37
Version 6.2b. I'll try again.

ode=Physics!?

lower logic
17
Years of Service
User Offline
Joined: 15th Jun 2006
Location:
Posted: 26th Aug 2006 22:14 Edited at: 26th Aug 2006 22:15
The right-hand rule means you follow the wall on your right, turning right whenever possible and only turning left when you cannot go straight. http://en.wikipedia.org/wiki/Maze

I got through a 99x5 maze . Pretty fun little code snippet.
swJawa
17
Years of Service
User Offline
Joined: 24th Aug 2006
Location:
Posted: 26th Aug 2006 23:13
beating a ?x5 maze is eazy as you can almost only go straight.
btw, I didn't see any fireballs and the new texture is only easyer to orientate.

getfirefox.com
Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 4th Sep 2006 01:20 Edited at: 4th Sep 2006 01:21
O, well I thought I knew what the right hand rule was.

I am using v6.2 and it works fine for me. I can't really fix the problem because I wouldn't know when it was fixed.

This is what I see when I run my code-


Attachments

Login to view attachments
The ARRAYinator
18
Years of Service
User Offline
Joined: 13th Aug 2005
Location:
Posted: 4th Sep 2006 01:35
Nice Work Daemon! Im working on a maze game as well. Seems that everyones doing it,lol Great Job!!!



Admin 7737
17
Years of Service
User Offline
Joined: 14th May 2006
Location: Japan... I WISH!!
Posted: 9th Sep 2006 15:47
51*51 i beat

-----------------------------------------------------------
Im in A race With 5 People And I'm in third, I over Take 2nd, In what position am I? (Email me for the Answer!)
Sixty Squares
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 9th Sep 2006 19:14
Really? wow. Oh, and the fireballs decided to work for me and they killed me because they covered the whole hallway so there was no way through lol

Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 10th Sep 2006 16:43
A 51*51 maze! That is amazing. At this rate I may have to find a way to allow mazes larger than 65*65.

If anyone beats Admin 7737's score please say, because I have begun posting the highest score on my website. Don't be stupid and lie. No one looks at my website anyway.

Code Dragon
17
Years of Service
User Offline
Joined: 21st Aug 2006
Location: Everywhere
Posted: 18th Sep 2006 23:40
I beat a 53*53 maze, but the fireballs don't work.
Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 19th Sep 2006 03:06
hmm.... I wonder why the fireballs aren't working for some people.

O well, I'll still say you are winning.

sneaky smith12
17
Years of Service
User Offline
Joined: 30th Apr 2006
Location: Like id tell you, oh wait i just did
Posted: 20th Sep 2006 01:11 Edited at: 20th Sep 2006 01:17
Quote: "But... I made a minimap "


I'm actually working on something quite similar to this maze idea
I for some reason left my programming skills in last year.

Could you please post/email me the code for the minimap.
I have only cloggy d3d and (forgot the name) multiplayer dll.

thanks...

and for the game beat a 23x23 map

also note... if you want me to post my code... it currently is over 3700 lines, i'm using fresh gui.
although for the map genorator i'm basically using tutorial 6(huge dungeons) i think it is

If at first you dont succeed, LOWER YOUR STANDARDS.
Code Dragon
17
Years of Service
User Offline
Joined: 21st Aug 2006
Location: Everywhere
Posted: 20th Sep 2006 02:36
This is strange... the fireballs work on my old computer (DBP v5.9)
but not on my new computer (DBP v6.2) I did see 1 fireball on my new computer yesterday, but it was stuck in the wall and didn't do anything.

I guess there's 76 fireballs by looking at your code, but don't you think there should be more for bigger mazes? In very large mazes they would be rare. I think that's why I only found one.
Sixty Squares
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 20th Sep 2006 14:02
@sneaky smith12:
It's not really a minimap, but all you need to do is use the SET CAMERA TO IMAGE command and position the camera over what you want to follow. Then put the camera image on a sprite. That will generate a 3D minimap.

Ummm...
Code Dragon
17
Years of Service
User Offline
Joined: 21st Aug 2006
Location: Everywhere
Posted: 21st Sep 2006 00:00
I beat a 65*65!

I used this cheating code to look for fireballs (not win the 65*65)
and they're all underneath the maze, and don't move either.


Sixty Squares, could you post your code anyway? I think set camera to image may be the answer to something I've been trying to do for awhile now, but I don't understand how to use it...
Sixty Squares
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 21st Sep 2006 02:49 Edited at: 21st Sep 2006 02:53
Here is some messy (I didn't include REMs) minimap code. Hope it helps. It uses lots of variables for easy adjustment.



Ummm...
Code Dragon
17
Years of Service
User Offline
Joined: 21st Aug 2006
Location: Everywhere
Posted: 22nd Sep 2006 04:06 Edited at: 22nd Sep 2006 23:04
Ok I understand it now. Thanks.

I was trying to make one of those TVs you see in Super Mario Karts 64 and Super Smash Bros. Melle, but what happend was I couldn't get the command to work with camera 0. I had to make a second camera right where the first one is; it's a ineffient, but much better than my other method, using get image then texture object. Very slow.

In fact it is now in this test program I made.
http://forum.thegamecreators.com/?m=forum_view&t=89228&b=7

Confucius Say...Programmer who makes genetic programming system loses job
Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 22nd Sep 2006 22:40
Congradulations on beating the 65*65 Code Dragon.

Now I feel almost obligated to let it handle larger mazes. I think that if I broke it into limbs it should be able to set object normals for larger mazes.

Code Dragon
17
Years of Service
User Offline
Joined: 21st Aug 2006
Location: Everywhere
Posted: 22nd Sep 2006 23:00
Thanks!

When I made that cheating code, I noticed just how big a 65*65 maze is. My first thought was "Wow. I must have way too much free time if I beat that."

I noticed mazes larger than 65*65 do work on my old computer (even though it's too slow to play it) because it doesn't recognize set object normals (it doesn't even report a syntax error), but my new computer crashes on it. With it off, big mazes work, it's just a bit darker; nothing set ambient light wouldn't fix.

Confucius Say...Programmer who makes genetic programming system loses job
sneaky smith12
17
Years of Service
User Offline
Joined: 30th Apr 2006
Location: Like id tell you, oh wait i just did
Posted: 23rd Sep 2006 19:51
ty sixty ill try it out.

If at first you dont succeed, LOWER YOUR STANDARDS.
Sixty Squares
17
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 24th Sep 2006 00:00
Alrighty

Ummm...

Login to post a reply

Server time is: 2024-04-19 14:16:41
Your offset time is: 2024-04-19 14:16:41