Author Topic: [2012 Apocalypse Contest] Battle 4000  (Read 38622 times)

0 Members and 4 Guests are viewing this topic.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: [2012 Apocalypse Contest] Battle 4000
« Reply #15 on: November 25, 2012, 11:18:10 am »
That was the same issue I had XD I thought it was working until I realised my string was still 64 long as well XD

Also, I edited my post above if you are interested in using a list or number for your sprite. It would also be pretty easy to create a tool to give you value for the sprite, too. An example list or number is:
{2172731964,1010991489
or
2172731964+i1010991489

This means you could store a bunch of 8x8 sprites to a complex list and each element is its own sprite.

Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: [2012 Apocalypse Contest] Battle 4000
« Reply #16 on: November 25, 2012, 12:11:47 pm »
EDIT2: Just for a bonus, though the sprites are kind of a bother to make for this method, this will let you draw 8x8 sprites using two elements in a list:
Code: [Select]
For(A,1,2
L1(A
For(B,4A-4,4A-1
For(C,0,7
Ans/2
if fPart(Ans
pxl-On(Y+B,C+X
iPart(Ans
End
End
End
Or if D is a complex number, with the real part being the upper 4 rows and and the imaginary part being the lower four rows:
Code: [Select]
For(A,0,1
real(Di^A
For(B,4A,4A+3
For(C,0,7
Ans/2
if fPart(Ans
pxl-On(Y+B,C+X
iPart(Ans
End
End
End


What do you mean with if D is a complex number? what is the D var representing?
And i guess with complex numbers, it's meant to represent the A,B,C,D,E and F ?
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: [2012 Apocalypse Contest] Battle 4000
« Reply #17 on: November 25, 2012, 12:42:57 pm »
Complex numbers are of the form a+bi, where i is located at [2nd][.]. If you aren't familiar with complex numbers, here is a quick rundown:

i^2=-1
So if you do (3+2i)(2+i)=6+3i+4i+2i*i=6+7i+2(i^2)=6+7i-2=4+7i. On the calculators, complex numbers can be used and they use 9 more bytes than a real number. Likewise, complex lists use about twice the memory as a real list. However, the advantage is that you can store multiple pieces of data in one var. real(4+7i) will return 4 and imag(4+7i) will return 7.

Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: [2012 Apocalypse Contest] Battle 4000
« Reply #18 on: November 25, 2012, 01:19:59 pm »
I know what complex numbers are ;) i'm in a very hard mathematical study :p
But with the lists, how do you have the hex sprites set up? cause an A or 10 doesn't fit in properly...
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: [2012 Apocalypse Contest] Battle 4000
« Reply #19 on: November 25, 2012, 01:22:42 pm »
Well, it isn't hex. Basically, the code is converting the decimal number to binary, but it is being copied to the graph screen where 1 is pixel on and 0 is pixel off.

Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: [2012 Apocalypse Contest] Battle 4000
« Reply #20 on: November 25, 2012, 01:25:21 pm »
I know that but then the maximum is 9, so the only combinations are:
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: [2012 Apocalypse Contest] Battle 4000
« Reply #21 on: November 25, 2012, 01:27:28 pm »
Oh, I am not going digit by digit, I am using the whole number. For example:
2172731964=10000001100000010100001000111100

Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: [2012 Apocalypse Contest] Battle 4000
« Reply #22 on: November 25, 2012, 01:28:22 pm »
ooooh ok now i get it

so 10000001100000010100001000111100
is splitted to
1000
0001
1000
0001
0100
0010
0011
1100
« Last Edit: November 25, 2012, 01:31:03 pm by stevon8ter »
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: [2012 Apocalypse Contest] Battle 4000
« Reply #23 on: November 25, 2012, 01:44:13 pm »
Yes, except it is done in 8 digit chunks. Also, the routine I gave copies the binary backwards, just as a heads up.

Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: [2012 Apocalypse Contest] Battle 4000
« Reply #24 on: November 25, 2012, 02:08:18 pm »
Ok thx ;) and that's smaller/faster...?
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: [2012 Apocalypse Contest] Battle 4000
« Reply #25 on: November 25, 2012, 05:34:11 pm »
The code is smaller and a little faster, plus it has the advantage that you can store all of your sprites in a list (or as some other kind of number).

Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: [2012 Apocalypse Contest] Battle 4000
« Reply #26 on: November 25, 2012, 05:37:19 pm »
Lol
But it's not good for tilemapping xD
Tilemap tiles are best when they are like: line(...) ?
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: [2012 Apocalypse Contest] Battle 4000
« Reply #27 on: November 25, 2012, 05:39:37 pm »
Yes, that is probably the best way to do those.

Offline stevon8ter

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 663
  • Rating: +10/-0
    • View Profile
Re: [2012 Apocalypse Contest] Battle 4000
« Reply #28 on: November 25, 2012, 05:43:50 pm »
Ok :p
So sprites are the best just when having 1 or 2 sprites on the screen and you don't want to hardcode them, and have them all in a routine. Ok i get it
None of my posts are meant offending... I you feel hurt by one of my posts, tell me ... So i can appoligise me and/or explain why i posted it


Hi there, I'm the allmighty (read as: stupid, weak...) STEVON8TER

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: [2012 Apocalypse Contest] Battle 4000
« Reply #29 on: November 25, 2012, 05:47:14 pm »
Now for an update :D I made a few editors to help me speed up map making and I made a few other miscellaneous adjustments :) Now you get to see all the shtuff in action >.>