GLBasic forum

Main forum => GLBasic - en => Topic started by: I666NoB666I on 2011-Feb-16

Title: sprites
Post by: I666NoB666I on 2011-Feb-16
LOADSPRITE "Sprite.bmp", 0
PRINT "Hello World", 100, 100
DRAWSPRITE 0, 100, 100
SHOWSCREEN
MOUSEWAIT

what folder or where does this pull the sprite.bmp from and why doesnt this work?

thanks ahead.
Title: Re: sprites
Post by: kanonet on 2011-Feb-16
In your project folder, there is a "project.app"-folder. This is the folder, which your Programm use. You can switch to another folder with SETCURRENTDIR().

If you put the DRAWSPRITE after the PRINT, the sprite will draw over the text and you will see just the sprite, but no text. So better switch both.
Title: Re: sprites
Post by: I666NoB666I on 2011-Feb-16
can you take me thorugh it step by step?

and thanks
Title: Re: sprites
Post by: I666NoB666I on 2011-Feb-16
and how do you make the text larger?
Title: Re: sprites
Post by: kanonet on 2011-Feb-16
You found the .app folder? then store your sprite there.

now you just have to switch the PRINT and the DRAWSPRITE command:

Code (glbasic) Select
LOADSPRITE "Sprite.bmp", 0
DRAWSPRITE 0, 100, 100
PRINT "Hello World", 100, 100
SHOWSCREEN
MOUSEWAIT


To make the Text larger, you have to create an other font and use it. Check the tool fontcreator (is this the proper english name?) and the help for LOADFONT.

;)
Title: Re: sprites
Post by: I666NoB666I on 2011-Feb-16
allllllright,  i got it    thanks!!!!
Title: Re: sprites
Post by: matchy on 2011-Feb-17
To do scalable fonts you would need to make a large font file (preferably square) and poly-draw (stretch them down) or loadanim and stretchsprite the frames.