-
Here's an endless game with a ridiculously large mouse pointer.
[ This attachment cannot be displayed inline in 'Print Page' view ]
createObjects
createMouse
level = 1
pollMouse
checkMouseAction
updateObjects
showObjects
top$
= "Level:" + STR$(level
) + " * Score:" + STR$(score
)
showMouse
limit = 60 * (level / 2)
mouseDown = -1
mouseDown = 0
createObjects
level = level + 1
obj(i).w = 10
obj(i).h = 5
IF obj
(i
).bg
= 0 THEN obj
(i
).bg
= 1 obj(i).state = -1
IF x
>= obj
(i
).x
AND x
<= obj
(i
).x
+ obj
(i
).w
- 1 THEN IF y
>= obj
(i
).y
AND y
<= obj
(i
).y
+ obj
(i
).h
- 1 THEN obj(i).x = obj(i).x - 2
obj(i).y = obj(i).y - 1
obj(i).w = obj(i).w + 4
obj(i).h = obj(i).h + 2
pollMouse
showObjects
showMouse
obj(i).state = 0
score = score + obj(i).bg
activeObjects = activeObjects - 1
i = 1
mouse
(i
) = mouse
(i
) + CHR$(a
)
mouseData:
DATA 219,219,219,219,220,0 DATA 219,219,219,219,219,219,220,0 DATA 219,219,219,219,219,219,219,219,220,0 DATA 219,219,219,219,219,219,223,223,223,223,0 DATA 219,223,32,32,223,219,219,0 DATA 32,32,32,32,32,32,219,219,0
box obj(i).x, obj(i).y, obj(i).w, obj(i).h, obj(i).fg, obj(i).bg
COLOR obj
(i
).fg
, obj
(i
).bg
obj(i).x = obj(i).x + obj(i).xv
IF obj
(i
).x
< 1 OR obj
(i
).x
+ obj
(i
).w
> _WIDTH THEN obj
(i
).xv
= obj
(i
).xv
* -1
obj(i).y = obj(i).y + obj(i).yv
IF obj
(i
).y
< 1 OR obj
(i
).y
+ obj
(i
).h
> _HEIGHT THEN obj
(i
).yv
= obj
(i
).yv
* -1
-
Great and fun!
A fine example for
_DEFAULTCOLOR
_BACKGROUNDCOLOR
_CONTINUE
_CEIL
etc etc etc..
Thanks
-
Fellippe I'm sorry but your creature is so fine that has put me into creative status so I find this MOD in my imagination:
_TITLE "Boundaries: a X-mutant of Clicker"
Lives = 5
createObjects
createMouse
level = 1
pollMouse
checkMouseAction
updateObjects
top$
= "[Level:" + STR$(level
) + " * Score:" + STR$(score
) + " * Lives:" + STR$(Lives
) + "]" showObjects
showMouse
limit = 60 * (level / 2)
IF Lives
> 0 THEN Lives
= Lives
- 1 createObjects
Lives = 5
showObjects
mouseDown = -1
mouseDown = 0
createObjects
level = level + 1
obj(i).w = 10
obj(i).h = 5
IF obj
(i
).bg
= 0 THEN obj
(i
).bg
= 1 IF obj
(i
).fg
= obj
(i
).bg
THEN obj
(i
).fg
= obj
(i
).bg
+ 8 obj(i).state = -1
IF x
>= obj
(i
).x
AND x
<= obj
(i
).x
+ obj
(i
).w
- 1 THEN IF y
>= obj
(i
).y
AND y
<= obj
(i
).y
+ obj
(i
).h
- 1 THEN obj(i).x = obj(i).x - 2
obj(i).y = obj(i).y - 1
obj(i).w = obj(i).w + 4
obj(i).h = obj(i).h + 2
pollMouse
showObjects
showMouse
obj(i).state = 0
score = score + obj(i).bg
activeObjects = activeObjects - 1
i = 1
mouse
(i
) = mouse
(i
) + CHR$(a
)
mouseData:
DATA 219,219,219,219,220,0 DATA 219,219,219,219,219,219,220,0 DATA 219,219,219,219,219,219,219,219,220,0 DATA 219,219,219,219,219,219,223,223,223,223,0 DATA 219,223,32,32,223,219,219,0 DATA 32,32,32,32,32,32,219,219,0
box obj(i).x, obj(i).y, obj(i).w, obj(i).h, obj(i).fg, obj(i).bg
COLOR obj
(i
).fg
, obj
(i
).bg
obj(i).x = obj(i).x + obj(i).xv
IF obj
(i
).x
< 1 OR obj
(i
).x
+ obj
(i
).w
> _WIDTH THEN RestartLevel
'obj(i).xv = obj(i).xv * -1
obj(i).y = obj(i).y + obj(i).yv
IF obj
(i
).y
< 1 OR obj
(i
).y
+ obj
(i
).h
> _HEIGHT THEN RestartLevel
'obj(i).yv = obj(i).yv * -1
the X-mutant brings these news:
changed goal: don't let escape the box out of the borders
no simple box with no borders and no caption (it can appear in your creature when Fg and Bg are the same)
you have only 5 lives to accomplish this goal, after you die and restart
I have a real trouble...
also if the program is in SCREEN 0 and I force using _BLINK statement I have got no blinking message boxes...
? ? ?
Why? I don't understand.
Thanks to awaking my imagination
-
I have a real trouble...
also if the program is in SCREEN 0 and I force using _BLINK statement I have got no blinking message boxes...
? ? ?
Why? I don't understand.
_BLINK is on by default, no need to turn it on again.
You’re trying to make blinking colors by adding 8 to the background colors. However, they originally only go up to 8. Eight + 8 = 16, which would be blinking BLACK. Real blinking colors start after 16 (17 is blinking blue, which is color 1 + 16).
Now I don’t remember if you can have blinking background or only blinking foreground. It may error out.
-
Hi Fellippe
sorry for my bad comunication...
if you see at rows 56 and 68 of my X-mutant MOD I pass the light white blinking code to sub BOX for foreground color
but if you run my code you cannot see any blinking box, for this reason I have forced using _BLINK ON, but with no results.
Thanks
-
Science has determined those game boxes would multiply every bit as fast with a smaller pointer. How each box feels about that is a completely different discussion meant for the off-topic board.
Pete :D
-
Hi Pete
what do you think of the issue of blinking in SCREEN 0 ?
surely the issue doesn't come from PRINT or COLOR
as this code demonstrates
box 4, 4, 16, 6, 31, 1
box 14, 14, 16, 6, 30, 2
box 34, 14, 16, 6, 29, 3
box 34, 4, 16, 6, 28, 5
so where do i search the glitch of loosing the blinking text in screen 0?
Thanks
PS: what is your modification (variant) of these boxes' games?
-
_DISPLAY stops blinking. I finally understand your question.
As per the wiki:
IF _DISPLAY is used, blinking is disabled, even if _BLINK is ON, but high intensity backgrounds aren't enabled in this case.
-
Fellippe must have had my eyesight in mind when he created this code.
Thanks TempodiBasic, with just Fellippe's code I could see the pointer but not the point of playing. :)