Thread: Falling-sand game competition

Page 1 of 2 12 LastLast
Results 1 to 10 of 20
  1. #1 Falling-sand game competition 
    fumant viriditas quotidiana

    saifix's Avatar
    Join Date
    Feb 2009
    Age
    19
    Posts
    1,070
    Thanks
    159
    Thanked 644 Times in 280 Posts
    Rep Power
    1613
    About
    The idea is to have a particle simulator with support for various types of particles (solids, liquids, gases) and static geometry (allowing the user to draw a gravity defying wall will suffice).

    Requirements
    • Any programming language can be used
    • You should support collisions and gravity
    • The user should able to interact with the scene


    How your code will be judged
    Your code will be judged on its quality & structure and it will be benchmarked.

    The code may either be posted here to be judged by the public or PMed to me if you'd like to keep it private until the competition is over.

    Deadline
    2 weeks from 22/04/2012, ending on 6/5/2012.

    An example (Supah Fly): Falling Fancies (A falling sand game)

    Online example: Falling Sand Game - hosted by Chirag Mehta @ chir.ag
    "HOW FUCKING DARE U LEECH MY INTERFACES?
    I'VE GOT 50 BOTS TO A THOUSAND PLACES
    JUST WAIT TIL STEFFAN GETS ONLINE
    HES ALREADY SUCKING MINE"
    - Zee best
    Reply With Quote  
     

  2. Thankful users:


  3. #2  
    Registered Member
    Killer 99's Avatar
    Join Date
    Dec 2007
    Posts
    1,436
    Thanks
    166
    Thanked 483 Times in 190 Posts
    Rep Power
    386
    maybe ill do it in a bit idk but i will definitely used this 'reserved' post to present it to people.

    anyway good luck with the game, and for those who are looking to do this i suggest you find my thread about 'how to speed up your client' thing, it has some info for doing pixel-based games like this would be.
    Reply With Quote  
     

  4. #3  
    Registered Member
    CODER LORD 420's Avatar
    Join Date
    Dec 2010
    Posts
    2,361
    Thanks
    372
    Thanked 1,261 Times in 644 Posts
    Rep Power
    2848
    reserved until next weekend (edit maybe even the next, 3 past exams to do this weekend)


    enjoy the panda for the mean time
    Signature Removed due to violation of rules
    Reply With Quote  
     

  5. #4  
    fbgm

    Supah Fly's Avatar
    Join Date
    Feb 2008
    Posts
    1,600
    Thanks
    158
    Thanked 547 Times in 340 Posts
    Rep Power
    796
    also you will notice that direct access to variables is way faster than getting something through a method (pointing out the obvious). it's annoying, but necessary since these games are actually quite demanding if you're not using multiple threads. you can't really go all hXc object oriented make everything an object like you may want to.

    a requirement should actually be that it can run on a single core system with no problem, whether that be strictly staying with a single thread no matter what or using multiple threads based on amount of cores.

    still a good challenge for really teaching you how to make major performance improvements and what difference those improvements really make.
    Quote Originally Posted by Vastico View Post
    Stability is how your server handles incoming, outgoing, nulls, attacks, bots.
    Reply With Quote  
     

  6. #5  
    Registered Member
    CODER LORD 420's Avatar
    Join Date
    Dec 2010
    Posts
    2,361
    Thanks
    372
    Thanked 1,261 Times in 644 Posts
    Rep Power
    2848
    you do realise accessors are pretty much guaranteed to be inlined, so are not going to be 'way slower'
    Signature Removed due to violation of rules
    Reply With Quote  
     

  7. Thankful user:


  8. #6  
    fbgm

    Supah Fly's Avatar
    Join Date
    Feb 2008
    Posts
    1,600
    Thanks
    158
    Thanked 547 Times in 340 Posts
    Rep Power
    796
    Quote Originally Posted by NurseDiablo View Post
    you do realise accessors are pretty much guaranteed to be inlined, so are not going to be 'way slower'
    i actually made a falling sand game (just saying, i'm not talking out of my ass lol) and experimented in many ways of accomplishing certain things so i'm speaking from experience. direct access is at least 10x faster, at least on my cpu. it doesn't make sense for me to even say it if i didn't know it was true.
    Quote Originally Posted by Vastico View Post
    Stability is how your server handles incoming, outgoing, nulls, attacks, bots.
    Reply With Quote  
     

  9. #7  
    Hei
    Hei is offline
    Ex-Moderator
    Hei's Avatar
    Join Date
    Dec 2006
    Age
    17
    Posts
    2,624
    Thanks
    937
    Thanked 615 Times in 321 Posts
    Rep Power
    2289
    Just started on this, really lazy to write anything complex, doing everything in simple efficient way.

    I named this...

    SkyGravity



    Stay tuned, might finish today.
    Last edited by Hei; 04-22-2012 at 06:36 PM.
    Reply With Quote  
     

  10. Thankful user:


  11. #8  
    fumant viriditas quotidiana

    saifix's Avatar
    Join Date
    Feb 2009
    Age
    19
    Posts
    1,070
    Thanks
    159
    Thanked 644 Times in 280 Posts
    Rep Power
    1613
    Quote Originally Posted by Supah Fly View Post
    i actually made a falling sand game (just saying, i'm not talking out of my ass lol) and experimented in many ways of accomplishing certain things so i'm speaking from experience. direct access is at least 10x faster, at least on my cpu. it doesn't make sense for me to even say it if i didn't know it was true.
    10x faster? That doesn't sound right... is this only on the CLR or have you tested this on multiple platforms?

    Anyway, my src is written in C... direct memory access :'-)
    "HOW FUCKING DARE U LEECH MY INTERFACES?
    I'VE GOT 50 BOTS TO A THOUSAND PLACES
    JUST WAIT TIL STEFFAN GETS ONLINE
    HES ALREADY SUCKING MINE"
    - Zee best
    Reply With Quote  
     

  12. #9  
    Registered Member

    Join Date
    Jan 2012
    Posts
    466
    Thanks
    308
    Thanked 188 Times in 107 Posts
    Rep Power
    643
    Quote Originally Posted by saifix View Post
    10x faster? That doesn't sound right... is this only on the CLR or have you tested this on multiple platforms?

    Anyway, my src is written in C... direct memory access :'-)
    I did a few tests previously, and although direct access was usually faster, every so often, using an accessor / mutator beat it..
    Reply With Quote  
     

  13. #10  
    fbgm

    Supah Fly's Avatar
    Join Date
    Feb 2008
    Posts
    1,600
    Thanks
    158
    Thanked 547 Times in 340 Posts
    Rep Power
    796
    Quote Originally Posted by bosslad View Post
    I did a few tests previously, and although direct access was usually faster, every so often, using an accessor / mutator beat it..
    i don't see how it could "beat it." if it beat it then your not measuring the times correctly or counting for the processor being random or the operating system/other threads taking priority over your program.

    Quote Originally Posted by saifix View Post
    10x faster? That doesn't sound right... is this only on the CLR or have you tested this on multiple platforms?
    something like that. a seriously notable performance improvement at least. java seemed to perform the same way. i used a mixture, direct access for the current particle being "processed" via like particles[x, y] because it was being called 100% of the time and then i had methods for accessing particles around it via GetParticle(x, y, Direction.South) or something of the sort. setting and switching were done though methods. if you go in and switch out particles[x, y] for GetParticle(x, y) you'll notice a huge performance impact even though it does essentially the same thing, even just a simple accessor that i used when testing this like

    Code:
    public int GetParticle(x, y)
    {
    return particles[x, y];
    }
    if you wanted to squeeze like uber performance out of my sample you could just access the particles directly but then you would be missing out on stuff, bounds checking for example. same with pretty much any program. direct access is either the same speed or faster than using an get/setter.

    the only reason i don't even attempt anything in c or c++ or anything of the sort is because i don't want to go through the hassle of setting up anything extra to just start writing code for like drawing or networking. i'm really lazy.

    also if you really want, c# has direct memory access via the unsafe keyword/compiler option.

    as far as i'm concerned my implementation is kind of strange/experimental to begin with since i use a region system which could actually be kind of slower since it has to queue the regions to update once they become activated.
    Quote Originally Posted by Vastico View Post
    Stability is how your server handles incoming, outgoing, nulls, attacks, bots.
    Reply With Quote  
     


Page 1 of 2 12 LastLast
Thread Information
Users Browsing this Thread

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

Similar Threads

  1. Falling Fancies (A falling sand game)
    By Supah Fly in forum Application Development
    Replies: 4
    Last Post: 04-22-2012, 01:37 AM
  2. Falling (It's been awhile)
    By JPlusPlus in forum Showcase
    Replies: 6
    Last Post: 11-25-2010, 07:52 AM
  3. Falling
    By Sway in forum Showcase
    Replies: 6
    Last Post: 09-05-2009, 05:25 AM
  4. Falling hearts
    By Bobster in forum Showcase
    Replies: 2
    Last Post: 01-24-2009, 05:24 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •