BASIC

Author Topic: Maze tiler test  (Read 7121 times)

Offline matchy

  • Prof. Inline
  • *****
  • Posts: 1540
    • View Profile
Maze tiler test
« on: 2008-Jan-21 »
Testing out a total of 3MEG bitmap sprites with PeeJay's Random Maze Generator.

<a href="http://www.youtube.com/watch?v=aHrwKb-PBIM" target="_blank">http://www.youtube.com/watch?v=aHrwKb-PBIM</a>

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4142
  • On the shoulders of giants.
    • View Profile
    • My Apps
Maze tiler test
« Reply #1 on: 2008-Jan-21 »
Nice :)
I came. I saw. I played.

Offline PeeJay

  • Mr. Polyvector
  • ***
  • Posts: 244
    • View Profile
    • PeeJays Remakes
Maze tiler test
« Reply #2 on: 2008-Jan-21 »
Cool. If you're interested (which I doubt!) the maze generation function is using a modified randomised Prim's algorithm - and I think I may have found a bug in the code :( I'll post a bugfix once I have had a bit of a play .....
www.peejays-remakes.co.uk
For games, remakes, and GL Basic Tutorials
Artificial Intelligence is no match for Natural Stupidity

Offline bigsofty

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 2586
    • View Profile
Maze tiler test
« Reply #3 on: 2008-Jan-21 »
Excellent stuff, now add some stats, treasure and baddies! :D
Cheers,

Ian.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

Offline matchy

  • Prof. Inline
  • *****
  • Posts: 1540
    • View Profile
Maze tiler test
« Reply #4 on: 2008-Jan-21 »
thx kindly dudes

:) Oh yeah, although I'd like to create more detail in the tile mapping, zoom scaling, sprite management and path finding (pj?).

bigsofty, the baddies are there, almost, although the wall collision is a bit clumsy. That is why I tested two characters for bitmap loading and I'm hoping to add many more, depending on available run-time memory. I need to test LOADANIM, to increase level loading as currently it takes awhile to load individual bitmaps.

Treasure, pickup, quests, doors, etc will depend on game-play, which I hope to make interesting and not just a maze game. Perhaps some level may be hand created, like with Mappy. I need to find out the technical limits mentioned above before I start on this. I've even opted out of isometric for now.

peejay, is the path thickness modifiable? For example, 3 tiles wide yet 1 tile for the wall. Entry and exit points would help. I'm not sure what the bug results, but I'd be happy to update the code in future.

Offline PeeJay

  • Mr. Polyvector
  • ***
  • Posts: 244
    • View Profile
    • PeeJays Remakes
Maze tiler test
« Reply #5 on: 2008-Jan-21 »
The bug fix is out - it meant that there was the possibility of having a block of 3x3 gap near the maze edges - this was due to me compacting everything into one function (and making a hash of it!), but has now been fixed.

Entry and exit points can be anywhere around the edges of the maze with the variable value being an odd number (eg
  • [7] or
  • [21] or [13][0] - you get the idea!). When I get some time, I will look at adding A* path finding (which is what I used in my Maziacs game)


As for variable thicknesses for walls and paths, this is not practical. Given your example of 3 tiles for the path and one for the wall, if a column has 5 path cells and 5 wall cells, that would make (5.3+5 cells = 20 cells) - but if the next row had 6 path calls and 4 wall cells, that would mean (6.3+4 cells = 22 cells), thus meaning the whole maze shape would become totally distorted and unmanageable
www.peejays-remakes.co.uk
For games, remakes, and GL Basic Tutorials
Artificial Intelligence is no match for Natural Stupidity

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10682
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Maze tiler test
« Reply #6 on: 2008-Jan-22 »
For pathfinding, use FINDPATH command. However, PJ's maze has 1 and 0 inverted. Thus, you must prepare the maze data once before.

Offline matchy

  • Prof. Inline
  • *****
  • Posts: 1540
    • View Profile
Maze tiler test
« Reply #7 on: 2008-Jan-22 »
OMG - there's a built in FINDPATH function!!!!!! LOL. I really need to read the whole help file. ;)