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 : PicoMiteVGA: "Brownian motion" sprite example
Author | Message | ||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4036 |
Hi folks (which probably means Peter), Just working on sprite support in MMB4L using the "Brownian motion" example: https://www.thebackshed.com/forum/ViewTopic.php?TID=14884#187117 However at the end of the main loop we have: For i=1 To 64 vector i, direction(i), 1, x(i), y(i) Sprite show i,x(i),y(i),1 If sprite(S,i)<>-1 Then break_collision i EndIf Next i Except the SPRITE(S) sub-function isn't documented or implemented to take any additional arguments on either the PicoMiteVGA or CMM2. What gives - other than MMBasic's "loose" error handling ? Best wishes, Tom Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 9110 |
Looks like a bug in the Basic program - should be If sprite(C,S,i)<>-1 Then and as you say additional parameters are not error-ed unless specifically coded for |
||||
thwill Guru Joined: 16/09/2019 Location: United KingdomPosts: 4036 |
Thanks Peter, I'm going to go out on a limb and suggest you confused yourself and meant: ' If sprite i has any active collisions then ... If Sprite(C, i) > 0 Then ... Best wishes, Tom Edited 2024-06-10 00:54 by thwill Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Print this page |