Page 1 of 41

The New xLIB - An APP

Posted: Sat 23 Apr, 2005 8:22 pm
by tr1p1ea
I thought i would just post some info about the new xLIB. I have decided to turn it into an APP so that i could change it so that it uses a parser hook to intercept real().

I only started it yesterday, so it only has a few functions ... but they have been imporved upon from the old version :).

ClearsScreen - Errr .... clears the screen
DrawSprite - Draws an 8x8 aligned sprite from ANY pic (pic0-pic9)
DrawMap - Draws a tilemap from ANY matrice (A-J) using ANY pic (pic0-pic9) as input for tiles. Maps can be drawn at ANY position on the screen and can be windowed from 1x1 to 12x8. Maps can also be offset for easy tile scrolling.
UpdateLCD - Updates the LCD. DrawSprite and DrawMap also have an option which lets you update the LCD or not.

And thats about it so far ... the additon of any pic and any matrice should please a few people.

I only just relaised that this now allows you to draw up to 10 individual tilemaps with scrolling at any position on the screen at the same time!!! A nifty side effect :).

Ill finish up some documentation and offer a release for testing purposes.

Posted: Sat 23 Apr, 2005 8:26 pm
by DJ_O
Basically we can now have 10 frames animated sprites... uh nevermind would take too much space, lol. Btw, will it be a bit faster than the old xLIB, I mean will it be possible to have 3 frames per second scrolling with 10 KB of free RAM?

Posted: Sat 23 Apr, 2005 8:29 pm
by tr1p1ea
Well you could store all your frames in 1 matrice ... draw it windowed and use an offset to animate it ...

I have no idea how fast it is as i can only test it on an emulator ...

I was thinking about adding largesprite support ... but im not sure since it is possible to draw large sprites as tilemaps. If i add it, you will be restricted to having your sprite dimensions a multiple of 8.

Posted: Sun 24 Apr, 2005 12:12 am
by Jim e
Have you thought about having tiles and sprite in programs insteand of pics, and have the app it self have a drawing utillity. I would think that be kind of nifty.

So how do you plan on filling 16k, a whole bunch of goodies I hope.

Posted: Sun 24 Apr, 2005 12:24 am
by tr1p1ea
As far as tiles in a program i dont really see much of an advantage aside from the fact that it frees up some pic numbers ...

And yes i plan on filling it with as much useful stuff as possible ... i am not one to waste space :).

Posted: Sun 24 Apr, 2005 12:54 am
by Jim e
It'd be faster, save memory, more than 96 tiles. But then again, who uses more than 96 tiles anyway.

Posted: Sun 24 Apr, 2005 1:21 am
by tr1p1ea
I dont really see how it would be faster and save memory? finding a pic and a prgm are exactly the same and the data is stored identically ... ?

But yeah it would allow more than 96 tiles.

Posted: Sun 24 Apr, 2005 1:47 am
by DJ_O
Jim e wrote:It'd be faster, save memory, more than 96 tiles. But then again, who uses more than 96 tiles anyway.
Dysfunction use over 1000 tiles in Aura and reuben quest uses over 500

Posted: Sun 24 Apr, 2005 1:52 am
by Shadow Phoenix
one of my friends who cant wait for TitanASM would be extremly interested in this. I will talk to him to see what he wnats.

Posted: Sun 24 Apr, 2005 2:00 am
by tr1p1ea
500 ... 1000!?!?!?!!!!! Commercial games dont use that many!

Ok so they probably do, but still thats a lot of tiles :).

Posted: Sun 24 Apr, 2005 4:02 am
by Jim e
Well if you only have two tiles it would waste 740 bytes, or you might need 97 tiles. And that reminds me pics dont use the last row, the data isn't there. So that could be a problem. But I just have a dislike for varibles you can't name, so you don't need to listen to me.


Oh but about it being faster, I was thinking of omnicalc.
You have to give the following for sprite(
Pic #
X pic
Y pic
X Screen
Y Screen
Height
width
Plus using real( you must define a number to do somethig(simp, sprite, play), Unless you want to replace alot more tokens.(bad Idea)
This is all waste. If pre-define or preload somethings then it could go alot faster. Really you would only need four vaules to use with sprite(.

Kevin wrote:Jim e wrote:
It'd be faster, save memory, more than 96 tiles. But then again, who uses more than 96 tiles anyway.
Dysfunction use over 1000 tiles in Aura and reuben quest uses over 500
YOU"VE GONE MAD!!!!! 500 :shock: ......1000 :shock: :shock: :shock:
Are there even that many possible tiles, *thinks* 2^(8*8) ...hmmm....that's alot.

Posted: Sun 24 Apr, 2005 5:01 am
by DarkAuron
Personally I think that's a bit of an exaggeration, but I can't see myself making more than 200 tiles..

Posted: Sun 24 Apr, 2005 6:33 am
by leofox
Kevin wrote:
Jim e wrote:It'd be faster, save memory, more than 96 tiles. But then again, who uses more than 96 tiles anyway.
Dysfunction use over 1000 tiles in Aura and reuben quest uses over 500
500...1000?
Why do you use that much tiles? How CAN you use that much tiles?

Posted: Sun 24 Apr, 2005 1:58 pm
by kv83
leofox wrote:
Kevin wrote:
Jim e wrote:It'd be faster, save memory, more than 96 tiles. But then again, who uses more than 96 tiles anyway.
Dysfunction use over 1000 tiles in Aura and reuben quest uses over 500
500...1000?
Why do you use that much tiles? How CAN you use that much tiles?
With such a amount it would be wiser to just pre-draw every screen :P

Posted: Sun 24 Apr, 2005 2:01 pm
by Jim e
Thats a good point there kv :lol: :lol: