User Tag List

Results 1 to 10 of 19

Thread: Snow!

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    The Time-Loop Continues ZC Developer
    Gleeok's Avatar
    Join Date
    Apr 2007
    Posts
    4,826
    Mentioned
    259 Post(s)
    Tagged
    10 Thread(s)
    vBActivity - Stats
    Points
    12,961
    Level
    33
    vBActivity - Bars
    Lv. Percent
    26.48%

    Re: Snow!

    Cool. Hands down, the best snow particle ZScript in existence. Don't question it's usefulness or compare it to layers people, just try it.


    Quote Originally Posted by pkmnfrk View Post
    It looks much better with the radius 1 circle.

    And, incidentally, a circle with a radius of 1 actually has a width of 2 (since, radius is the distance from the centre to the edge )
    Due note that circles seem to be pretty damn slow in allegro. I'd bet drawing those five pixels using putpixel would be a whole lot faster, but then you wouldn't have the option of drawing different sized circles.

    Quote Originally Posted by pkmnfrk View Post
    Finally, perhaps you could make a full particle system, but I doubt it. As it currently stands, there's no room to store any other information about a particle other than its position.
    You might like to know that Grikarugun has had a dynamic particle system in it for a little while now. :) (I've just been busy guys, sorry)

    Quote Originally Posted by pkmnfrk View Post
    Plus, a more complicated system would be rather slow for anything more than a handful of particles.
    Actually I'm reasonably sure it's faster.
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

  2. #2
    Lynel
    ZC Developer
    pkmnfrk's Avatar
    Join Date
    Jan 2004
    Location
    Toronto
    Age
    37
    Posts
    1,248
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    3,145
    Level
    18
    vBActivity - Bars
    Lv. Percent
    11.2%

    Re: Snow!

    Quote Originally Posted by Gleeok View Post
    Due note that circles seem to be pretty damn slow in allegro. I'd bet drawing those five pixels using putpixel would be a whole lot faster, but then you wouldn't have the option of drawing different sized circles.
    Are you sure about that? I would think that the overhead of calling Screen->PutPixel() 5 times would offset any gain from not drawing a miniature circle.

    Remind me to profile this at some point.


    Quote Originally Posted by Gleeok View Post
    You might like to know that Grikarugun has had a dynamic particle system in it for a little while now. :) (I've just been busy guys, sorry)
    I'll have to check it out. Are the scripts available?

    Quote Originally Posted by Gleeok View Post
    Actually I'm reasonably sure it's faster.
    Perhaps, perhaps not. But, I would bet a million rupees that a general purpose particle system would be slower compared to one tailor made for, say, snow.

    Edit, RE PutPixel vs Circle:

    I just did some testing. Although I got slow down for flake quantities > 500 (or so), I discovered something else in favour of using Circle. Although I have absolutely no idea how the primitive drawing system works in ZC, I can make a guess based on this experiment.

    Essentially, I built in a way to switch between 5 PutPixels and 1 Circle. At 500 flakes (thats 500 circles vs 2500 PutPixels), half the PutPixel flakes didn't show up! I would switch between the two, and watch half the snow flakes blink in and out of existence. I am of the opinion that I used up all the Primitive drawing command buffer (or something to that effect).

    So. I'm sticking with Screen->Circle for now.
    Tale of the Cave - a web comic - Updates Monday, Wednesday, Friday
    ZC Tutorials - Tutorials and Script Library - Updated July 30, 2008
    ZeldaGuard - Corruption in my save files? It's more likely than you think!
    I do script requests!

  3. #3
    The Time-Loop Continues ZC Developer
    Gleeok's Avatar
    Join Date
    Apr 2007
    Posts
    4,826
    Mentioned
    259 Post(s)
    Tagged
    10 Thread(s)
    vBActivity - Stats
    Points
    12,961
    Level
    33
    vBActivity - Bars
    Lv. Percent
    26.48%

    Re: Snow!

    Quote Originally Posted by pkmnfrk View Post
    Edit, RE PutPixel vs Circle:

    I just did some testing. Although I got slow down for flake quantities > 500 (or so), I discovered something else in favour of using Circle. Although I have absolutely no idea how the primitive drawing system works in ZC, I can make a guess based on this experiment.

    Essentially, I built in a way to switch between 5 PutPixels and 1 Circle. At 500 flakes (thats 500 circles vs 2500 PutPixels), half the PutPixel flakes didn't show up! I would switch between the two, and watch half the snow flakes blink in and out of existence. I am of the opinion that I used up all the Primitive drawing command buffer (or something to that effect).

    So. I'm sticking with Screen->Circle for now.
    Hmm, that's an interesting one....


    Wow, there's a bug or something in there. I couldn't even profile putpixel because of it. This is what I used:

    Code:
    const int LOOPS = 1;
    
    global script slot2 
    {
    	void run() 
    	{
    		while(true) 
    		{
    			for(int i = 0; i < LOOPS ; i++)
    				for(int x = 0; x < 256; x++)
    					for(int y = 0; y < 176; y++)
    						Screen->PutPixel(6, x , y, 2, 0, 0, 0, 64);
    			Waitframe();
    		}
    	}
    }

    It completely crippled the engine. I wonder why?
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social