Unity Community


Page 1 of 26 12311 ... LastLast
Results 1 to 20 of 502

  1. Posts
    295

    Grid Framework [scripting and editor plugins]

    Hello everybody,

    I'm announcing the first release of the Grid Framework for Unity3D, your simple solution for grid-based actions.


    So, what does it do? You just drag the new grid component on an object in your scene, set the values to your liking and there you go. Now all you need is to make that game of yours without worrying about any equations and calculations. All grids anre infinite in size, three-dimesional and can be freely moved and rotated using the object they are attached to. Find points in the grid and convert from grid space to world space and vice versa on the fly with just one line of code. Use grids for gameplay, in level design or for level design during gameplay. Snap objects to the grid or align them, both during runtime and in the editor with the included editor panel. Or maybe you don't even care about the grid itself, you just want the vertices stored inside a matrix for quick access? There's a line of code for that as well.

    To see Grid Framework in action take a look at my introduction videos:
    http://www.youtube.com/watch?v=cZHeiGxgmG8 and http://www.youtube.com/watch?v=6T8hfafxId8
    Hex Grids: http://www.youtube.com/watch?v=1mb95Nhv8I0

    Here are some of the key features in the current release:
    - a quick and simple drag&drop setup
    - a new fully scriptable grid component for you objects
    - drag&drop setup
    - convert coordinates from world space to grid space and vice-versa
    - find vertices, faces and boxes inside your grid
    - store a set amount of vertices inside a matrix for quick access later
    - a built-in editor panel for scaling and aligning object to assist you in designing levels
    - or use those functions at runtime in your game, for example in a level editor
    - full scripting documentation and explantation of grid design concepts included
    - more features and more grid types planned, all updates for free

    This is just the first release and while all the included features work reliably, I plan on adding even more to this package. Most notably hex grids, triangular grids and polar grids (in that order), all with the same functionality as the rectangular grids. Another thing that has top-priotiry is rendering the grid at runtime, currently the grid is drawn using gizmos, but that won't work for a finished game.

    Tutorial Videos:
    grid-based randomized movement with limits
    grid snapping during runtime
    grid-based game logic in a puzzle game
    How to extend Grid Framework with your own methods (continuation of the above)
    level design and text parsing for building grid-based levels from plain text files
    seemingly endless grid

    For more information take a look at my YouTube videos and visit my blog:
    http://unitygridframework.blogspot.com

    By buying this package you will get all future upadates for free, even as the price goes up, and support further development. The package is finished and ready, awaiting submission to the asset store, so stay tuned for further news.
    Last edited by hiphish; 04-03-2013 at 01:16 PM.



  2. Posts
    295
    Of cource, the framework is written in C#, but unless you want to dig through my source code (which you can if you want to), just use the documented API, it works in any langueage. Once a script is compiled by Unity it doesn't really matter what language it was written in.

    BTW, the package has been submitted today, now I need to wait for approval.
    Grid Framework: easy grid setup and scripting for Unity
    http://forum.unity3d.com/threads/144...editor-plugins


  3. Posts
    295
    A quick update:

    I have been contacted by an Asset Store admin, who recommends me to include a demo scene so users could see an end setup. I thought dragging a script onto an object is pretty straight-forward, but I agree, a demo scene would be a really good idea. The tricky party is coming up with good ideas; don't get me wrong, I have plenty of ideas for actual gameplay examples, but for a demo scene I need something more basic and at the same time more catchy. I already made a little sphere that randomly roams a grid face by face, stays within limits and immediately adapts to changes in the grid, all with just 32 lines of code total (not counting whitespaces and comments). I'll come up with two or three more nice demos, that should give a good impression of Grid Framework in action.
    Grid Framework: easy grid setup and scripting for Unity
    http://forum.unity3d.com/threads/144...editor-plugins


  4. Location
    Greece
    Posts
    456
    I look forward to this actually, allthough I'd like to know the API before I commit, although for the price I don't really mind. Here are some suggestions by the way:

    1) A demo like a strategy game where you show how it's possible to snap place things on the grid, while the grid return the front tile of the placed object tile for example.

    2) A VERY much simplified demo version of the old windows game minesweeper.

    best


  5. Posts
    295
    I can send you the documentation via PN, no problem. I wanted to do the stategy game thing, the snapping part is just one line, now I need to roll a quick method for dragging objects with the mouse. Minesweeper is a very good idea, I wouldn't even need to simplify anything, but the problem is that the most elegant way to make such a game would be using Delegates and Events, which are C# territory. It's really not much different from the lights-out example.
    Grid Framework: easy grid setup and scripting for Unity
    http://forum.unity3d.com/threads/144...editor-plugins


  6. Location
    Greece
    Posts
    456
    Hey,

    I'd like to see the API if you don't mind and can send. My suggestions were for showcasing your product. In my case, my game is a tile based one, so I tihnk your framework will come much in handy since I am a JSer and designer mostly, rather than a programmer.


  7. Posts
    295
    OK, I made up my mind, I'll include the movement example, the strategy example and the lights-out example. No point in a Minseweeper example as would be very similar to the way the lights-out example works. I finished the movement video, I'm currently rendering and uploading... EDIT:
    http://www.youtube.com/watch?v=m9_efVi_tFs

    Quote Originally Posted by nuverian View Post
    I'd like to see the API if you don't mind and can send
    I sent you a PM already.
    Last edited by hiphish; 07-28-2012 at 04:54 PM.
    Grid Framework: easy grid setup and scripting for Unity
    http://forum.unity3d.com/threads/144...editor-plugins


  8. Posts
    16
    I like this plugin. hiphish, do you sent me a beta version? I'll test it.
    A Indie Game Developer for Everyone in Beijing
    QQ: 454109
    Mail: lijianxin@me.com


  9. Location
    Princeton, New Jersey
    Posts
    624
    could this be used to limit movement to diagonal? Something like Checkers for instance?
    Asset Packages & 2D/3D gaming Development
    Unity Pro / iPhone Advanced

    http://outtoplayinc.tumblr.com/


  10. Posts
    295
    Quote Originally Posted by iamjianxin View Post
    I like this plugin. hiphish, do you sent me a beta version? I'll test it.
    There is nothing left to test anymore, there is no Beta. All features work as supposed, it's just the amount of features that will be increased with more grid types. Anyway, it sould be up in a day or two, depending on the Asset store team. I might do Beta releases with the new features though.

    Quote Originally Posted by outtoplay View Post
    could this be used to limit movement to diagonal? Something like Checkers for instance?
    Sure. In the Lights Out example (included) I compare grid coordinates to decide if two tiles are adjacent. Here is a rough idea of how to do it:
    Code:  
    1. var thisTile: Vector3;
    2. var otherTile: Vector3;
    3.  
    4. //diagonal on an adjacent tile
    5. var isDiagonalAndAdjacent: boolean = Mathf.Abs(thisTile.x - thatTile.x) == 1 && Mathf.Abs(thisTile.y - thatTile.y) == 1
    6. //or if you just want it to be diagonal
    7. var isDiagonal: boolean = Mathf.Abs(thisTile.x - thatTile.x) ==  Mathf.Abs(thisTile.y - thatTile.y);
    (instead of ==1 you shuld do <=1.1 and >= 0.9 or something like that, use a range with a small tolerace instead of exact numbers because of floating point rounding errors. The engine might show you 1.0, but if the real values is 1.0000000001 the check will fail, so you need a certain tolerance. That's just how float numbers work)

    What this example does is compare if both the X and Y coordinates are one unit apart (the Mathf.Abs means it doesn't matter if the coordinate is left or right), which is the case if and only if two tiles are diagonal to each other. Both coordinates are in grid space, which you can easily covert to and back using
    Code:  
    1. var myGrid: Grid;
    2. var newVector: Vector3 = myGrid.WorldToGrid(oldVector);
    3. // do some stuff and return the value in world space
    4. return myGrid.GridToWorld(newVector);
    Last edited by hiphish; 07-30-2012 at 02:56 AM.
    Grid Framework: easy grid setup and scripting for Unity
    http://forum.unity3d.com/threads/144...editor-plugins


  11. Posts
    295

    First Release

    It has been approved! Here is the download link:
    http://u3d.as/content/hi-phish/grid-framework

    Aside from the relevant scripts you get the documentation, three demo scenes (coded in JavaScript and C#, exentsively commented), a debug prefab and the editor panel. If you have questions or suggestions feel free to post them here I'm looking forwardto your comemnts.
    Grid Framework: easy grid setup and scripting for Unity
    http://forum.unity3d.com/threads/144...editor-plugins



  12. Posts
    729
    Congrats, this is a great idea. We have a heavily grid-based game in development so we'll definitely be grabbing a copy of this to help with level building!

    I'd pay $20.
    Rafe [Path-o-logical Games]
    > Check out our Asset Packages
    > support@path-o-logical.com


  13. Posts
    295
    Another video tutorial, howing how to use grid-based game logic in a puzzle game. This is the tutorial for the lights-out game I mentioned before and which has been included with the package.
    This tutorial is written in C# because it uses delegates and events. The reason why is so that no single tile needs to know about the other tiles, making this code extremely flexible, you culd even change your scene during runtime. If you don't know about delegates and events I really recommend you to check out prime31studios' video. Their video series really got me into C# development.
    To give you the basic idea, events and delegates mean that somewhere somehow something happens and some other objects react to that. The object that triggered the event itself has no idea who (if anyone) is listening and how they will resond. For example you could have an RPG where when you draw your sword it makes villagers run away and guards draw their own weapons. Your hero would not need to know how many villagers and guards (if any) are around, he just needs to fire the event and all listeners will react accordingly.
    Quote Originally Posted by Rafes View Post
    Congrats, this is a great idea. We have a heavily grid-based game in development so we'll definitely be grabbing a copy of this to help with level building!

    I'd pay $20.
    Nice to hear that
    Grid Framework: easy grid setup and scripting for Unity
    http://forum.unity3d.com/threads/144...editor-plugins


  14. Posts
    295

    Version 1.0.1

    Three updates! (also new screenshots in the asset store)

    Version 1.0.1 has been approved
    If you tried debugging the functions FindNearestFace() or FindNearestBox() you might have noticed that the cubes drawn didn't have the same rotation as the grid. While it didn't change anything about the returned value (only the centre of the cube mattered), it looked ugly. I've submitted a small update that fixes the rotation:

    Grid Rendering Progress
    I've started tackeling grid rendering and it's ready to use. It's still not ready to ship though, I need to do some good code cleanup since I just copy-pasted code from another function, and copy-pasting code is very bad practice. During the cleanup I came across an issue, which required me to redisign two classes of mine, which in return required me to write my own custom inspector...

    New RectGrid Inspector
    I wanted to do this sooner or later anyway, but I had no choice but to do it now. The problem is that the default inspector cannot display getters and setters, so I could have either waste time trying to find some workaround which might or might not exist, or I just simply write my own inspector:
    It's much cleaner now and makes more sense.
    Grid Framework: easy grid setup and scripting for Unity
    http://forum.unity3d.com/threads/144...editor-plugins


  15. Posts
    295

    Version 1.1.0 - rendering

    Unity just approved version 1.1.0, which includes the new inspector panel and the rendering setup. Now you can see your grid in the finished game, no pro license or any other addon needed.
    Grid Framework: easy grid setup and scripting for Unity
    http://forum.unity3d.com/threads/144...editor-plugins


  16. Posts
    295

    Version 1.1.1

    Version 1.1.1 has been approved, it lets you set the width of the rendered line in the inspector. Here is an example, obviously it's over the top, but you can set the width to anything you like.

    Now I just need to provide a nice function to pass rendering points to Vectrosity. I'm sure those of you who own a Vectrosity license would like to be able to combine the best of both. I promise when I'm done it will be the last time you'll see me talk about rendering for a while.
    Grid Framework: easy grid setup and scripting for Unity
    http://forum.unity3d.com/threads/144...editor-plugins


  17. Posts
    729
    Hi,

    I installed 1.1.1 and got this error:

    "Assets/Plugins/Grid Framework/Grid.cs(73,17): error CS0103: The name `GridRenderManager' does not exist in the current context"

    [EDIT] Never mind..., I found the problem. I had to manually move your files to the plugins and editor folders, so the update had to be manually fixed as well. It would be great if you could group your files so they are installed to the official folders automatically, e.g.:

    Code:  
    1. Assets
    2.   Plugins
    3.     Grid Framework
    4.          ...
    5.  
    6.     Grid Framework
    7.         ....
    8.   Grid Framework    # <-- extras, easy to delete
    9.       docs, examples, etc
    Last edited by Rafes; 08-12-2012 at 10:20 PM.
    Rafe [Path-o-logical Games]
    > Check out our Asset Packages
    > support@path-o-logical.com


  18. Posts
    295
    Are you sure you had to move the editor files as well? They always worked from where they were for me. i also have other people's editor extensions and didn't have to put them into the global editor folder.

    Anyway, I'm afraid I cannot do what you suggested, the Asset Store allows me only to upload one single folder. When I export a Unity Asset package I can combine folders as I want, no problem, but for the asset store everything has be be in the same folder. It is really annoying, but you have to do the same thing for iTween for example as well.
    Grid Framework: easy grid setup and scripting for Unity
    http://forum.unity3d.com/threads/144...editor-plugins

Page 1 of 26 12311 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •