Sand Game with Drawing

0 favourites
  • 8 posts
From the Asset Store
You need this package if you want to program a Street Fighter or battle game.
  • Hi everybody!

    I started using Construct2 weeks ago and I already love it!

    Now I have a new game for a client, similar to this: pensar.chulojuegos.com/juegos-de-tacita-de-azucar.html

    Basically, its a "sand falling" game. So there is 2 things I want to know how to achieve with Construct2:

    • How to draw new "particles". That particles can be a mini-sprite and should have the rigidbody behaviour.
    • How to draw the "line colliders" (which will contain the "sand")

    I was trying and searching but could not figure how!

    Thanks a lot ;)

  • Hmm... this kind of game is actually pretty hard to make efficiently in C2. I'm sure R0J0hound or Yann will have some genius idea but I can't really think of a good way to do it.

    Are you aiming for mobile support? If not, you may be able to get away with one of the inefficient methods I'm thinking of.

  • Hi sqiddster! Thanks for your reply!

    Yes, the game is actually for mobile, and must be HTML5 based. So I thought it was a good idea to make it with Construct.

    I was worried about efficience too. I am new making HTML5 games (but no in game development with lots of another languages) and I was wondering how difficult this can be with C2 and HTML5 in general too!

    I still didn't accept the project, so if there still time to avoid it.. good to know it! XD

    But if there is a good chance to makes it work with C2 for mobile, then I will aim for it!

  • The only possible way I think this could work with mobile in C2 is if you get really deep into the 'pure mathematics' and learn about celluar automata. Even so, there's a good chance it wouldn't work. I'd probably suggest using another language for this project.

  • for this kind of calculation you're better off with GPU acceleration

    http://www.scirra.com/forum/falling-sand-on-gpu-through-pixel-shader_topic63143.html

  • I see... thanks for the replies!

    Yann, do you have some open sample project/tutorial of the link you shared? I would love to see how you implemented it! (if not secret =P)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Omegalpha

    As you can see I'm not the author of this topic, I've never really programmed shaders.

    Quazi is way out of my leagues he does some crazy stuff. If I am a good technician, this guy is a bloody magician :D

  • Quazi's method would work just as fast in C2 except there is no way in C2 to save the result of an effect to use on the next frame.

    Other than that the logic to move the pixels is simple.

    * if the area is free below a pixel is free move it down.

    * if the area is not free try to move down left or down right if those areas are free.

    Here is a demonstration using my canvas plugin. As you can see it is very slow. For this sort of thing you'll want a method a lot faster, but for that you'll have to delve into some javascript.

    https://dl.dropboxusercontent.com/u/5426011/examples17/sand.capx

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)