![]() |
Forum Index : Microcontroller and PC projects : MMB4W Graphics. I need a kick-start
Author | Message | ||||
PhenixRising Guru ![]() Joined: 07/11/2023 Location: United KingdomPosts: 1476 |
Strangely enough, after decades of BASIC programming I've never used the native commands and functions, always some GFX library or other. I am sure we have what I need in MMB4W but I'm not sure of the best approach. In RFO BASIC (Android), I create my own BMP elements and load them into memory at startup and they are assigned a handle. With this handle, I can hide/show the element. Going through the manual and the documentation on OneLoneCoder Github, it looks like we have everything. Sprites? Does anyone have sample code for this sort of thing to minimize my learning curve? |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5193 |
Hi Phenix, I think you can use the CMM2 graphics manuals (Geoff's site) for MMB4W. Volhout PicomiteVGA PETSCII ROBOTS |
||||
PhenixRising Guru ![]() Joined: 07/11/2023 Location: United KingdomPosts: 1476 |
Oh yes, I have lots of documentation all opened up ![]() MMB4W is really nice ![]() ![]() |
||||
PhenixRising Guru ![]() Joined: 07/11/2023 Location: United KingdomPosts: 1476 |
Oh it's dead easy ![]() ![]() const kn10=1 dim string fname fname="c:\mmb4w\knob10" SPRITE LOADPNG kn10, fname SPRITE SHOW kn10,100,100,0 |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 8041 |
The old 8-bit Atari Lynx console (anyone remember it?) had amazing sprite handling in hardware, courtesy of the 16-bit Suzy chip that had DMA. 16 simultaneous colours from a palette of 4096 per scan line too. It's a pity the display was such low resolution! Them wus proper sprites i' them days! :) (Lanky translation not available, sorry) Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
PhenixRising Guru ![]() Joined: 07/11/2023 Location: United KingdomPosts: 1476 |
Test of show/hide (png files in attached zip) This method uses a lot of handles, will probably use a different method. cls dim integer i dim string fname fname="c:\mmb4w\servo_lag00" for i = 0 to 49 sprite loadpng i+1, fname+str$(i) next do for i = 1 to 50 sprite show i,100,100,0 pause 20 next for i = 50 to 2 step -1 sprite hide i pause 20 next loop Meter.zip |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |