Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : Picomite VGA Gems 'n' Rocks
Page 1 of 3 | |||||
Author | Message | ||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1113 |
This is a Boulder Dash style vintage maze puzzler in which player collect gems before time runs out. Here is a playable beta-version to test the program flow. Movement via cursor keys and Game*Mite keys possible.(I prefer GameMite) "m"-Key (controller "B") switches the music on and off. ESC /Select to end the Program. It lacks a proper GUI, the functions for water, butterflies and fireflies, NES Controller support. But the basic game-routines works. GemsNRocks_beta.zip Thanks and suggestions for improvement are welcome. Have fun Martin Edited 2024-05-14 02:11 by Martin H. 'no comment |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4036 |
Thanks Martin. Once I've taught MMB4L how to run it I'll let you know what I think. Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1113 |
Hi Tom, thanks for your reply. I haven't tested it on MMB4W, I'm not sure if the "sprite memory" command works on it, or the Linux version. You can use the tileset instead on a 2nd page , and copy the Tiles to the screen, which works fast enough on the PC. Cheers Martin Edited 2024-05-14 04:57 by Martin H. 'no comment |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4225 |
Nice Martin, Have been playing it on VGA. There are some rules I do not understand yet (sometimes a boulder falls in a pit to the side, sometimes it does not). And when a level starts you see it build up (very fast, but never the less). Is this all running on N layer ? Is it the intention that the flies and butterflies move in the grid, or pixel based (sprites) on L ? But it looks nice. Reminds me a lot of Supaplex, I played a lot in the 90's. Volhout Edited 2024-05-14 06:15 by Volhout PicomiteVGA PETSCII ROBOTS |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1113 |
Simple rules apply to gravity. A stone/gem falls logically if there is air underneath it. If it lies on another stone or gem, the system checks whether there is air next to it and diagonally below it; if this is the case, it falls one space diagonally. As the scanning process is always carried out from bottom to top, stone avalanches can occur. It also makes a difference whether the object lies on the player or falls, so I set a bit (128) for the next scan, which remembers that this object was in motion. The advantage of this method is that the objects manage themselves and I don't need any additional fields or time consuming routines to manage them. The plan for fireflies and butterfliesis, that will move clockwise and anticlockwise also just in the grid, so they just can move in "Air".(A layer is not required on VGA Version, Framebuffer is just used for faster LCD support). Here, the two upper bits should indicate the current direction of movement. Both are deadly but if an object falls on a butterfly, the field it is on and those around it turn into gems.(one butterfly = 9 gems) So one task in the game will be to drop objects so that they land on a butterfly. Shouldn't be too difficult to integrate into the scan routine,but I still have some work to do. I still have to find out how the water should act Edited 2024-05-14 15:00 by Martin H. 'no comment |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4225 |
What I can find, boulderdash does not have water, but it has walls. Volhout PicomiteVGA PETSCII ROBOTS |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1113 |
ChatGPT: I'm still not sure if I should include it in my game or not Butterflies and fireflies move similarly in the game. Both circle obstacles in their environment in a fixed direction: The direction of movement of both can be accommodated in 2 bits - Fireflies always move clockwise around obstacles. If a player gets close enough or clears a path for a firefly, it continues to move in a straight line until it encounters an obstacle, whereupon it continues its movement in a clockwise direction. The stored array would therefore be l, u, r, d =-1,-65,1,65 (65 =string len in the map array) - Butterflies always move in an anti-clockwise direction. Like fireflies, they also move in a straight line until they encounter an obstacle, at which point they continue moving in their predetermined direction. The stored array would therefore be r, u, l, d = 1,-65,-1,65 Edited 2024-05-14 18:30 by Martin H. 'no comment |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4036 |
Hi Martin, I'm pretty certain it doesn't. It will when 0.7.0 is released . Sure, and MMB4L will support that, but the intent is to do something more "clever" ... For my own purposes (and hopefully useful for others) I am implementing MMB4L to act as a sort of Rosetta Stone for MMBasic games development. Specifically, adding one of these lines to the top of an existing program: If Mm.Device$ = "MMB4L" Then Option Device "Colour Maximite 2" If Mm.Device$ = "MMB4L" Then Option Device "PicoMiteVGA" If Mm.Device$ = "MMB4L" Then Option Device "PicoMite" : Option Platform "Game*Mite" will put MMB4L into a mode of operation where it will try to *simulate* the graphics / audio / controller / keyboard handling behaviour of the specified device. e.g. at the moment if MMB4L is configured for "Colour Maximite 2" then any calls to access the CLASSIC Wii controller on I2C3 (the single game port on the CMM2 G1) are instead directed to the first attached USB gamepad. Likewise if configured for the "Game*Mite" then access to the Game*Mite controller ports will be directed to the first attached USB gamepad. Note that it is *simulation* not *emulation* and it's going to be "good enough" rather than "perfect". It certainly won't work with programs that use code (not data) in CSUBs or directly access the display buffers via PEEK and POKE; all MMB4L surfaces are 32-bit. Best wishes, Tom Edited 2024-05-14 22:16 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1113 |
Here is the version with working routines for butterflies and fireflies. The zip file only has the basic program, so the folder structure and files from the first upload are needed. Now all that is missing is a proper framework( Menus , Gameover etc.) Then the enemies will also be set to deadly. GNR-Beta2.zip have Fun 'no comment |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4225 |
Hi Martin, I was just studying your code, to add the fireflies and butterflies moves.... you beat me to it .... Did you ever play the game with water? do the flies fly over it ? Great work!! Volhout PicomiteVGA PETSCII ROBOTS |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4036 |
Hi guys, I'm still on Beta 1, here is what MMB4L currently makes of it https://youtu.be/wP7mwUbPs1Q. I'm assuming the trail when I move the player is some MMB4L bug, not a program bug ? On a related matter can someone point me at some example data for *uncompressed* memory sprites. Best wishes, Tom Edited 2024-05-16 05:14 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1113 |
I had some trouble with the movement, because the scans run from bottom to top, from left to right, a fly that is moved up or to the right keeps moving during the scan. I solved this by also giving them a +32 marker when they were moved and ignoring them on the next scan. I think I'll do without the water, the levels are hard enough as it. Then a few additional levels and/or a level editor as a bonus. 'no comment |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1113 |
Hi Tom Nice but much to fast The trail is not on the mites, as I fill the cell of the map array with "0" when the player left the cell. The screen is completely redrawn with each run (like in PetsciiRobots), so only the background should be displayed in the places where the player was.Looks like you dont refresh the whole Screen. but the MMB4L looks very promising I have to go to sleep now, I will zip the Spr Files tomorow Cheers Martin Edited 2024-05-16 05:32 by Martin H. 'no comment |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4036 |
Slaps own head. Well figuring that out was fun ... ... I hadn't noticed that some of the sprites were uncompressed ... and I hadn't written the code to render uncompressed sprites, which is why I was asking for examples. D'Oh! Best wishes, Tom Edited 2024-05-16 07:41 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1113 |
Tom, I have adapted the last Version so that it also supports MMB4W, (which should run on MMB4L without any problems). Since the routines are identical except for the image output, this version is primarily made so that I can continue programming when I don't have a Pico to hand. But you can also have fun playing under MMB4W To keep it simple I use a 2nd page with the tiles. GemsNRocks_beta2W.zip Good luck Martin Edited 2024-05-16 18:39 by Martin H. 'no comment |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4036 |
Hi Martin, I fixed / implemented the missing behaviour, next up for MMB4L will be MOD playback. Nice, though as I've said before MMB4L will be able to run the PicoMiteVGA and Game*Mite versions by just adding one line to them ... plus adding something to control the "framerate" to the game loop: Const FRAME_DURATION = 30 Dim next_frame% Do ' Main loop next_frame% = Timer + FRAME_DURATION ' ' Do stuff ... ' Do While Timer < next_frame% : Loop Loop Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4225 |
Sorry Tom, Martin, I tried the 2W beta release on a standard VGA mite, and had to hack my way around to get it to run. I think you have made it work on MMB4L and Game*Mite, but not on VGA yet. When I get it to run, I will review it. Volhout PicomiteVGA PETSCII ROBOTS |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4036 |
I don't believe any changes have been made by Martin to accommodate MMB4L, I'm just running the PicoMiteVGA version (beta 1) in (an alpha version of) MMB4L. Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1113 |
I have a query in the 2W, if it is the MMB4W system, a different routine (copy of the tiles from a 2nd page) is used to create the image. the Beta2 (2W not tested) runs on PicoMiteVGA Edited 2024-05-16 19:56 by Martin H. 'no comment |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4225 |
Hi Martin, Exciting code. You used 19 goto's. But also function's. This is a good example of how old-meets-new. MMbasic can do it all. Volhout PicomiteVGA PETSCII ROBOTS |
||||
Page 1 of 3 |
Print this page |