SUPERDIVORCE Posted February 27 Share Posted February 27 Imagine Pac-Man, but the maze is invisible when a level starts. Unlike games that feature a "flashlight" that only lights up a small area around the player, I'm trying to permanently reveal the maze as the player moves through it. Can this be done without collisions? I have an idea to start each level with the PF color set to black so it matches the background, and then use a routine that will permanently change the PF color to a visible option within x number of scanlines and PF pixels of the player's position. First of all, I don't know if this is possible. Second, I'm not sure how I'd go about writing such code. Any tips would be much appreciated! Quote Link to comment Share on other sites More sharing options...
glurk Posted February 28 Share Posted February 28 Could not be done by playfield color. Could oossibly be done by drawing / notdrawing playfield in selected areas. Maze would necessarily be based purely on coordinates. This would require extra RAM and bankswitching at least, and possibly DPC+ or some ARM scheme. I think its possible but extremenly difficult, probably best for a very experienced 2600 programmer. Quote Link to comment Share on other sites More sharing options...
SUPERDIVORCE Posted February 28 Author Share Posted February 28 19 hours ago, glurk said: Could not be done by playfield color. Could oossibly be done by drawing / notdrawing playfield in selected areas. Maze would necessarily be based purely on coordinates. This would require extra RAM and bankswitching at least, and possibly DPC+ or some ARM scheme. I think its possible but extremenly difficult, probably best for a very experienced 2600 programmer. I may have found a possible workaround using the approach taken by the creator of this game. However, it's written in bB and I don't know what's happening in the code. I'm wondering if I could start each level with the entire maze area being one solid color, and then as the player moves, the walkable space is "painted" black, revealing the open pathways. Similar to the way the player in the game I linked to paints the screen green. Does this seem more doable? Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted February 29 Share Posted February 29 It is possible to change the color of the playfield mid-scanline. You can see that in Congo Bongo, the section circled in cyan draws the playfield in 3 different colors : In Stella's Debug Color Mode the playfield is drawn in purple. it is, however, a rather advanced technique and subject to timing limitations, so I wouldn't recommend it. What you could do is use RAM to store how the playfield is drawn. By modifying the values in RAM as the player moves around you'd be able to reveal the maze. This would be similar to how Surround uses the playfield to draw the trails left behind each player: Quote Link to comment Share on other sites More sharing options...
SUPERDIVORCE Posted March 1 Author Share Posted March 1 6 hours ago, SpiceWare said: What you could do is use RAM to store how the playfield is drawn. By modifying the values in RAM as the player moves around you'd be able to reveal the maze. This would be similar to how Surround uses the playfield to draw the trails left behind each player: I reached out to Oscar Toledo on X last night to get his input and he actually suggested something very similar. Great minds think alike eh?! Unfortunately, I haven't been able to find any noob-friendly tutorials on this topic, but my understanding is that a template of blank playfield tiles would need to be created in RAM. Then, in ROM you would store the "drawn" playfield tiles that would replace the blanks upon the player entering a blank area. However, I'm struggling to wrap my brain around how the player triggers that transfer of data from ROM to RAM. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.