Author Topic: BatLib Demo Programs  (Read 54660 times)

0 Members and 1 Guest are viewing this topic.

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
BatLib Demo Programs
« on: January 30, 2011, 06:40:27 pm »
This topic is here to showcase projects using the BatLib library. Now that BatLib is stable, I have made a useful program: A spriteset/fontset editor.

  BatLib does not use pictures to store sprites like some other libraries. This makes sprite display faster and if you don't need a whole pictures worth of data, more memory friendly. Plus, you can use pretty much any data type you want to store sprite data.
  Because of this, I made the command GetSprite (35) so that the user could copy a sprite from the graph screen in the correct format to be used for other commands. I decided to take this one step further by making this program.

This program makes it easy for you to edit individual sprites in a sprite set or fontset. It includes simple routines to change pixel states as well as clearing, inverting, copying, and pasting sprites. The program also allows for some customization for the layout of the editor.

I hope this is useful!

Oh, P.S.- Str9 is the cursive fontset :D

Offline yunhua98

  • You won't this read sentence right.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2718
  • Rating: +214/-12
  • Go take a dive in the River Lethe.
    • View Profile
Re: BatLib Demo Programs
« Reply #1 on: January 30, 2011, 09:23:18 pm »
Nice!  but could you get rid of the Axes?  Anyway, it looks like Correlation's got competition!  ;)

Spoiler For =====My Projects=====:
Minor setback due to code messing up.  On hold for Contest.
<hr>
On hold for Contest.


Spoiler For ===Staff Memberships===:






Have you seen any good news-worthy programs/events?  If so, PM me with an article to be included in the next issue of CGPN!
The Game is only a demo, the code that allows one to win hasn't been done.
To paraphrase Oedipus, Hamlet, Lear, and all those guys, "I wish I had known this some time ago."
Signature Last Updated: 12/26/11
<hr>

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: BatLib Demo Programs
« Reply #2 on: January 30, 2011, 09:28:35 pm »
Ah, I don't do any ClrDraw or AxesOff because of the Copy/Paste function. I was using this program to copy back and forth between two sprite sets, so I needed to preserve the copied image.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: BatLib Demo Programs
« Reply #3 on: January 31, 2011, 03:02:51 pm »
Nice :D I should check the code at some point. :)

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: BatLib Demo Programs
« Reply #4 on: March 13, 2011, 11:40:13 am »
This is a little demo program I made to show off the progress of ReCode. It is a remake of an old BASIC program I made... 'cept faster :D

You will need at least BatLib v4.00.92.43 to run the program. As a note, the 92 is the number of commands in BatLib and the 43 is the number of commands in ReCode :D

EDIT: v2.01 now lets you press clear to exit.

Offline program4

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 158
  • Rating: +15/-0
    • View Profile
Re: BatLib Demo Programs
« Reply #5 on: March 13, 2011, 11:41:17 am »
That looks nice! :D And, it's so fast, too!

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: BatLib Demo Programs
« Reply #6 on: March 13, 2011, 11:43:35 am »
I have been adding stuff to it for the past 3 days in order to make programming in ReCode feasible :) The best part is that you can use it with TI-BASIC and you can use the BASIC real vars if you want. It even lets you run Assembly opcodes so you can essentially combine BASIC and Assembly using ReCode!

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: BatLib Demo Programs
« Reply #7 on: March 13, 2011, 11:46:37 am »
That's really fast! ;D  It looks wonderful. Great job! :D

Offline program4

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 158
  • Rating: +15/-0
    • View Profile
Re: BatLib Demo Programs
« Reply #8 on: March 13, 2011, 11:47:29 am »
Nice!  :D

I haven't really looked into it yet, but how about giving the power to manipulate groups, programs, and appvars?

I really hope this gets finished. It'll hopefully be just as popular as Axe!
« Last Edit: March 13, 2011, 11:47:49 am by program4 »

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: BatLib Demo Programs
« Reply #9 on: March 13, 2011, 11:50:28 am »
Thanks! I still have yet to add in Sprite commands, but what I was thinking was that Pt-On( could draw a sprite using some logic, Pt-Off( would draw the inverted sprite and Pt-Change( would exchange the data on the graph screen with the sprite data, so doing Pt-Change( again would result in no change. Also, this would mean that I need to add BASIC String support, too... which shouldn't be too much of a problem.

EDIT:
Yes, I have been planning to add in variable manipulation like that for programs, appvars, and groups... it would help out a lot!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: BatLib Demo Programs
« Reply #10 on: March 13, 2011, 02:49:18 pm »
I like the speed of this. By the way what is the link to the original version? It would be nice to compare. :D

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: BatLib Demo Programs
« Reply #11 on: March 13, 2011, 03:13:17 pm »
Okay, so I found two older versions on my computer, prgmBLOCKEAT is a copy of the original and prgmBLCKEAT2 is a more optimised version. Both make use of some small assembly opcodes (to turn off the run indicator and for "sleep mode"). Here is a screeny I made real quick as well as the downloads. As a note, prgmGA is used by the second version, not the original. I also noticed that the ReCode version is over 200 bytes smaller than the optimised older version!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: BatLib Demo Programs
« Reply #12 on: March 13, 2011, 03:15:54 pm »
Wow the difference is so big. O.O It's amazing to see ASM libs that can make some BASIC games look as fast as ASM ones now.

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: BatLib Demo Programs
« Reply #13 on: March 13, 2011, 03:18:02 pm »
I think that because ReCode draws without updating the screen really helps, but it would be even better if I added a command that could update a small portion of the screen. Then the speed increase would be even bigger!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: BatLib Demo Programs
« Reply #14 on: March 13, 2011, 03:21:28 pm »
Btw how do you exit Block Breaker? ??? I had to pull a battery because Enter, CLEAR, Graph, PRGM, MODE, DEL and even ON did nothing. ???