1. Post #281
    Wyzard's Avatar
    June 2008
    1,243 Posts
    the circle is a complete white circle
    Don't use a hard-edged white circle, use a blurred one.
    Reply With Quote Edit / Delete United States Show Events Agree Agree x 2 (list)

  2. Post #282
    Gold Member
    s0ul0r's Avatar
    September 2006
    993 Posts
    Guys, isn't that what I just said in the first place?....
    Reply With Quote Edit / Delete Germany Show Events Agree Agree x 7 (list)

  3. Post #283
    Gold Member
    HubmaN's Avatar
    July 2007
    6,267 Posts
    I was first but I snipped it because I thought it was temporary :(
    Reply With Quote Edit / Delete Thailand Show Events Zing Zing x 1 (list)

  4. Post #284
    Gold Member
    Robert64's Avatar
    November 2007
    1,326 Posts
    Looks cool, but I'm a little concerned about the similarities between the table syntax and the function syntax.

    Also how are you going to declare parameters? (might I suggest syntax involving '->', I'm quite fond of that)
    You can shorthand a function declaration with no parameters as just f={...};, otherwise it's f(p1,p2,...)={...};. And you can have multiple functions with the same identifier but different parameter counts:


    I'll save the -> for something better
    Reply With Quote Edit / Delete United Kingdom Show Events Programming King Programming King x 1 (list)

  5. Post #285
    Gold Member
    HubmaN's Avatar
    July 2007
    6,267 Posts
    Going through netcraft for PHP+x86 servers to have fun with the new Magic Number.
    Reply With Quote Edit / Delete Thailand Show Events Funny Funny x 3Winner Winner x 1 (list)

  6. Post #286
    Richy19's Avatar
    May 2010
    5,375 Posts
    Don't use a hard-edged white circle, use a blurred one.
    If i use a graded circle (from transparent to white) instead of a full white circle i get this
    Reply With Quote Edit / Delete United Kingdom Show Events Artistic Artistic x 1Dumb Dumb x 1 (list)

  7. Post #287
    Gold Member
    Robert64's Avatar
    November 2007
    1,326 Posts
    Does it go from (in RGBA) 0x00000000 to 0xFFFFFFFF or 0xFFFFFF00 to 0xFFFFFFFF?
    The former will be semi-transparent grey in the middle.
    Reply With Quote Edit / Delete United Kingdom Show Events

  8. Post #288
    Gold Member
    s0ul0r's Avatar
    September 2006
    993 Posts
    http://stackoverflow.com/questions/2...re-transparent

    the answer describes how to mask a texture using the alpha channel.
    You just have to draw a black and white image in there (Or gradients as in your case)

    - Draw scene
    - Set render target
    - Draw the whole screen black
    - Draw your mask into the alpha channel (With all your gradient circles just being black and white)
    - Reset the render target to null
    - Resolve the texture of the rendertarget and draw it with like 0.5 opacity
    - Draw the hud
    Reply With Quote Edit / Delete Germany Show Events

  9. Post #289
    Gold Member
    Loli's Avatar
    April 2008
    2,288 Posts
    You need to set Sprite Blend Mode to Alpha Blend... I can't remember the exact code...
    Reply With Quote Edit / Delete United Kingdom Show Events

  10. Post #290
    Gold Member
    s0ul0r's Avatar
    September 2006
    993 Posts
    device.RenderState.AlphaBlendEnable = true;
    Reply With Quote Edit / Delete Germany Show Events Agree Agree x 3 (list)

  11. Post #291
    Richy19's Avatar
    May 2010
    5,375 Posts
    Guys are you talking about the slight dark edge around the light circles? or the fact the light doesnt fade as it gets far away from the fire?
    I think XNA is loading the image and something it or something because as it is now it shouldnt have that outline if its loading the image as it should be
    Reply With Quote Edit / Delete United Kingdom Show Events

  12. Post #292
    Gold Member
    s0ul0r's Avatar
    September 2006
    993 Posts
    That's why I said use the rendertarget, what I described was basically to render the whole screen black, and then you mask out the circles by drawing in the alpha channel.
    After you're done drawing to the rendertarget (Created the black mask, imagine it as a stencil)
    You draw that over the scene.
    Reply With Quote Edit / Delete Germany Show Events

  13. Post #293
    Richy19's Avatar
    May 2010
    5,375 Posts
    That's why I said use the rendertarget, what I described was basically to render the whole screen black, and then you mask out the circles by drawing in the alpha channel.
    After you're done drawing to the rendertarget (Created the black mask, imagine it as a stencil)
    You draw that over the scene.
    Thats what i doing, it draws a black screen onto a render target then draws a white image where the light should be, then turns the white into alpha and draws it on top of the game
    Reply With Quote Edit / Delete United Kingdom Show Events

  14. Post #294
    Gold Member
    Xeon06's Avatar
    September 2005
    1,222 Posts
    Looks cool. It will be interesting to see how you make it deal with terrain and natural landmarks.

    I think your cities should have more a "center", since cities start out small and grow outward over time.
    They do, it just wasn't apparent because of building size:
    http://dl.dropbox.com/u/3310651/Zombie/center.png
    For terrain, I'll just adjust the height of the intersections and flatten where buildings are. For stuff like water and lake, probably will just remove the intersecting blocks or adjust them some way. Bridges would be fun though. And I still gotta find a nice way to generate those natural things.
    Reply With Quote Edit / Delete Canada Show Events Artistic Artistic x 4Programming King Programming King x 2Winner Winner x 1 (list)

  15. Post #295
    Person
    geel9's Avatar
    June 2008
    5,588 Posts
    I'm working on a packaging system for files. It won't have any encryption or anything because...I see no reason for it.
    Reply With Quote Edit / Delete United States Show Events Dumb Dumb x 5Friendly Friendly x 1 (list)

  16. Post #296
    www.bff-hab.de
    Dennab
    February 2009
    7,832 Posts
    I'm working on a packaging system for files. It won't have any encryption or anything because...I can't.
    It's ok.
    Reply With Quote Edit / Delete Germany Show Events Zing Zing x 16Funny Funny x 2 (list)

  17. Post #297
    Ayra's Avatar
    March 2010
    301 Posts
    I'm working on a packaging system for files. It won't have any encryption or anything because...I see no reason for it.
    Same thing here. Entirely written in Python 3.1.3 and only using standard libraries.
    Reply With Quote Edit / Delete Denmark Show Events

  18. Post #298
    PiXeN's Avatar
    April 2009
    1,005 Posts
    I'm working on a packaging system for files. It won't have any encryption or anything because...I see no reason for it.
    And what you use will you have for it except "replace a single huge file at any minor change" ?
    Reply With Quote Edit / Delete France Show Events

  19. Post #299
    Gold Member
    Ortzinator's Avatar
    May 2005
    1,647 Posts
    They do, it just wasn't apparent because of building size:
    http://dl.dropbox.com/u/3310651/Zombie/center.png
    For terrain, I'll just adjust the height of the intersections and flatten where buildings are. For stuff like water and lake, probably will just remove the intersecting blocks or adjust them some way. Bridges would be fun though. And I still gotta find a nice way to generate those natural things.
    I see it now. I think the main roads should be wider though.
    Reply With Quote Edit / Delete United States Show Events

  20. Post #300
    Gold Member
    Ortzinator's Avatar
    May 2005
    1,647 Posts
    Thanks compwhizii
    Reply With Quote Edit / Delete United States Show Events Disagree Disagree x 1 (list)

  21. Post #301
    Gold Member
    HubmaN's Avatar
    July 2007
    6,267 Posts
    And what you use will you have for it except "replace a single huge file at any minor change" ?
    It also happens to be a readable PNG, giving off a pleasing visual representation of the files contained.
    Reply With Quote Edit / Delete Thailand Show Events

  22. Post #302
    open.gl
    Overv's Avatar
    February 2007
    7,431 Posts
    It also happens to be a readable PNG, giving off a pleasing visual representation of the files contained.
    holy shit
    Reply With Quote Edit / Delete Netherlands Show Events Funny Funny x 11Agree Agree x 1 (list)

  23. Post #303
    PENISCORP DIRECTOR
    Gran PC's Avatar
    August 2007
    3,110 Posts
    It also happens to be a readable PNG, giving off a pleasing visual representation of the files contained.
    Why not? Just use PNG chunks for the file :science:
    Reply With Quote Edit / Delete Spain Show Events

  24. Post #304
    Gold Member
    HubmaN's Avatar
    July 2007
    6,267 Posts
    that's the point
    Reply With Quote Edit / Delete Thailand Show Events

  25. Post #305
    Gold Member
    ThePuska's Avatar
    October 2005
    3,417 Posts
    A root-finding algorithm for functions with two arguments

    It's just using the secant method in "two dimensions". Except that I had to divide each step by 2 because it kept leaping over the roots - I suppose that has something to do with it being two-dimensional

    I did no math to prove that it should converge, I was just working based on intuition. Seems to work about as well as the normal secant method.

    I'm doing lots of math stuff these days but I don't really apply all the crap I'm coding to anything.
    Reply With Quote Edit / Delete Finland Show Events

  26. Post #306

    February 2010
    219 Posts
    I'm working on a packaging system for files. It won't have any encryption or anything because...I see no reason for it.
    Hey me too, I have support for various data types including Sound and Images with a simple byte shuffle encryption and a zlib compression. I also have written a extension to the format (I call it pDat) that is used by the patcher program I wrote to update the main data file.
    Reply With Quote Edit / Delete United States Show Events Dumb Dumb x 1 (list)

  27. Post #307
    Kate Adams
    COBRAa's Avatar
    June 2009
    975 Posts
    Going through netcraft for PHP+x86 servers to have fun with the new Magic Number.
    I haven't found any servers vuln yet.

    Also:

    http://tirania.org/blog/archive/2011/Jan-04.html
    Reply With Quote Edit / Delete United Kingdom Show Events Informative Informative x 1 (list)

  28. Post #308
    Neigh
    CarlBooth's Avatar
    June 2007
    28,548 Posts
    I haven't found any servers vuln yet.
    I'd be shocked and disappointed if charlie hasn't written something yet that actively seeks and logs them.
    Reply With Quote Edit / Delete United Kingdom Show Events Agree Agree x 2 (list)

  29. Post #309
    iNova's Avatar
    November 2008
    1,045 Posts
    to have fun with the new Magic Number.
    Elaborate?
    Reply With Quote Edit / Delete Estonia Show Events

  30. Post #310
    Reply With Quote Edit / Delete France Show Events Informative Informative x 1 (list)

  31. Post #311
    www.bff-hab.de
    Dennab
    February 2009
    7,832 Posts


    results in:

    Reply With Quote Edit / Delete Germany Show Events Funny Funny x 24Agree Agree x 2 (list)

  32. Post #312
    limitofinf's Avatar
    December 2010
    161 Posts
    Hey,

    Boredom during History, Calculus, Physics, and similar classes led to the following:

    Sierpinski carpet - rendered pixel by pixel by recursively subdividing the screen into 1/3s:


    Sierpinski triangle - rendered by recursing into a given depth, N, and then drawing triangles with 3 lines:


    Mandelbrot - rendered pixel by pixel:


    All written in TI-Basic, so they are very slow. The Sierpinski triangle is the fastest because it doesn't iterate per-pixel; the Mandelbrot is the slowest due to lots of iteration and arithmetic.

    In terms of code, the Sierpinski triangle was the hardest. It needed to use recursion, but the TI-83 doesn't have functions; I ended up using an extra program for the recursion, but then there was a separate issue - all programs share the same global variables, and there is no variable stack for recursion. I ended up keeping a global iteration count which I used to index into L1 to store each depth's variables, kind of like a makeshift stack
    Reply With Quote Edit / Delete United States Show Events Winner Winner x 11Agree Agree x 1Programming King Programming King x 1Optimistic Optimistic x 1 (list)

  33. Post #313
    Gold Member
    Robber's Avatar
    January 2006
    6,073 Posts
    Why? The magic number only works as a number, but a post is a string.
    Reply With Quote Edit / Delete Austria Show Events Zing Zing x 9Disagree Disagree x 1Agree Agree x 1 (list)

  34. Post #314
    www.bff-hab.de
    Dennab
    February 2009
    7,832 Posts
    Whatever
    Reply With Quote Edit / Delete Germany Show Events

  35. Post #315
    Kate Adams
    COBRAa's Avatar
    June 2009
    975 Posts
    Why? The magic number only works as a number, but a post is a string.
    If the number is in the GET/POST data it redirects you there no matter what. Even if its just in the URL.
    Reply With Quote Edit / Delete United Kingdom Show Events Agree Agree x 2Informative Informative x 1 (list)

  36. Post #316
    open.gl
    Overv's Avatar
    February 2007
    7,431 Posts
    How's this so far for OOGL?

    #include <oogl/Window.hpp>
    
    int main()
    {
    	GL::Window window( 800, 600, 0, 0, "OpenGL Triangle", GL::WindowFlags::Caption | GL::WindowFlags::CenterScreen );
    	GL::Context& gl = window.GetContext();
    
    	GL::Shader shader( GL::ShaderType::Fragment );
    	shader.Source( "void main() {}" ); // Can be overloaded to supply multiple strings, like glShaderSource.
    	bool success = shader.Compile();
    
    	gl.ClearColor( 0.0f, 0.0f, 0.0f );
    
    	while ( window.IsOpen() )
    	{
    		window.GetEvents();
    
    		gl.Clear( GL::Buffer::Color );
    
    		window.Present();
    	}
    
    	return 0;
    }
    Reply With Quote Edit / Delete Netherlands Show Events

  37. Post #317
    Gold Member
    Jookia's Avatar
    July 2007
    6,768 Posts
    Looks pretty good.
    Reply With Quote Edit / Delete Australia Show Events Agree Agree x 3Dumb Dumb x 1 (list)

  38. Post #318
    blankthemuffin's Avatar
    July 2009
    1,265 Posts
    How's this so far for OOGL?

    #include <oogl/Window.hpp>
    
    int main()
    {
    	GL::Window window( 800, 600, 0, 0, "OpenGL Triangle", GL::WindowFlags::Caption | GL::WindowFlags::CenterScreen );
    	GL::Context& gl = window.GetContext();
    
    	GL::Shader shader( GL::ShaderType::Fragment );
    	shader.Source( "void main() {}" ); // Can be overloaded to supply multiple strings, like glShaderSource.
    	bool success = shader.Compile();
    
    	gl.ClearColor( 0.0f, 0.0f, 0.0f );
    
    	while ( window.IsOpen() )
    	{
    		window.GetEvents();
    
    		gl.Clear( GL::Buffer::Color );
    
    		window.Present();
    	}
    
    	return 0;
    }
    How do you get shader errors out of your shader.Compile()?
    Reply With Quote Edit / Delete Australia Show Events

  39. Post #319
    ..............
    nekosune's Avatar
    February 2009
    1,827 Posts
    Why? The magic number only works as a number, but a post is a string.
    My guess is, Compwhizzi added some code like this, to try and stop people using this bug:
    (replace X with 1, altered so as to actually post and all )

    if (strpos(str_replace(‘.’, ”, serialize($GLOBALS)), ’222507385850720XX′)!==false) die("fuckoff");
    
    Reply With Quote Edit / Delete United Kingdom Show Events Informative Informative x 2 (list)

  40. Post #320
    q3k
    Gold Member
    q3k's Avatar
    October 2009
    921 Posts
    In terms of code, the Sierpinski triangle was the hardest. It needed to use recursion, but the TI-83 doesn't have functions; I ended up using an extra program for the recursion, but then there was a separate issue - all programs share the same global variables, and there is no variable stack for recursion. I ended up keeping a global iteration count which I used to index into L1 to store each depth's variables, kind of like a makeshift stack
    Or you can do it this way.
    Reply With Quote Edit / Delete Poland Show Events