xLIB Examples

Moderator: tr1p1ea

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:

xLIB Examples

Post by tr1p1ea »

I thought that it might be a good idea to have a thread devoted to xLIB examples. If anyone has any small demos using the xLIB APP please post them here :).

Here is the simple demo which is now included in the ticalc.org release:

http://www.ticalc.org/archives/files/fi ... 35907.html

*note that you might have to wait a few days for ticalc.org to update the file.

There is a small challenge out for people to try and optimise the example for speed ... lets see if we can get it running fast :twisted:.

temp link: http://s4.yousendit.com/d.aspx?id=01593 ... EUCKE42HHA
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
User avatar
dysfunction
Calc Master
Posts: 1454
Joined: Wed 22 Dec, 2004 3:07 am
Location: Through the Aura

Post by dysfunction »

Oh, I'll give it a try. :twisted:
Image


"You're very clever, young man, but it's turtles all the way down!"
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 there are a LOT of optimisations to be made, you will see :).
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
Kozak
Maxcoderz Staff
Posts: 791
Joined: Fri 17 Dec, 2004 5:33 pm
Location: On the dark side of the moon.
Contact:

Post by Kozak »

Hmm xLib seems powerfull. Good work tr1p :).

One thing I notice: in the demo the character 'flickers' when you walk. Can this be improved?
"They say that sea was created by a man named Maarten Zwartbol, a long time ago...." - Duck, an old Corbin version
necro
Calc King
Posts: 1619
Joined: Sat 26 Mar, 2005 2:45 am
Location: your shadow

Post by necro »

-you oughta add the flash gordan like capabilities, as flash gordan sucks
-you oughta add line, rect, polygon, circle, arc, ect, supput (with out over write)
-have a function to draw a sprite over the entire screen (good for inviromental stuff, like animated rain)
-have the direct imput enabled with support for multiple keys
-more than ten pics, and have xlib be able to generate those +9 pics
-if you get the time, a 16X16 tile mapper
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 »

1) This is not a request thread, this is the example thread.
2) You sure thats ALL you want? Anything else? You want it to wash your dishes too?
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
basjuh
New Member
Posts: 6
Joined: Tue 05 Jul, 2005 8:49 am

Post by basjuh »

tr1p1ea wrote:2) You sure thats ALL you want? Anything else? You want it to wash your dishes too?
[oftopic]If it can cool beer, could you add that functioality too then??[/oftopic] :)
leofox
Calc Master
Posts: 1064
Joined: Fri 17 Dec, 2004 3:22 pm
Location: Probably playing DDR
Contact:

Post by leofox »

basjuh wrote:
tr1p1ea wrote:2) You sure thats ALL you want? Anything else? You want it to wash your dishes too?
[oftopic]If it can cool beer, could you add that functioality too then??[/oftopic] :)
If you could do that triplea, it would be the best library ever! :twisted:
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 »

your demo is way too hard to optimise tr1p, I am better at writing code so I think I'll just rewrite the whole ADEMO.8XP program from scratch :P
ImageImageImageImage
merthsoft
Extreme Poster
Posts: 496
Joined: Tue 21 Dec, 2004 6:49 am
Location: WI

Post by merthsoft »

Is there a prize?
Shaun
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 »

Perhaps tr1p's algorithm for a beer cooler. I hear it only takes 20 secs to cool a beer. :worship:
Image
necro
Calc King
Posts: 1619
Joined: Sat 26 Mar, 2005 2:45 am
Location: your shadow

Post by necro »

I agree with kevin, there was so much extraneous code that it took me a good while to figure out how your scrolling method worked
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 there isnt much to rewrite ... you initialise some vars, draw the map, draw the player then check for keys. If a key is pressed you check the move against a tile, if you can move you do, if you cant you cant.

Of course the implementation is crappy ... but i thought it was straight-forward :).
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
necro
Calc King
Posts: 1619
Joined: Sat 26 Mar, 2005 2:45 am
Location: your shadow

Post by necro »

but you should have just drawn the character with a X*8 and a Y*8 and not used any lbls ( and combined the L/R and U/D key presses as opposed to using lbls at all)
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 »

Those are the exact optimisations i was talking about.

However such a program would not be fit for an example ... especially for someone who isnt a well developed BASIC programmer.
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
Post Reply