Author Topic: Matrix Help  (Read 8774 times)

0 Members and 2 Guests are viewing this topic.

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Matrix Help
« Reply #15 on: January 30, 2010, 09:00:13 pm »
Oh, i see.  Well then you might need to be a bit tricky.  Instead of using the tilemaper, you could do this.  When you first load up the screen, you use the tilemapper normally to fill the screen region.  Then when you shift the matrix using my matrix shifter, you use the xLib screen shift routine, and then use the tilemapper to add onto the end of the shifted screen tilemap.

Would that work?  As you can see I'm trying very hard to make this work without actually shifting the tiles :P

EDIT: Oh and zTrumpet,  it would be much faster, but i was coding for readability :)
« Last Edit: January 30, 2010, 09:06:22 pm by Builderboy »

Offline cooliojazz

  • Support Staff
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 619
  • Rating: +66/-9
  • I omnoms on your soul
    • View Profile
    • Unreal Phantasies
Re: Matrix Help
« Reply #16 on: January 30, 2010, 09:47:45 pm »
Thats one of the possibilities I was considering, but I have a border around the outside and I kind've like it, so I was seeing if there was any fast way of just shifting the matrix, instead of having to redraw the border as well :P Plus, that would mean i would completely have to redo my collision and shifting part...
Spoiler For Random signess:
You can not beat my skills.
Trust me.
So don't even try.
And remember never to trust someone who says, "Trust me."

TI File Editor Progress: Remade in java like a boss. 50% we'll call it? IDK =P
Java Libraries: JIRC - 90% JTIF - 5%
TI Projects: Unreal Notator - -5000%
Nomcraft, a Bukkit mod
Some of the music I write can be found here | The Rest Should Be Here (Bandcamp)

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Matrix Help
« Reply #17 on: January 30, 2010, 10:06:03 pm »
Hmmm, well then i don't know :/ I guess you could always store the border into a pic and recall it...  

Well you might want to try rowswapping to get better speed, i think it would be faster than storing to lists each time, but i will have to run some tests...

Alright, instead of

Code: [Select]
[A]T->[A]
Matr->Lst([A],L1,L2,L3)
Lst->Matr(L2,L3,L1,[A])
[A]T->[A]

I think

Code: [Select]
[A]
For(F,1,2
rowSwap(Ans,F,F+1
End
Ans->[A]

Is a lot faster, and even faster the greater your matrix is.  Is 3x3 going to be the final size of your matrix?
« Last Edit: January 30, 2010, 10:20:01 pm by Builderboy »

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: Matrix Help
« Reply #18 on: January 30, 2010, 10:41:33 pm »
Wow, an Xlib game that shifts like this!  That sounds really cool!

Builderboy, that's neat code too. :)

Offline cooliojazz

  • Support Staff
  • LV7 Elite (Next: 700)
  • *******
  • Posts: 619
  • Rating: +66/-9
  • I omnoms on your soul
    • View Profile
    • Unreal Phantasies
Re: Matrix Help
« Reply #19 on: January 30, 2010, 11:15:48 pm »
No, it'll be 6x10, and thanks for that, I think i'tll help :D
Spoiler For Random signess:
You can not beat my skills.
Trust me.
So don't even try.
And remember never to trust someone who says, "Trust me."

TI File Editor Progress: Remade in java like a boss. 50% we'll call it? IDK =P
Java Libraries: JIRC - 90% JTIF - 5%
TI Projects: Unreal Notator - -5000%
Nomcraft, a Bukkit mod
Some of the music I write can be found here | The Rest Should Be Here (Bandcamp)

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Matrix Help
« Reply #20 on: May 15, 2010, 10:02:34 pm »
using builderboy's method but transposing the matrix to deal with columns:
Code: [Select]
[A]T
For(F,1,2
rowSwap(Ans,F,F+1
End
AnsT->[A]
a capital T is denoting the transpose function since superscript doesn't work in a code block.

EDIT:
unrelated, needing 20 posts to talk in IRC is undesirable. Especially being a new member. Especially when someone says new members are "kicking in". So this is how i respond....
« Last Edit: May 15, 2010, 10:06:15 pm by nemo »


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: Matrix Help
« Reply #21 on: May 15, 2010, 10:08:15 pm »
Oh hi and welcome ^^

Btw, to use the upper T symbol, you can do this:

Code: [Select]
[A][sup]T[/sup]
It will display [A]T

Also the reason why we require 20 posts to use OmnomIRC is for spambot protection (and other spam attacks, like two weeks ago). You can access the channel even as guest or under 20 post from the Java client linked on top of the chat box, or by using an IRC client such as mIRC/X-Chat/Chatzilla, connecting on irc.efnet.org and joining #omnimaga
« Last Edit: May 15, 2010, 10:10:38 pm by DJ Omnimaga »

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Matrix Help
« Reply #22 on: May 15, 2010, 10:19:09 pm »
ahh sorry, that makes more sense now lol.

as you can see by your post, superscript is not implementable in a code block.

I read the board/IRC rules. seems pretty straightforward except the double posting thing can get kind of icky. editing is so much simpler.


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: Matrix Help
« Reply #23 on: May 15, 2010, 10:25:05 pm »
Oh right I understand now. I guess it's because I am so used to use [ quote ] instead of [ code ] (thanks to SourceCoder2) since code messes up characters sometimes. All I be careful about is making sure to disable smileys before posting the code.

Btw, what I meant by "new members kicking in" is that the end-of-school-year rush started. Kicking in would mean they are arriving. It's typical for Omnimaga to get a considerable amount of new members from mid-May to the end of June.
« Last Edit: May 15, 2010, 10:25:31 pm by DJ Omnimaga »

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Matrix Help
« Reply #24 on: May 15, 2010, 10:35:39 pm »
What does putting the T there do exactly?

Also ya, [code][/code] doesn't support BBCode but you can also do something like ^T and then say that is the little superscript T instead of the variable T.
Another quick, useful, BBCode command that is useful when talking about such things is the use of [nobbc][/nobbc] because anything in between them will not be made into the graphic equivalent when it is submitted. Just thought it'd be handy so people don't have to do [ quote ] and such :) (Sorry, I just enjoy using BBCode for some reason :P)
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

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: Matrix Help
« Reply #25 on: May 15, 2010, 10:51:19 pm »
lol I didn't even know  [nobbc] existed

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Matrix Help
« Reply #26 on: May 15, 2010, 11:08:44 pm »
Haha ya, neither did I until I looked up the BBCode commands that SMF supported (there is a list on their site).
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

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: Matrix Help
« Reply #27 on: May 16, 2010, 06:23:43 pm »
What does putting the T there do exactly?
T makes the Matrix flip along it's axis of (X,X).  Ex:
[[1, 2][3, 4] T is [[1, 3][2, 4]]
[[1, 2, 3][4, 5, 6]] T is [[1, 4][2, 5][3, 6]]
It's best used for manipulation matrices to use the row commands or Matrix_to_list if desired. :)