Tilegrid Plugin IDEA

This forum is currently in read-only mode.
From the Asset Store
Retro Game
$49 USD
Music Loops will turn your old school 80’s vintage production or idea to life!
  • Perhaps a function for GridX(#) and GridY(#), and use that grid in Construct to do that?

    Then you could spawn the appropriate objects at the right grid spots, move according to that stuff, etc.

  • I think a tile object would be a useful addition - especially with for-each cell, and storing data in cells - it would help simplify events. I'll add it to the todo list.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think a tile object would be a useful addition - especially with for-each cell, and storing data in cells - it would help simplify events. I'll add it to the todo list.

    Now I can make my puzzle games !

  • It isn't reasonably easy to do. If it was, I wouldn't be requesting it.

    You can make a pseudo (fake) grid engine with a lot of work and a bunch of events where you manually have to calculate where the center of each square on the "grid" (each and every single x/y coordinate) is to move your character (which would likely result in an event sheet that takes up the whole screen) but that's just tedious and haphazard, and not to mention just isn't practical.

    If you won't use it, then fine. Don't use it. I actually think you need it more than you're realizing.*

    The bolded part there... I'm sorry, but I kind of chuckled at that one. If you're afraid to have an event sheet that takes up a whole screen then your games must not be very complex. Not that that's a bad thing, but you're talking about advanced activities such as creating level editors and such.

    And no, I don't need a grid object because I can do basic math. And while you do have to "calculate the center of every single x/y coordinate" it's not as hard as you're making it out to be. Since you're so keen on using MMF as a comparison, here's part of a program I made in MMF that shows how simple it is:

    <img src="http://xs225.xs.to/xs225/08114/grid_engine903.png">

    This shows how you can place a square cursor with a mouse click exactly on a grid sized 32px by 32px. This is for a grid that starts at 64,32 and ends at 544, 352. It doesn't need the grid object, because is uses a simple mathematical formula to find where the grid should be (mouseX/32*32). Finding where a target should move to (such as a character walking) is also a simple matter of having them move towards whatever their current location is + 32 pixels. Hey, what do you know? Grid movement. You could do this in Construct just as easily.

    *Edit: Another thing you might not realize is this. A Tile Grid object can directly be used to make a level editor for games. In fact, by requesting this, you are also requesting the ability to add level editing to games. If you've used MMF before you'd know that it's almost essential to have a grid object for such a thing.

    This might come as a shock but the example I posted above is from a level editor I made in MMF that - surprise - doesn't use the grid object. Though I never finished it, it moves the cursor in a loop in steps of 32px, detects what is under the cursor, and writes the tile type to an array. The array then saves the data to a file.

    Construct by itself does not have that ability unless someone codes it in via the plugin SDK or editing the source code.

    As I have demonstrated, Construct does have the ability. You don't, because you're stuck on this idea that "it's too hard." If you can get over the idea that it's too much work you'll see that it's really not as much as you thought.

    Even MMF has a grid object.

    Yes, and it's not the godsend you're looking for. You can test if x, y is over a cell. Easy enough to do with math. You can test if x is in column, or y is in row. Again, basic math skills are all that are needed for that. To set a sprite at row 4, column 5 of a 32px grid you do this:

    [ul]	[li]Sprite:Set X to 4*32[/li]
    	[li]Sprite:Set Y to 5*32[/li]
    [/ul][/code:29ttfrw8]
    
    If you have variables for "row" and "column" instead of the static "4" and "5" then you've just made yourself a basic grid placement engine.
    
    As for useful actions, MMF's grid object can set cell values and clear cell values.  This can be easily achieved with the addition of an array.
    
    I'm sorry, but I'm not just saying boo to be contrary.  I've actually put some thought to the matter.  Would a basic grid object be useful?  Yes.  But only to save yourself two or three steps that can be made with events.  Since it's not saving any appreciable amount of work then it's not really all that useful.  Should it be implemented some time down the road?  Sure, I don't see why not, but there are more pressing concerns.
    
    *Edit:  Whoops, missed Ashley's post.  Well, there you go.
  • Deadeye: the maths behind it is easy, but it would still be a useful object. It's essentially a special case of a 2D array that also corresponds elements to a position on the screen. Also, in Construct, the expression:

    MouseX / 32 * 32

    defaults to floating point division, so has the same effect as just setting to MouseX. You'd have to use round(MouseX / 32) * 32.

  • Infact, it could be probably done with normal arrays, but will require loads of work. Instead, having a simple and easy-to-use object will increase fun and accessibility during development.

  • [quote:17lki0s3]but will require loads of work

    Yeah give Ashley more work :/

    And making people lazy is not good... i know construct is about "no scripting to create" but it can be done easily in array.

  • [quote:3f1dz6gd]but will require loads of work

    Yeah give Ashley more work :/

    And making people lazy is not good... i know construct is about "no scripting to create" but it can be done easily in array.

    No offense, but will you and that other guy please shut up about that already? You're really getting on my nerves. I understand that you don't want this feature, fine, but that doesn't mean you have to keep making jabs at me even after I decided to drop the whole issue.

    I already explained what I meant. Maybe you didn't notice, but that "call me lazy" bit was sarcasm. I said that in response to being told to try to make a game using C++ w/ Allegro.

    Also, I don't understand why anyone would be against something that speeds up productivity and reduces the clutter and extra work of making a game, especially with a WYSIWYG program like Construct. I was just trying to emphasize how absurd I thought that was. I mean, it's like telling everyone not to use the built in movements but instead make your own platform movement, or own physics engine.

    If you still don't understand what I'm trying to say, I can explain it again (for the third time) if you want, but right now I think we're just beating a dead horse.

    Also, I admit. I forgot my basic math there for a second. I don't know how that slipped my mind. But that doesn't change the fact that I still would much prefer to use a tilegrid object than create a huge clusterfrick of an array just to make a grid. Especially when I can have the whole making of the grid part set up already and focus on actually making the game, where the effort actually counts.

  • Well, it's on the todo list, so I don't know why you feel the need to keep flaming each other. Locked!

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