Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Griddy: Unity Grid Toolkit (Free, Open-Source, Incomplete)

Discussion in 'Made With Unity' started by Tempest, May 27, 2010.

  1. Tempest

    Tempest

    Joined:
    Dec 10, 2008
    Posts:
    1,286
    Griddy: Unity Grid Toolkit


    Description
    I just started this project and it is far from being released. I wanted to mention it early to get feedback from interested parties. This post will expand as more progress is made.

    This project generates a tile grid, and allows you to place buildings on the grid. You select your building type using buttons, and then prior to clicking, a transparent version of the building will appear with your cursor giving a ‘preview before placement’.

    I have a lot planned for this toolkit, and I’ve rewritten scripts several times to make it more flexible to both game genre and mechanic. A system like this would work in a game like SimCity, Civilization, Command Conquer, Starcraft. It’ll work for tower defense games, real-time strategy games, or even as a map editor.

    Updates
    http://bit.ly/9tW9hx - Project Released on Github
    http://waddlefarm.org/blog/?p=1536 - Weekend Prototype
    http://waddlefarm.org/blog/?p=1528 - Terrain Types
    http://waddlefarm.org/blog/?p=1521 - Introduction

    Videos
    http://vimeo.com/12072499

    Updates / Following
    The best way to get updates about this project would be to follow me on Twitter, or RSS on my blog, both of which are in my forum signature.
     
    Last edited: Sep 27, 2010
  2. coin-god

    coin-god

    Joined:
    Jan 21, 2010
    Posts:
    325
    Looks really interesting for RTS games.
     
  3. Numonic

    Numonic

    Joined:
    Mar 22, 2009
    Posts:
    241
    This looks great :D would love to see a version workable for Unity iPhone
     
  4. kheng

    kheng

    Joined:
    Oct 22, 2008
    Posts:
    126
    Awesome job! How hard would it be to get it to work with shapes like a sphere or a cube and not just a plane? Cause that would be really cool.
     
  5. Tempest

    Tempest

    Joined:
    Dec 10, 2008
    Posts:
    1,286
    @Coin-God
    Thanks! RTS, tower defense, turn-based games, and map editors can all use this.

    @Numonic
    There is no reason why it wouldn't work for iPhone. A different cursor system for placing the buildings would be the only change.

    @kheng
    It's on my to-do list to figure out a hex-grid (or triangle, etc) which would work this way as well.

    When you say sphere or cubes, do you mean for the tiles to build on? Technically your "tile" could be anything.


    I'm trying to make this toolkit powerful and flexible. So, you could have buildings of different sizes (1x1 tile buildings, 2x2 tile buildings, even 2x4 buildings, etc). There is a list of features growing daily.
     
  6. newbrand

    newbrand

    Joined:
    May 13, 2010
    Posts:
    70
    cool thing, can't wait to get my greedy hands on it :~) Does it work with terrain?
     
  7. Tempest

    Tempest

    Joined:
    Dec 10, 2008
    Posts:
    1,286
    There would be a number of ways to have this work. In the video, it is generated based on the Height and Width. In the future, I'd like it so you could load in a map via a textfile, or place the tiles manually. This wouldn't be limited to rectangular grids.

    It could work with the Unity terrain, depending on what you wanted to achieve. Also, tiles themselves can be flagged as different terrain types (roads, rivers, etc) so you could have something like Starcraft, where the Zerg can only build on the Creep, and other factions can't.
     
  8. MarkPixel

    MarkPixel

    Joined:
    Apr 15, 2010
    Posts:
    39
    a tutorial would be great! :?:
     
  9. Tempest

    Tempest

    Joined:
    Dec 10, 2008
    Posts:
    1,286
    I imagine that through the course of developing this package I will provided several small tutorials to cover a few features, but the full toolkit would contain much more.
     
  10. Lukas H

    Lukas H

    Joined:
    Jan 16, 2009
    Posts:
    394
    Ahh if only I had this before we created Enercities ;)

    Keeping it generic will be a challenge but building a grid system is a lot of fun though! If you ever get stuck and need help, just give me a pm and maybe I can help you out.
     
  11. Tempest

    Tempest

    Joined:
    Dec 10, 2008
    Posts:
    1,286
    I've added some basic terrain types which you can apply as if you were painting on a canvas.

    http://waddlefarm.org/blog/?p=1528 - Terrain Types

    @ Lukas
    Thanks for the offer. It will be very difficult to keep ti generic. Eventually it'll just branch into RTS feature set, Tower Defense feature set, city builder feature set, etc. I'm trying really hard NOT to put in any game logic though.
     
  12. Tempest

    Tempest

    Joined:
    Dec 10, 2008
    Posts:
    1,286
  13. gamenut30111

    gamenut30111

    Joined:
    Nov 7, 2009
    Posts:
    399
    Darn, now i have someone to compete with. Your griddy system seems fast, and similiar to mine from what i saw with your video. Do you plan to keep upgrading this with pathfinding, or stick with tower defense?
     
  14. Tempest

    Tempest

    Joined:
    Dec 10, 2008
    Posts:
    1,286
    The Griddy System will not have game logic. So, it won't have Tower Defense logic, or RTS logic, etc.

    The Griddy system is really just about placing and moving objects on a grid. So, it may contain a basic movement/path AI, but it's main function is to allow for various terrain and various structures to work in a grid layout.
     
  15. fallingbrickwork

    fallingbrickwork

    Joined:
    Mar 16, 2009
    Posts:
    1,072
    This is really great, nice work. A system like this will come in very handy for a project I am mulling over.

    Best Regards,
    Matt.
     
  16. defjr

    defjr

    Joined:
    Apr 27, 2009
    Posts:
    436
    This looks quite promising, I can't wait to see more!
     
  17. zumwalt

    zumwalt

    Joined:
    Apr 18, 2007
    Posts:
    2,207
    Let me know when it is available, i will buy it!
     
  18. mikesgames

    mikesgames

    Joined:
    Apr 16, 2010
    Posts:
    1,071
    that is really cool! :D
     
  19. felipi arena

    felipi arena

    Joined:
    Jun 7, 2010
    Posts:
    25
    Hi! Amazing Project!!

    And... thats exactly what i need to keep going on my tower defense game project.

    Already did the wave system, health, gold, towers, shooters, everything, but got stuck on this grid thing (the creeps go don't need to calculate paths, so i didn't need grid until now).

    I'm starting to get things going, but REAAAALLY SLOW! and i'm in a kind of a hurry, i only have 2 weeks left to finish this project.

    So... is there any tutorials, examples, or anything u could direct me to? I must put my hands on an example. That grid manager is amazing... exactly what i need, such a shame i can't wait till you launch your project.
     
  20. tornadotwins

    tornadotwins

    Joined:
    May 21, 2008
    Posts:
    308
    Let me know if you'd like to sell this system through UnityPrefabs.com.
    We have the logic in the works (pathfinding, obstacle avoidance, etc even for iPhone). Those would be two prefabs that go very well together. Drop me a line!
    Cheers,
    -TT
     
  21. Tempest

    Tempest

    Joined:
    Dec 10, 2008
    Posts:
    1,286
    i'll be open-sourcing Griddy this week. It'll be on Github, available for download with some basic documentation. When I have it ready I'll post a link.

    It will be under the WTFPL license. If you're not familiar with that license, it's a quick read. In the future, more of my examples will also be under this license.

    I don't have the time to finish this; I haven't even touched it since mid-late July. As you can see from the video, it has potential but is very feature-incomplete. I encourage anyone interested to check out the project. I'll eventually finish it when I'm working on a game which will use it.

    I kindly request that you let me know if you do use this for a project just for my own satisfaction knowing that I contributed to something. It'd be nice to see where and to what extend people furthered the development of this tool.

    For my screenshots I've used assets from Frogames. These will not be included, for obvious licensing reasons, but I do suggest them if you're looking for models.
     
  22. Robbilie2

    Robbilie2

    Joined:
    Aug 4, 2010
    Posts:
    262
    can u pls post a download link?

    its sooooooooooooooo amazing!!!!

    Robert :)
     
  23. tornadotwins

    tornadotwins

    Joined:
    May 21, 2008
    Posts:
    308
    When reading your post I was like 'Naaah, NO license is a quick read'... until I clicked that link ;-) haha

    -TT
     
  24. Tempest

    Tempest

    Joined:
    Dec 10, 2008
    Posts:
    1,286
    Released. Check it out.

    I've removed all the assets/textures that were used in the videos because those were licensed. If you'd like to use them yourselves, check out Fro Games.
     
    Last edited: Sep 27, 2010
  25. Sammual

    Sammual

    Joined:
    Oct 28, 2008
    Posts:
    176
    I would love to see it work with a Hex-Grid (Offset squares work exactly like a hex grid).

    Sammual
     
  26. fyrlandt

    fyrlandt

    Joined:
    Aug 20, 2009
    Posts:
    80
    Checking it out tight now XD
    Its actually very good but the use of OnGUI and the number of drawcalls from the tiles are gonna be a toll on the iphone >.<
     
  27. Specal

    Specal

    Joined:
    May 25, 2009
    Posts:
    17
    Very nice. Will try it out, hope you can keep motivating our self and make it better.

    Thanks for still keeping great tools free!:)
     
  28. fyrlandt

    fyrlandt

    Joined:
    Aug 20, 2009
    Posts:
    80
    Hmm, haven't checked if this option is available already but can it handle let's say towers of different sizes? like some are 2x2, 2x3, etc

    Edit:
    I changed it a bit so that I can place lets say 1 bldg that's 2x2 and another that's 3x2. Problem is it's quite heavy for the iPhone 3G.

    Another edit:
    Finally was able to make it run smoothly on the iPhone 3G. Thanks so much for such a great toolkit XD
     
    Last edited: Oct 28, 2010
  29. OldBard

    OldBard

    Joined:
    Nov 24, 2010
    Posts:
    2
    Hi fyrlandt,

    How did you manage to make it run smoothly on the iPhone 3G?

    By the way, great tool Tempest, been helping a lot on some prototypes
    I've been working with.

    OldBard
     
  30. Tempest

    Tempest

    Joined:
    Dec 10, 2008
    Posts:
    1,286
    Glad it could be of use! I'm also interested in what Fyrlandt did to make it run smoothly on iPhone.
     
  31. fyrlandt

    fyrlandt

    Joined:
    Aug 20, 2009
    Posts:
    80
    I can't remember what I specifically did to make it run more smoothly on the iphone since it's been a while >.<
    I believe it had something to do with the markers that are being instantiated and the materials being used so that they could be batched coz from what I remember, it wasn't being batched when I first tried using it

    Edit:
    I kind of remembering changing the plane mesh being used by Unity since it's giving a high number of tris/verts
     
    Last edited: Dec 20, 2010
  32. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    999
    Thanks Tempest, I"m sure I'll be using this somewhere in the future, will let you know if I do :).
     
  33. Tempest

    Tempest

    Joined:
    Dec 10, 2008
    Posts:
    1,286
    I'd love to see any projects which may have used any part of Griddy. Good luck to all those who downloaded it.
     
  34. nalim

    nalim

    Joined:
    Apr 13, 2010
    Posts:
    118
    ey,
    i got a little question...
    i got the version 1.0 and how can i change the number of tiles one building is taking ?
    can someone tell me that i add a third tower and changes that to one tile ?
     
  35. jonbonazza

    jonbonazza

    Joined:
    Nov 6, 2010
    Posts:
    453
    Is this still under development?
     
  36. RingOfStorms

    RingOfStorms

    Joined:
    Oct 23, 2010
    Posts:
    584
    Hey I have the most recent download and was wondering a few things.
    1) Can I make it so it doesn't randomly generate the ground path?
    2) When placing the "river, grass, ground" - they can overlap each other when being placed. Can you make it so its like the towers and not be overlapping?

    Thanks
     
  37. bormeth

    bormeth

    Joined:
    Apr 3, 2011
    Posts:
    18
    Dude Griddy was i was looking for!! :) Hopes that your gonna keep it updated, im gonna update as i get some fixes done.
     
  38. Scryer

    Scryer

    Joined:
    Jun 2, 2010
    Posts:
    69
    Woah, looks like you could make a Final Fantasy Tactics type game with this, I'm VERY impressed and looking forward to it!
     
  39. Darknuke

    Darknuke

    Joined:
    Jan 31, 2011
    Posts:
    223
    I think this project is dead, though I wish it wasn't. It seemed like a great tool...
     
  40. joshubinow

    joshubinow

    Joined:
    Jun 17, 2010
    Posts:
    8
  41. herpderpy

    herpderpy

    Joined:
    Mar 9, 2010
    Posts:
    477
    Guys like you deserve a medal; a big, shiny ass medal.
     
  42. Ezzerland

    Ezzerland

    Joined:
    Jul 1, 2010
    Posts:
    405
    Since there is still existing interest in this project, I think I will go ahead and run an update for it and re-realease it under the same liscence. I'll bookmark this and put it on my to do list, working pretty hard on another project atm.

    Great work btw, Tempest <3

    Regards,
    Rob
     
  43. psydox

    psydox

    Joined:
    Jun 13, 2011
    Posts:
    1
    For some reason, the object(tower) and the icon was flickering when I play it. Any idea?
     
  44. Ezzerland

    Ezzerland

    Joined:
    Jul 1, 2010
    Posts:
    405
    This is one of the things I will be fixing in the update. The problem here is that the ghost version of the tower still has a collider attached to it.
     
  45. Ezzerland

    Ezzerland

    Joined:
    Jul 1, 2010
    Posts:
    405
    Bump:
    Getting ready to start on an update for this.
    Some features I had in mind I'll list below. Just wondering if anyone else had any thoughts about things they'd like to see added in. If there is, please keep to the intent of the original release.

    Things I'll be adding:
    +Scalable tile sizes
    +Fixing the bug with the ghost buildings as noted in the above post
    +Remove buildings via mouse-click after they are placed
    +Lazy Marker Generation

    Any thoughts on this... should building size scale automatically with tile size? So you get a building that fits the 1x1 tile size, when you scale the tile it scales the building?
     
  46. pagan

    pagan

    Joined:
    Nov 8, 2010
    Posts:
    28
    I have two question to the maker of this.
    Where is the dowload/buy link?
    Is it possible to extend it to a 3d Grid such as that you can position object in top of each other?
    Thanks
     
  47. Jovai

    Jovai

    Joined:
    Jun 27, 2011
    Posts:
    1
    This is the first example I've seen, that is at least running along the same lines as what I want to do. I have a hex grid instantiating with height/width public variables and I have camera controls implemented for moving around the "field" with a good orthographic iso view. . . but I unfortunately am still kind of fumbling through C# so I don't fully understand everything you did.

    Very fine example, I am trying to pick it a part a bit to see what pieces I can use. Too bad it's been put on hiatus.
     
  48. Fratyr

    Fratyr

    Joined:
    Sep 5, 2011
    Posts:
    20
    HexGrid support? Please? ;-)
     
  49. inscythe

    inscythe

    Joined:
    Nov 2, 2011
    Posts:
    1
    Heya, I'm new to Unity, but when I tried to load this toolkit in the latest unity (3.4.2), somehow all the prefabs and gameobjects lost all its scripts and textures attached to it. Did I do something wrong here?
     
  50. NiteFlam12

    NiteFlam12

    Joined:
    Dec 22, 2011
    Posts:
    1
    the link to download seems to be broken for me can someone post a new link?
     
unityunity