Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / Sprites?

Years of Service
User Offline
Joined: 10th Oct 2002
Location: United Kingdom
Posted: 5th Jan 2003 02:21
Sorry this is a bloody retard question but how do you make srites I've looked at the code but i dont understandd it? I'm not a noob but Ive never done any 2D not really even attempted it but id like to make some retro copies like pacman etc
monkey by day, crime fighting sex god by night
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 5th Jan 2003 05:37
well the sprite command references:

the sprite number

the x position

the y position

and the image number.

rem this makes a yellow box 32 pixels square
rem with a black number
rem and stores it into image 1

ink rgb(255,255,0),1
box 0,0,32,32
ink rgb(0,0,0),1
text 1,1,"1"
get image 1,0,0,32,32

instead of all this internal creation you can also load
a pre made image.

sprite 1,10,10,1

would place sprite 1 at x10 y10 using image 1

Thats great that u have look at "the code" but the instructions are just as important

with any command it will have usage requirements and or parameters to control, Its up to you to remember them all so u can use them in different combinations to create whatever u want.

If your not sure about a command place the mouse focus
over the words of that command and press F1 it will show u the Helpfile for that particualr command.

Explore using a loop also to place mutliple sprites down and note what order they appear to be in and what ones appear to overlap.

for i=1 to 10
sprite i,x*10,y*10,i
next i

good luck

Years of Service
User Offline
Joined: 6th Dec 2002
Location: Costa Rica...bc im a bad person
Posted: 14th Jan 2003 21:09
you can also make ur own image in paint or something and save it into ur project file.

then in the program (for example):

hide mouse

load bitmap "(whatever the name is).(the file type)"
get image (the sprite number),0,0,(how wide (x)),(how long (y))
`sprites never have the same #, if u have 2 sprites then one of them is 1 and the other is 2 etc.
rem that clears the sprite u loaded
rem then u start the loop
main loop:

sync on

rem then u load the sprite
sprite (sprite#),(position(x)),(position (y)),(sprite#)

if u need more help look at this code:

Login to post a reply

Server time is: 2023-12-08 13:17:54
Your offset time is: 2023-12-08 13:17:54