ridiculously fast ti-basic sprite routine

A forum where you can announce your awesome project(s).

Moderator: MaxCoderz Staff

Post Reply
User avatar
elfprince13
Sir Posts-A-Lot
Posts: 234
Joined: Sun 11 Dec, 2005 2:21 am
Contact:

ridiculously fast ti-basic sprite routine

Post by elfprince13 »

on my 84+SE I was getting 0.3 seconds of rendering time per 8*8 sprite.

Image

and for download:

http://rancidmoose.unitedti.org/members/so...lc/RTSPRITE.zip

..btw, those sprites are for an upcoming Turn Based Strategy game I am planning, similar to the classic "Strategic Conquest"


actually making the sprites is as follows:

First you try to see the lines (and individual pixels if you can find groups of 2) in the sprite, but without overlapping if possible.
Second you use a for loop to transform half the lines to the other half.

if you have one extra line or one extra pixel, stick that outside the loop.

if you have both, just put the line inside the loop, and make it so the start and endpoint are the same second time around.
User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

Post by kalan_vod »

Good work EP, but you aren't the first to do this (not saying you did). DA and Javaman also used this. Still is good though!
User avatar
L4E_WakaMol-King
Maxcoderz Staff
Posts: 342
Joined: Tue 01 Nov, 2005 6:34 am

Post by L4E_WakaMol-King »

Nice! I haven't been keeping track of many of the basic games, but this is a nice routine. Deff the fastest pure basic sprites I've ever seen.
Image - Now Under Development - [Progress]
User avatar
kv83
Maxcoderz Staff
Posts: 2735
Joined: Wed 15 Dec, 2004 7:26 pm
Location: The Hague, Netherlands
Contact:

Post by kv83 »

Still slower than with xLib, isn't it?
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 »

Very impressive elfprince13. There have been a few surprisingly fast basic sprite routines getting around recently. Basic continues to get better and better :).
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
User avatar
elfprince13
Sir Posts-A-Lot
Posts: 234
Joined: Sun 11 Dec, 2005 2:21 am
Contact:

Post by elfprince13 »

kv83 wrote:Still slower than with xLib, isn't it?
:roll: heathen.


@everyone else: thank you. Ive also got a routine that Ive been working on for doing simple, node-based, vector graphics in Basic.
User avatar
benryves
Maxcoderz Staff
Posts: 3089
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Post by benryves »

Now that I would like to see ;)
User avatar
elfprince13
Sir Posts-A-Lot
Posts: 234
Joined: Sun 11 Dec, 2005 2:21 am
Contact:

Post by elfprince13 »

I had two 5 node stickmen running around my screen at about .5 fps.
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 »

And they can be scaled and everything?
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
User avatar
elfprince13
Sir Posts-A-Lot
Posts: 234
Joined: Sun 11 Dec, 2005 2:21 am
Contact:

Post by elfprince13 »

yup. They are stored in a list as series of complex numbers representing the coordinates.

then I use Line() to connect the items in the list as wanted and then all you have to do is move the individual list elements and redraw.
User avatar
dysfunction
Calc Master
Posts: 1454
Joined: Wed 22 Dec, 2004 3:07 am
Location: Through the Aura

Post by dysfunction »

Good work! Awesome as it is, xLib isn't everything.
Image


"You're very clever, young man, but it's turtles all the way down!"
Post Reply