The New xLIB - An APP

Moderator: tr1p1ea

Post Reply
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

The New xLIB - An APP

Post 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.
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
User avatar
DJ_O
Calc King
Posts: 2323
Joined: Mon 20 Dec, 2004 6:47 pm
Location: Quebec (Canada)
Contact:

Post 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?
ImageImageImageImage
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post 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.
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
User avatar
Jim e
Calc King
Posts: 2457
Joined: Sun 26 Dec, 2004 5:27 am
Location: SXIOPO = Infinite lives for both players
Contact:

Post 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.
Image
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post 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 :).
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
User avatar
Jim e
Calc King
Posts: 2457
Joined: Sun 26 Dec, 2004 5:27 am
Location: SXIOPO = Infinite lives for both players
Contact:

Post by Jim e »

It'd be faster, save memory, more than 96 tiles. But then again, who uses more than 96 tiles anyway.
Image
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post 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.
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
User avatar
DJ_O
Calc King
Posts: 2323
Joined: Mon 20 Dec, 2004 6:47 pm
Location: Quebec (Canada)
Contact:

Post 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
ImageImageImageImage
User avatar
Shadow Phoenix
Calc Guru
Posts: 835
Joined: Mon 03 Jan, 2005 7:54 pm
Location: out there. seriosly.

Post 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.
Life is getting better.
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Post by tr1p1ea »

500 ... 1000!?!?!?!!!!! Commercial games dont use that many!

Ok so they probably do, but still thats a lot of tiles :).
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
User avatar
Jim e
Calc King
Posts: 2457
Joined: Sun 26 Dec, 2004 5:27 am
Location: SXIOPO = Infinite lives for both players
Contact:

Post 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.
Image
DarkAuron
Maxcoderz Staff
Posts: 1349
Joined: Sat 18 Dec, 2004 6:53 pm

Post by DarkAuron »

Personally I think that's a bit of an exaggeration, but I can't see myself making more than 200 tiles..
[Gridwars Score] - E: 1860037 M: 716641 H: 261194
leofox
Calc Master
Posts: 1064
Joined: Fri 17 Dec, 2004 3:22 pm
Location: Probably playing DDR
Contact:

Post 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?
Image
Image
User avatar
kv83
Maxcoderz Staff
Posts: 2735
Joined: Wed 15 Dec, 2004 7:26 pm
Location: The Hague, Netherlands
Contact:

Post 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
Image
User avatar
Jim e
Calc King
Posts: 2457
Joined: Sun 26 Dec, 2004 5:27 am
Location: SXIOPO = Infinite lives for both players
Contact:

Post by Jim e »

Thats a good point there kv :lol: :lol:
Image
Post Reply