You will not be able to post if you are still using Microsoft email addresses such as Hotmail etc
See here for more information viewtopic.php?f=20&t=7296
DO NOT USE MOBILE / CGNAT DEVICES WHERE THE IP CHANGES CONSTANTLY!
At this time, it is unfortunately not possible to whitelist users when your IP changes constantly.
You may inadvertently get banned because a previous attack may have used the IP you are now on.
So I suggest people only use fixed IP address devices until I can think of a solution for this problem!
Please make sure you are logged in for at least 2 hours
to make sure your IP is added into the firewall whitelist, thanks :)

CODING CHALLENGE #1

STOS programming section.
Post Reply
User avatar
exxos
Site Admin
Site Admin
Posts: 27801
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

CODING CHALLENGE #1

Post by exxos »

A simple routine to get things moving.

Write a simple routine which will move either a sprite, bob, joey etc, in a square in low resolution with a 100pixel movement in each direction.
User avatar
exxos
Site Admin
Site Admin
Posts: 27801
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: CODING CHALLENGE #1

Post by exxos »

Jon S. Stock
Here's my attempt. It uses the "animals1.mbk" stock assets from the STOS disk.


10 mode 0 : flash off
20 load "a:\animals1.mbk",1
30 cls
40 sprite 1,50,50,11
50 rem Start of loop
60 move on
70 repeat : K$=upper$(inkey$) : MX=x sprite(1) : MY=y sprite(1)
80 if MX=50 and MY=50 then gosub 140
90 if MX=150 and MY=50 then gosub 150
100 if MX=150 and MY=150 then gosub 160
110 if MY=150 and MX=50 then gosub 170
120 until K$="Q"
130 end
140 move x 1,"(1,1,0)E150" : move on : return
150 move y 1,"(1,1,0)e150" : move on : return
160 move x 1,"(1,-1,0)e50" : move on : return
170 move y 1,"(1,-1,0)e50" : move on : return
Post Reply

Return to “STOS”