Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Simulate the matrix

matrix

  • Please log in to reply
5 replies to this topic

#1 Mozana

Mozana

    CC Resident

  • Advanced Member
  • PipPipPipPip
  • 70 posts
  • Programming Language:Java, C#, PHP, JavaScript, PL/SQL
  • Learning:Objective-C

Posted 27 April 2011 - 02:42 AM

Here something I think to be intresting, I want to use multithreading to simulte the matirx screensaver on a jpanel is that possible, like to have characters drop from top to bottom in slow motion as in the matrix movies, any tips will be much appreciated.:)
  • 0

#2 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 27 April 2011 - 02:18 PM

Why do you want it to be multi-threaded? This should be easy enough to implement as a list of "falling characters" that leave a trail of "fading characters" behind. You can then loop through the falling and fading lists as needed.
  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/


#3 Mozana

Mozana

    CC Resident

  • Advanced Member
  • PipPipPipPip
  • 70 posts
  • Programming Language:Java, C#, PHP, JavaScript, PL/SQL
  • Learning:Objective-C

Posted 03 May 2011 - 12:20 AM

This should be easy enough to implement as a list of "falling characters" that leave a trail of "fading characters" behind.


Im actually wondering how do I make the characters fall, I thought I would need multiple threads for the multiple columns. I would also upload a pic just I dont seem to figure out how that is done.
  • 0

#4 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 03 May 2011 - 04:24 AM

A falling character is just a character that changes it's position by moving one slot down on the screen periodically. Think of your screen as a grid. A falling character just moves down on the grid, and a fading character never moves.
  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/


#5 Mozana

Mozana

    CC Resident

  • Advanced Member
  • PipPipPipPip
  • 70 posts
  • Programming Language:Java, C#, PHP, JavaScript, PL/SQL
  • Learning:Objective-C

Posted 05 May 2011 - 01:42 AM

A falling character is just a character that changes it's position by moving one slot down on the screen periodically. Think of your screen as a grid. A falling character just moves down on the grid, and a fading character never moves.


I dont understand that, a fading character never moves. I dont get it.
Any way I have decided to add a number fof JLabels and place the characters within the JLabel but I dont know how to make them move.
  • 0

#6 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 05 May 2011 - 08:53 AM

A fading character stays in one place, slowly getting darker. The falling character leaves a trail of fading characters behind it.
  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/






Also tagged with one or more of these keywords: matrix

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download