Jump to content
IGNORED

Random Maze Test 2011


Random Terrain

Recommended Posts

Thanks to jwierer's latest change to Visual batari Basic, I can use data that can be read and poked directly into playfield variables, starting and ending anywhere I want, so this random maze test is even faster now:

 

 

Latest Version

 

Here's the .bin file to use with an emulator or a Harmony cart on a real Atari 2600:

 

random_maze_test_16x16x16_with_fast_data_32x23_2012y_11m_22d_0322t.bin

 

 

Press Reset or the fire button to get a new maze.

 

 

Related thread:

 

http://www.atariage.com/forums/topic/205563-whats-so-great-about-vbbs-convert-to-data-file-example-program/

 

 

 

----------------------------------------------------

 

 

OK, this one has 16 x 16 x 16 pieces that the program can randomly choose from. After getting math help from RevEng, I now understand that this maze has 4,096 possible combinations.

 

[Oops! I introduced a bug where the top section was sharing the memory of the middle section. That has been fixed.]

 

 

Here's the .bin file to use with an emulator or Harmony cart:

 

random_maze_test_16x16x16_with_scroll_32x23_2011y_08m_21d_2001t.bin

 

 

 

----------------------------------------------------

 

 

 

I forgot to do it before, but I just remembered and added a little bit of memory so no section can display a piece twice in a row. For example, if piece 6 was the last middle piece used, piece 6 can't be displayed this time.

 

 

Here's the .bin file to use with an emulator or Harmony cart:

 

random_maze_test_with_scroll_32x23_2011y_08m_21d_0321t.bin

 

 

 

----------------------------------------------------

 

 

 

Below is an updated version using the scrolling technique posted by theloon instead of reading data. You can see a slowed down working example in this post.

 

The random-ish mazes in my original post were in 3 section and each section had 7 pieces that the program could randomly choose from. This version is similar, but I adjusted the look of a couple of the pieces and added one more piece to each of the 3 parts, so now each section has 8 pieces that the program can choose from.

 

 

Here's the .bin file to use with an emulator or Harmony cart:

 

random_maze_test_with_scroll_32x23_2011y_08m_20d_0820t.bin

 

 

Please let me know if you like it or hate it or find a mistake in the mazes. Once this is working properly, I'll use the mazes for the new version of Bloober and the Gnarl.

 

 

 

----------------------------------------------------

 

 

 

Original Post

 

 

Below is a test program that creates random-ish mazes. Press the Reset switch or the fire button to make a new maze.

 

 

Here's the .bin file to use with an emulator or Harmony cart:

 

random_maze_test_32x23_2011y_08m_18d_0830t.bin

 

 

I created the mazes using Visual batari Basic's playfield editor, then converted the playfields to data using jrok's idea. It seems to waste more space and is clearly slower than using pfhline and pfvline, but converting the playfields to data is faster and easier (and you can see the shape of the playfields in the data).

 

If you get a chance, try it out and let me know if you think the mazes are good enough the way they are or if you think I should work on them some more.

 

 

Thanks.

Link to comment
Share on other sites

Below is a test program that creates random-ish mazes. Press the Reset switch or the fire button to make a new maze.

 

 

Here's the .bin file to use with an emulator or Harmony cart:

 

random_maze_test_32x23_2011y_08m_18d_0830t.bin

 

 

I created the mazes using Visual batari Basic's playfield editor, then converted the playfields to data using jrok's idea. It seems to waste more space and is clearly slower than using pfhline and pfvline, but converting the playfields to data is faster and easier (and you can see the shape of the playfields in the data).

 

If you get a chance, try it out and let me know if you think the mazes are good enough the way they are or if you think I should work on them some more.

 

 

Thanks.

 

Random Maze... :ponder:

 

Random Terrain.... :ponder:

Link to comment
Share on other sites

Nothing wrong with your mazes for Pac-Man or Wizards of Wor.

I'm redoing Bloober and the Gnarl because the old 'maze' was too small and my old code sucked. After I'm satisfied with this random-ish maze, I'll change the sprites, add sound effects, make the Gnarl see again and upgrade his brain.

 

 

 

Have you considered anything like my Destiny WIP where I stack 3 random sections to make one screen? You could then augment them with a few random walls or passages. Bet it'd be slightly quicker.

The old smaller maze from 2008 was basically created in 3 parts (top, middle and bottom) using pfhline and pfvline. Each section had 7 'pieces' to randomly choose from.

 

I did a similar thing this time, but instead of using pfhline and pfvline, I used data and pfpixel like this:

 

  data Maze_Data_Middle_04
  1,1,1,0,0,1,0,0,1,1,1,0,0,1,1,1,1,0,0,1,1,1,0,0,1,0,0,1,1,1,
  0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,
  0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,
  0,0,1,0,0,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,0,0,1,0,0,
  0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,
  0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,
  0,0,1,1,1,1,0,0,1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,0,1,1,1,1,0,0,
  255
end

 

That's why it's so slow.

 

I forgot to look at your Destiny WIP code until now. I see that you're using scrolling, but I'm not exactly sure how it works. If you get a chance, do you think you could post a new thread with a small example program showing how others could use your technique? Then I could link to it from the bB page (and hopefully use it in the test program in the first post to make faster random-ish mazes).

Edited by Random Terrain
Link to comment
Share on other sites

I forgot to look at your Destiny WIP code until now. I see that you're using scrolling, but I'm not exactly sure how it works. If you get a chance, do you think you could post a new thread with a small example program showing how others could use your technique? Then I could link to it from the bB page (and hopefully use it in the test program in the first post to make faster random-ish mazes).

No need for that. I thought it was more complicated than it was. I made a couple of quick non-random test programs just to see what it would look like using scrolling.

 

Here's a slow version that shows the scrolling:

 

scroll_test_slow_2011y_08m_20d_0332t.bin

 

 

Here's a faster version that blanks the screen while scrolling so it won't make people puke:

 

scroll_test_fast_2011y_08m_20d_0410t.bin

 

 

(Press the Reset switch or the fire button to restart the program.)

 

 

 

 

Here's a question for anyone reading this. The blanking out of the faster version would only happen at the beginning of a game, when the reset switch is pressed, or if I make it so the player can move from one maze to another after completing a task of some kind. Do you think it's fast enough? (Press the fire button over and over again to see if you think the screen stays black for too long.)

Edited by Random Terrain
Link to comment
Share on other sites

I think it's fast enough. My Destiny WIP is in danger of being annoying because you're constantly changing screens. The time it takes to wend your way to the exits in your mazes is enough delay.

 

I'm glad you figured it out :) I was a bit confused looking at my old code. The premise, fortunately, is simple: Use partial playfield: statements and then push the screen so a new layer of playfield: statements can be drawn.

  • Like 1
Link to comment
Share on other sites

If nobody can find any problems, I'm moving to the next step:

 

Time to get Bloober and the Gnarl finished for the Atari 2600

 

 

I'm still trying to work out the details. If anyone has any ideas, please post a reply in my blog (or here in this thread if you want).

 

 

Thanks.

Link to comment
Share on other sites

  • 1 year later...
  • 2 years later...

Your A.I is really good for the ghost, it seems to work really well, would you mind telling how you did it? =)

There are two versions on the bB page, but I think the ghost movement code is basically the same:

 

randomterrain.com/atari-2600-memories-batari-basic-commands.html#maze_32x23

 

randomterrain.com/atari-2600-memories-batari-basic-commands.html#maze_32x12

 

Just remember that a better programmer could have done it using less code. I haven't moved past the bloated code stage.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...