Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Suggestions for a puzzle game with sprite' size defined on the fly

Discussion in '2D' started by jhonatanoliveira, Jun 24, 2015.

  1. jhonatanoliveira

    jhonatanoliveira

    Joined:
    Jun 24, 2015
    Posts:
    1
    Hello.

    I am new to game development (so, please, if possible, keep the language as simple as possible) and I got stuck in an issue that maybe you guys could help me out with your experience.

    I am developing a puzzle game where we have few circles on the screen. The user can drag one over the other and than the two circles merge into a new one (something similar to this game: Agar.io).
    But the merge in my game works by deleting the two original and creating a new one inspired on the two original ones (the new circle can be sometimes bigger, sometimes smaller than the two original ones).

    My issue is that I don't know how to implement these circle-sprites. I thought about using a simple sprite with a circle image, but that's where I got stuck: let say I use a sprite with a predetermined image for the two original circles, say a 80x80 px image each. After merging those two and yielding a new one, the new circle could be, say 160x80 px. Then, I would have to stretch (scale) one of the original sprites. I don't think this is an elegant solution.
    Moreover, I would like these circles to have a fluid texture, like a "bubble of jam" (by the way, any suggestion on how this can be done?). Thus, stretching a fixed size sprite isn't a good solution at all.

    I'll be grateful with any suggestion or directions on this.
    If I wasn't clear enough, please let me know.

    Thank you in advance.
    Cheers.
     
  2. JimMakesGames

    JimMakesGames

    Joined:
    Nov 13, 2013
    Posts:
    21
    I'm not sure this is the only way, but one way I can think of is to use cylinders and rotate them so you can only see a circular face from the perspective of the camera. Then you can resize them as much as you need to without anything becoming pixellated. They would be 3D objects but if you only see them face on they'd appear to be 2D. It is a bit inefficient though since there would be a lot of unseen polygons that you don't need. You could make circles in a 3D graphics program like Blender and import them in. I don't know much about that process but there will be lots of information out there about that. Either way give them enough vertices so that they still appear circular when at maximum size. Hope that makes sense.

    By the way, that game you linked. Very addictive.