Page 1 of 3

xLIB Examples

Posted: Wed 06 Jul, 2005 7:21 pm
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

Posted: Wed 06 Jul, 2005 11:49 pm
by dysfunction
Oh, I'll give it a try. :twisted:

Posted: Thu 07 Jul, 2005 8:08 am
by tr1p1ea
Well there are a LOT of optimisations to be made, you will see :).

Posted: Thu 07 Jul, 2005 8:19 am
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?

Posted: Thu 07 Jul, 2005 1:37 pm
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

Posted: Thu 07 Jul, 2005 2:08 pm
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?

Posted: Thu 07 Jul, 2005 3:20 pm
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] :)

Posted: Thu 07 Jul, 2005 8:50 pm
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:

Posted: Thu 07 Jul, 2005 11:13 pm
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

Posted: Thu 07 Jul, 2005 11:29 pm
by merthsoft
Is there a prize?

Posted: Thu 07 Jul, 2005 11:36 pm
by Jim e
Perhaps tr1p's algorithm for a beer cooler. I hear it only takes 20 secs to cool a beer. :worship:

Posted: Fri 08 Jul, 2005 2:03 am
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

Posted: Fri 08 Jul, 2005 11:36 am
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 :).

Posted: Sat 09 Jul, 2005 4:05 am
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)

Posted: Sat 09 Jul, 2005 8:59 am
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.