ATTR_MAZE 3D By Andy 'Uglifruit' Jenkinson For the 48K ZX Spectrum Written for Woot 2022 TLDR: Q,A,O,P. Navigate maze, find black panels. SPACE/M play a mini game in a black panel. Score 10,000 points in total, and then find the exit. Hold 1 for Map. Total score is based on number of mini-games taken, and times you used the map. BACKSTORY: You sit in your tiny 8x8 cell, listening to the tannoy announcement. The speaker system informs you that the overlords who keep you here - the treacherous Attrs - are running another 'Maze' for the enjoyment of the masses, and they have selected this year's "Rat". As they read out the i.d. number of the citizen who will be partaking this year and you realise with rising horror that it is you... The Maze, even its name strikes fear into the sane - nightmarish garish corridors that you must be navigated to find 'The Games'. The Games themselves perversions of the ancient trials - here used to mock and humiliate the Rats as the cruel Attrs look on and 'score' the Rat's performance. Before you are dropped you into The Maze the announcement tells you to make this 'Rat-run' entertaining for the spectators - there should be no dawdling - and to play your hardest - the audience hates to be bored. You know that it is possible to end with a final score of zero points if you complete The Maze but take too long - you don't want that to happen - It's happened before, and nothing has been heard of those 'Rats' since. 'Good luck' the Attr guard says insincerely as he pulls you from your cell and pushes you through a door into the brightly lit maze... ...As your eyes become accustomed to the garish colours in front of you, you smile to yourself. You've got a secret. Within the tiny 8x8 holding cell there was a loose brick, behind which was a wrapped up bundle containing something that looked like a compass, and a piece of parchment. One side of the parchment seemed to contain a map of The Maze, and scrawled on the other were some hints, and instructions for using the compass: "Hello Rat, you are no doubt scared - but we can get through this... You're going to want to complete The Maze - which means scoring 10,000 points, then finding the exit. Scoring points is easy - find the BLACK PANELS in the maze, and play The Games behind them. There are four games, codename DGE, BMB, SNK, FLP. Each can only be played once, then the panel become white and is useless (though might help you navigate). When you've found and played all four games - four more Panels with be revealed. The first four games always start near to your starting place, so finding those ones shouldn't be too hard. If you do need help this is where your compass will help you - it's calibrated to show the directions of the walls The Maze - and when you're IN LINE WITH AN ACTIVE PANEL your border will show a stripe of the colour direction. You won't know how far away in the maze the panel is, but this should help you later on in the game. If you're really stuck you can USE THE MAP - this will show the locations of PANELS (both active or spent) and YOUR LOCATION, but each use will cost you 100 points at the end of the game. Oh, yes... EACH GAME YOU PLAY will also cost you 100 points at the end of the challenge too. So you'll want to play as few as possible to get to that magic 10,0000 points. When you get 10,000 points a special Panel will open, and all the others will become useless - head to that one to leave. You'll be scored depending how long you took to get to 10,000. A maximum of 10,000 would be available if you could somehow get to 10,000 points playing no games and taking no seconds with no use of the map. Obviously that's not possible, but try to score over 6000. Anything less than that is just embarrassing. And scoring no points at all is shameful - but very possible if you're not very good at The Games. To that end you can PRACTICE THE GAMES BEFORE YOU ENTER THE MAZE, if you're a bit of a wimp." The parchment goes on to say: Q - FORWARD A - BACK O - TURN LEFT P - TURN RIGHT SPACE/M - OPEN PANEL (when facing it). 1 - (HOLD FOR) MAP And, in the games: DDG: O - LEFT P - RIGHT BMB: SPACE/M - DROP SNK: Q - UP A - DOWN O - LEFT P - RIGHT FLP: SPACE/M - FLAP And from the MENU SPACE/M - ENTER THE MAZE I - INFORMATION 1,2,3,4 - PRACTICE THE GAMES (FOR WIMPS) and 5 for SUPERWIMPS." DEVELOPMENT: This game has been a long time coming - originally written as a proof of concept in BASIC and then in Assembly which I started. In Oct 2021. I was inspired by Malcom Evans's Knot In 3D and the use of the colours to imply the 3D world, and wondered if I could do something like his ZX81 Monster Maze but just using attributes. This has *really* stretched my assembly skills, and I'm sure I've used very inefficient programming in places, but I'm still very proud at having not used library routines but written everything from scratch - even down to the sound engine to play the tunes (which uses a changing duty cycle for a quite 'phased' sound). The game itself is very simple (and not especially satisfying). Travel around a maze, find the black panels, play the mini games, and then - once you've aggregated 10,000 points - find the exit panel. I know that the mini games are hard, that's why you can practice them from the main menu (Keys 1,2,3,4). On the menu '5' slows the games down, and sets a lower target if you're really struggling. Some hints/interesting things: 1. Dodge Walls. Keys: o/p for left and right. It's VERY VERY twitchy, get used to the movements as soon as possible. A score of 1000 is good going. This is based very much upon my 1K game I wrote "Slither Highway" which I wrote for a 1K programming challenge - although I wrote it all from scratch, rather than reusing any of my source code. Of moderate interest is that walls are not quite random. There IS a random seed (0-256) but then it takes the lowest 2 bits of the ROM data to decide if the wall will be one to the left, right or the same as before. 2. Plane Bomba. Keys: m or space. You score more points for destroying building blocks with dark colours. Don't just bomb the white blocks - try to bomb the same place over and over again. At some point there might be time to drop bombs in two places in a pass thus get even more points. Aim to score over 1000 in a run. This was interesting to write - the times when you can't bomb (when there's a bomb in the air) and the fact that it debounces the key (so you can't hold fire) were decisions to try to make it a bit more fun. 3. Snake. Keys: q,a,o,p. It's VERY fast. Drink lots of caffeine to play this. 1000 points is going some. This game was 50% faster, which was ridiculous. I don't know why I thought that was okay, it's hard enough as it is. Of note: I've made it so pressing the opposite direction to the one you are going doesn't do anything - thus helping with turning back on yourself quickly and not risking 'eating your own shoulder' if a key press wasn't registered. I quite like the look of the snake in this, though it's pink, so it's a worm, isn't it? The game really inefficiently stores every address of the snake, and moves the down a table every move. I know an index for the starting point would have made far more sense. But I did it the crap way. 4. Flapi Block. Keys: m or Space. This is very hard. I can sometimes score 1000. Sometimes. Yes, I know. The resolution of your position is *much* more than the resolution of the screen - so the movement (from a distance) looks a bit gravity like - but microscopically can be hard. Short presses are your friend here. A long press will have you bouncing off the ceiling. You can also bounce off the floor - that was a pleasing moment in the programming when I got that working nicely. As you play the gaps in the walls get smaller, and then the walls get closer together. Playtesting this was hard, as I am crap at it. It does mean it's the one I enjoy playing most of all. The MAP: Pressing (and holding) 1 shows you the map. Used panels are in dark blue, active ones are white, and you're shown in cyan. (I know the panels are inconsistent with the game, but black for the ones you're looking for on the map looked terrible). Of interest there is an unused, inaccessible section of map (it's actually 32x32) in memory at the bottom, but has no minigames in it, and doesn't show on the map screen. Border: There's an indicator for the direction of where active panels are with respect to you - this was initially going to be the only way of navigating the maze - which I liked, but was a little difficult (perhaps), particularly if you don't know the maze. With the maze drawing routine being just in the Attributes there is plenty of time (Three HALTS) to squeeze in a border routine. If I get rid of the halts the maze is far far too fast. Some things you'll probably not notice unless I point them out to you. The player and first games all appear in the top third of the map, so you're likely to stumble across a game without too much hunting. This was to get beginners in to the 'how to play' so they weren't just wandering around aimlessly. The random player starting position is never facing a wall. The random routine for placing new panels was a bugger to check for. Valid places in the map for a panel had to have two 'walls' blocks either side in either the horizontal or vertical direction (but not both) and at least one 'empty' floor space adjacent to it. The 3d Engine doesn't play nicely with ones on outside corners, so this also needed to be checked for and avoided. If there are two black panels adjacent, on an inside corner, it is possible that the snake game has a black 'border' that the snake could escape from! This very situational bug was picked up very late on in the development. Each mini game has its own theme tune. The opening of the game has a tune, as does the start of a game, scoring 10,000 points, and finally getting to the exit. There is a quite lot of music data in there - especially as it isn't very efficiently stored. The 'Big Font' Info screen was fun to do, but writing the game instructions using (almost exclusively) five letter words was arduous. My converting-a-number-into-decimal (for the score printing) uses a horrible brute force way of doing things. (Take off 1000, and count how many times we can do this til a carry occurs. Then repeat for hundreds, tens.) There are better ways - I don't know why I didn't think to use an 'off the shelf routine' ... I can't be the first person to have a game that wants to display a score! Also there are a couple of 'debug/cheats/extra keys'. On the Menu - 5 (toggles an 'easy' mode). This introduces an extra HALT instruction into all of the mini games (slowing each to about 3/4 of the original speed) and sets the total target score as 5000, rather than 10,000. You can use 1 (Dodge Walls),2 (Plane Bomba),3 (Snake Bites) and 4 (FlapiBlock) on the menu to learn the mini games - and they use the speed/of the game (normal or easy), so you can practice with stabilisers on if you need. CHEAT: Pressing 2 AND 3 in the game will set your score to just less than the target, so you can see the ending, if you can't be bothered to play the games. Pressing 4 and 5 from the map exits the game if you're bored. If I had the programming skills I might have generated a random map at the beginning of the game. But I don't know how I'd go about that. I hope you get some enjoyment from the game, it's been great fun it and - despite some of the crappy programming tricks - I'm really proud of it. Andy. December 4th 2022 p.s. HACK: There's another hidden 'feature' to find, but I'll let you discover it - you'll need to examine the loading screen... p.p.s. I just scored 7940. Didn't use the map once.