Author Topic: BatLib Demo Programs  (Read 53678 times)

0 Members and 4 Guests are viewing this topic.

Offline Hot_Dog

  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: BatLib Demo Programs
« Reply #45 on: April 07, 2011, 01:02:42 pm »
Hehe, Scout, watch this:


Now THAT is awesome

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: BatLib Demo Programs
« Reply #46 on: April 07, 2011, 01:03:48 pm »
Hehe, Scout, watch this:


Cool, but I prefer mine, I even optimized its code:

Code: [Select]
dim(40
Fill(0
While getKey!=15
Fill(9,A
DispGraph
Fill(9,A
A*2->A
If A>=256
1->A
Pause A
End
Stop

Good enough, I have an idea though, what if != really works, like the different sign, so that if people try to copy my code and for any other circumstances. What do you think?

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 #47 on: April 07, 2011, 01:05:10 pm »
Hehe, all it does is draw inverted vertical lines, updates the screen and then reinverts so that the screen is back to normal, but it doesn't look like it :D That is why I don't make commands that automatically update the screen :) It makes graphics faster and nicer looking :)

EDIT:
Um, since it uses 2 bytes, I would rather not, Scout. Also, Pause A will cause it to cycle between fast and slow, but I guess that is an effect XD I forgot to add Pause 5 in mine. So where is the optimisation? (assuming I had added Pause 5)

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 #48 on: April 08, 2011, 06:33:01 pm »
Okay, here is another demo program Sprite Editor. This one is made *mostly* in Recode and is different from the previous font editor/Sprite editor. Also, I put this in 6MHz mode and I added a Pause 5 to make a delay between key presses XD

Pretty much what it does is let you make 8x8 sprites and then it outputs a hex code for the sprite that can be used with BatLib, Celtic 3, Axe, and a few other programs. The code is output in Ans for easy use :) Have fun!


EDIT: Just remembered I never uploaded the screeny :/

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 #49 on: April 09, 2011, 09:40:31 pm »
Okay, I have another mini game made. This is one I made a long time ago in BASIC, but I lost the code. Now I've remade it with BatLib and it is one of my favorite mini games :) Anyway, the idea is to match the image on the left to the image on the right. Thank of it like a pixel editor where your only option is Pxl-Change and it changes the surrounding pixels, too (and imagine that your pixels are 6x6, too, but that's beside the point XD) Anywho, here is the program and screeny:

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 #50 on: April 09, 2011, 09:56:42 pm »
I call dibs on making that a game in my HGP. ^-^  (If you don't mind.)

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 #51 on: April 09, 2011, 09:58:19 pm »
What is an HGP?

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 #52 on: April 09, 2011, 09:59:20 pm »
My Homescreen Game Pack. :D  (points to sig)

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 #53 on: April 09, 2011, 10:03:47 pm »
Ah, yeah, no problem :) Also, have you seen my MOVE! demo? That is another mini game that I made in BASIC originally (it was played on the homescreen, too :P )
http://ourl.ca/9009/186105

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 #54 on: April 10, 2011, 09:09:53 pm »
Hehe, so ztrumpet managed to convince me to port Balltrix over to ReCode and though it isn't an exact port, I like it! I have two screenies, the first one made at 1% speed on the emulator (so that I could keep up) and the second one at 50% speed ;D As a note, this runs at 6MHz because if it ran at 15MHz... you'd be crazy trying to get to 45 points or more!

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: BatLib Demo Programs
« Reply #55 on: April 11, 2011, 05:01:33 am »
Zeda: That's awesome! I'm looking at the source now, very good job!

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 #56 on: April 11, 2011, 08:12:57 am »
Thanks, Scout ^-^ Feel free to ask questions about it and hopefully it gives you some ideas!

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: BatLib Demo Programs
« Reply #57 on: April 11, 2011, 09:54:03 am »
Thanks, Scout ^-^ Feel free to ask questions about it and hopefully it gives you some ideas!

I suck at Basic, as you can see, I could never do half of this.

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 #58 on: April 11, 2011, 08:50:26 pm »
Ah, well it is all ReCode, so there might be some optimisation tricks to find in there. Still, you seem to have a solid grasp of ReCode which is nice to know :) I'm glad ReCode isn't too crazy to use ;D

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: BatLib Demo Programs
« Reply #59 on: April 12, 2011, 04:04:48 am »
I had an idea to change in Blockeat, however, unfortunately, I don't really get the code:

Code: [Select]
0
dim(40
Pause While getKey=9
Fill(0
Text(2,1,SELECT A DIFFICULTY:
Line(1,84,0,9,3
Text(10,0,EASY
Text(16,0,NORMAL
Text(22,0,HARD
0->A->B
While A!=8
Line(0,96,10+B*6,6,2
DispGraph
Line(0,96,10+B*6,6,2
Pause 5
getKey-1->A
A>=9
DS<(2
B
If A=0
+1
If A=3
-1
->B
B/3
Ans->B
End
1200-300*B->H
Fill(0
Text(0,0,LOADING...
DispGraph
Fill(0
95->A
While A
60->B
Line(A-4,3,B-4,3,1
B-5->B
DS<(2
A-5->A
End
6->A
While A
rand*rand
/17
5*1+Ans->C
rand*rand
/9
5*Ans->D
Line(C,5,D,15,1
A-1->A
End
6->A
While A
rand*rand
/15
5*1+Ans->C
rand*rand
/12
5*Ans->D
Line(C,15,D,5,1
A-1->A
End
0->D->G
3->C
While *D!=150
Line(A,5,B,5,0
Line(A+1,3,B,1,1
Line(A,5,B+1,1,1
Line(A+1,3,B+3,1,1
Pxl-On(B+2,A+4*C=2
If C=1
Pxl-On(B+2,A+4
If C=4
Line(A+1,4,B+2,1,1
Pxl-On(B+4,A
Pxl-On(B+4,A+4
DispGraph
Line(A,5,B,5,0
getKey-1->I
If I<4
I+1->C
A
If C=3
+5
If C=2
-5
->E
B
If C=1
+5
If C=4
-5
->F
If E=95
90->E
If E>=96
0->E
If F=60
55->F
If F>=65
0->F
If pxl-Test(F,E+2
A->E B->F
E!=A
If +F!=B
D+pxl-Test(F+2,E+2->D
E->A
F->B
G+1->G
I!=14
*G!=H
End
G->!Ans
D->!A
H->!B
Text(2,1,TIME UP!
Line(1,36,0,9,3
DispGraph
Pause While getKey!=9
Stop
ClrHome
Disp sub("LOSE!WIN! ",5(150=B)+1,5),"STEPS:",Ans,"BLOCKS:",A
Pause

Where is the main game loop? That's where I want to change stuff :S Thanks.