Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
particles, particles, particles!
#11
i'm sure physics play a big role in that stuff. unfortunately i never really learned anything good in physics last semester (all about light, sound, color,etc. etc.)

sometime i'm gonna play around and make a particle engine, then play with it. my favourite way to learn Big Grin
Jumping Jahoolipers!
Reply
#12
A lot of it is about the way of thinking and especially organizing.

You can "know" a lot of physics and math, or whatever else, but not know how to apply it to programs or to derive things from it.
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#13
Quote:You can "know" a lot of physics and math, or whatever else, but not know how to apply it to programs or to derive things from it.

In fact, I've found that I'm only now (grade 12) learning a lot of formulas for physical science concepts that I've understood and made use of for years, having derived them myself for games.

It's quite an advantage walking into a classroom already fully understanding a useful application of what school turns into a stupid abstract concept. Makes learning that much more interesting.
Reply
#14
Heres the top google definition for `particle`: (nontechnical usage) a tiny piece of anything.
And heres another google definition for `particles`: A particle defines a point in space. Particles are often animated and controlled by applying forces and other physics to them.

So basicly, were working with an array of things which we can define, and give physical properties to.

heres some fully tested code
Code:
'properties of our dust particle, x location, and a y location
'we could have added color, size, shape, speed, etc.
'anything, really
TYPE pDust
  x AS INTEGER
  y AS INTEGER
END TYPE

'here we create 10 dust particles (0 -> 9) with our pDust properties
DIM dust(9) AS pDust

'here we set the properties, ready to go
FOR i = 0 TO 9
  dust(i).x = RND * 320
  dust(i).y = RND * 200
NEXT

SCREEN 13

'main loop
DO
  'defined behaviour of our dust particle:
  'just move to the right,
  'and if were off the screen, move back on and have a new Y position
  FOR i = 0 TO 9
    dust(i).x = dust(i).x + 1
    IF dust(i).x >= 320 THEN
      dust(i).x = 0
      dust(i).y = RND * 200
    END IF
  NEXT

  'display particles with white dots, and erase old ones with a black dot.
  FOR i = 0 TO 9
    PSET (dust(i).x - 1, dust(i).y), 0
    PSET (dust(i).x, dust(i).y), 15
  NEXT

  'delay the program so it runs at a decent speed
  WAIT &H3DA, 8
  WAIT &H3DA, 8, 8
LOOP

To sum everything up, you have properties and behaviour. properties are what you define, and behaviour is how the properties interact. Maybe this will help. its a big enough rant heh.[/list]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)