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 : MMBasic: Knightmare Game
Page 2 of 10 | |||||
Author | Message | ||||
LeoNicolas Guru Joined: 07/10/2020 Location: CanadaPosts: 479 |
Thank you Tom and Bill Bill, I'll take a look at the errors on the MMB4W. I will keep the adjustments for the CMM2 to the end of the project. The black boxes are a weird problem because I'm using the screen mode that supports alpha, and pages 0 and 1 will "blend" considering the transparent pixels, what is happening on the MMB4W. I'm adding power-ups and delta time to the game this weekend. The delta time is to keep the game speed consistent across different platforms. I will try to fix the buffer issues you have reported. I'm also considering implementing support for gamepads. I need to buy one first. What gamepads do you recommend? |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1611 |
I've had no experience with gamepads other than the Wired Classic Controller Pro like this one which is supported by Tom's Lazer Cycle and will plug into the CMM2 front panel. It worked well for me. Bill PS. "FITHUB" I didn't notice that until I read it just now. Keep safe. Live long and prosper. |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6776 |
The wired Classic is supported by the PicoMite too now. :) Tom's a champion of the NES/SNES controllers too, which are easy to read. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1611 |
True: The CMM2 and MMB4W both need an interface for these and others but I don't want to hijack this thread. Bill Keep safe. Live long and prosper. |
||||
LeoNicolas Guru Joined: 07/10/2020 Location: CanadaPosts: 479 |
I found this super cheap one on Amazon, is it work? https://www.amazon.ca/Nintendo-Controller-kiwitat%C3%A1-Joystick-Raspberry/dp/B01JYGYAX8/ref=sr_1_3?crid=2X4V5DJ5QHJT9 Edited 2023-12-10 09:43 by LeoNicolas |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1611 |
Sorry, I had no idea. Bill Keep safe. Live long and prosper. |
||||
vegipete Guru Joined: 29/01/2013 Location: CanadaPosts: 1109 |
I'd say no way, those are USB devices. It needs to have the funky Wii connector, that sort of square thing that fits the circuit board jack. Visit Vegipete's *Mite Library for cool programs. |
||||
Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 6776 |
Unfortunately, at the moment there is no standard connector shared between the PicoMite boards, the CMM2 and the PC. The closest we get is the keyboard. I'm working on that, with a PicoMite board that will accept the WII Classic and other I2C controllers. There were adapters that will connect the Wii Classic to a PC too (Like this, but out of stock) . There was also the Elecom adapter but that seems to be unavailable now. Edited 2023-12-10 19:09 by Mixtel90 Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9104 |
Transparent pixels must be RGB(0,0,0,0) and not rgb(BLACK) = rgb(&HFF,0,0,0) The best way to load a sprite is from a png file. If you view a suitable png file the background will be a grey checkerboard and not black |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4036 |
Hi Leo, I'm worried the state of controllers has not been made completely clear: 1. MMB4W has NO controller support. Hence Bill having started this thread https://www.thebackshed.com/forum/ViewTopic.php?FID=16&TID=16491#213846. Though, I hope my friend Bill will forgive me, this is the sort of "craziness" that hardware engineers come up with when unsupervised . In theory the OneLoneCoder library that Peter used for MMB4W has functions for (USB?) controller support (or at least it is available as a plugin), but that requires someone with both inclination and time on their hands to upgrade MMB4W. 2. The CMM2 (and now PicoMite) has support for Wii Classic Controllers with the "nunchuck" connector, like this one: https://www.amazon.co.uk/gp/product/B07H9BKG1G 3. The CMM2 and PicoMite cannot use any USB controllers, e.g. those "SNES" ones that you posted a link to, which aren't SNES at all, except cosmetically. Best wishes, Tom Edited 2023-12-11 01:11 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
LeoNicolas Guru Joined: 07/10/2020 Location: CanadaPosts: 479 |
Yes, it is what I'm doing. On GIMP I'm exporting the image as PNG 8bpc RGBA. This is the PNG from the project repo: https://github.com/leonicolas/knightmare-cmm2/blob/main/tiles/objects.png Edited 2023-12-11 07:41 by LeoNicolas |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3800 |
When I view that it doesn't look to have a checkerboard background. That's in firefox - is that the wrong way to view? John Edited 2023-12-11 09:38 by JohnS |
||||
LeoNicolas Guru Joined: 07/10/2020 Location: CanadaPosts: 479 |
The browser does not show the pattern, it shows the background under the image. The square pattern is rendered by some softwares to show the image transparent areas. You can download the PNG and open it on Gimp. Gimp uses the square pattern |
||||
lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3150 |
Ok, got it: PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9104 |
If you load the complete image as a sprite does that show as expected? How are you breaking up the image into individual sprites? |
||||
LeoNicolas Guru Joined: 07/10/2020 Location: CanadaPosts: 479 |
I'm doing something wrong for sure I'm also having artifacts sometimes when I'm hiding and showing sprites. The following image shows an example of when I'm hiding the sprite over the block that shows the block content (the gray block is the background and is overlayed by a sprite showing the question mark or the block content). This problem happens when the shield is over the block, and I'm hiding the block sprite. I will probably need to create a simpler code reproducing the artifacts problem to help you. These are the steps I'm using for creating sprites: 1) I'm loading the PNGs into different pages when the game starts using: page write MAP_TILES_BUFFER: load png "MAP_TILESET_IMG" page write OBJ_TILES_BUFFER: load png "OBJ_TILESET_IMG" ... Where: const SCREEN_BUFFER=2 ' Screen buffer number const MAP_TILES_BUFFER=3 ' Map tileset buffer number const OBJ_TILES_BUFFER=4 ' Objects tileset buffer number const BOSSES_TILES_BUFFER=5 ' Bosses tileset buffer number const GENERAL_USE_BUFFER=6 ' General use buffer number 2) In the main loop, I'm drawing the map tiles in the SCREEN_BUFFER and also scrolling the background 3) I'm spawning new sprites when necessary in the SCREEN_BUFFER using: sprite read sprite_id%, OBJ_TILE%(obj_id%,0)+offset_x%, OBJ_TILE%(obj_id%,1)+offset_y%, OBJ_TILE%(obj_id%,2), OBJ_TILE%(obj_id%,3), OBJ_TILES_BUFFER sprite show safe sprite_id%, g_obj(i%,1),g_obj(i%,2), layer% Where OBJ_TILE contains the coordinates of the image in the PNG to be used by the sprite. 4) I'm moving the sprites using sprite next and sprite move 5) I'm copying the SCREEN_BUFFER page to the page 0 using: page write 0 blit 0,TILE_SIZEx2, SCREEN_OFFSET,0, SCREEN_WIDTH,SCREEN_HEIGHT, SCREEN_BUFFER page write SCREEN_BUFFER Edited 2023-12-12 03:11 by LeoNicolas |
||||
LeoNicolas Guru Joined: 07/10/2020 Location: CanadaPosts: 479 |
Matherp, I have found and fixed the issue that was causing artifacts when collecting the bonus blocks I also partially implemented the power-ups. I will release a new version with full power-ups on the weekend. The following video has a glimpse of the new power-up implementation https://youtu.be/PCZzFoVUj44 |
||||
Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 4222 |
Hi LeoNicolas, This is looking so good !!! Wauw. Volhout PicomiteVGA PETSCII ROBOTS |
||||
LeoNicolas Guru Joined: 07/10/2020 Location: CanadaPosts: 479 |
Does anyone have the experience and time to help me migrate VGM audio to MOD? I can provide the VGM files that can be opened on FamiStudio, which provides the song notes and effects from the two used audio channels. Unfortunately, FamiStudio doesn't support exporting MOD files. The following image exemplifies the Knightmare stage 1 song in FamiStudio. |
||||
Martin H. Guru Joined: 04/06/2022 Location: GermanyPosts: 1113 |
https://www.thebackshed.com/forum/ViewTopic.php?TID=16416&P=1#212599 'no comment |
||||
Page 2 of 10 |
Print this page |