R0J0hound's Recent Forum Activity

  • So I can think of two ways to do it. Pixel/tile based or polygon based. Polygon based would scale up better with higher resolutions, and pixel/tile based is simpler but is slow. Especially with higher resolutions.

    Here's a test of the tile based method with construct's tilemap.

    uc2af988639941e25346f8127a40.dl.dropboxusercontent.com/cd/0/get/CiAXFMW9qSgVsm8gPz_ybSga-fe2omBAjUzmOvY0K1VePUNYjV_SACDgQTbO_I7w2tYiSMZzvUw_0dmR8_mCU6qyGGIJrBiQTzsFVNEn-rll6dBo4PUxP4XEBp9D8kT4MENokieSwJpuzgUEP-DVV3GE/file

    My intention with this as with most capx files I post is just to give ideas.

  • I agree. That would be useful.

    To set the overall velocity you’d have to do something like:

    Set velocity to

    100*cos(angle(0,0,self.physics.velocityX, self.physics.velocityY)),

    100*sin(angle(0,0,self.physics.velocityX, self.physics.velocityY))

    Where 100 is the speed you want to use.

  • Sorry. No ideas yet. Haven’t been on the computer.

    Any idea is probably feasible. I’d need to dissect that capx to see what I did to comment on any ways to modify it.

    On face value all the cars need to do is move along the roads, queue up at intersections, and have some logic to let them go though intersections in an orderly fashion.

    I’d have to work it out on paper, then find a way to make it into events. Depending on how I decide to do it some quirks of the event system need to be taken into account.

    Sub-problems to solve include moving the cars smoothly, handling different speeds, testing for edge cases and such.

    I’ll post if I get anything working.

  • You can do a flood fill to do that.

    Basically mark all the tiles as not visited and then start with some tile and flood fill from that. Marking all the connected tiles. At the end any tiles not marked are isolated.

    I guess the issue would be choosing which tile to start from. Maybe an edge? Depends on what you want to do.

  • You can use a sprite with a 2x2 distort mesh to do that.

    Set the project properties to standard z scale.

    Make the sprite of size 1x1.

    The set the mesh points to the triangle corners. Two of the mesh points would have the same positions so the quad would collapse into a triangle.

    For more efficiency you could try to do two adjacent triangles with one quad, but that’s not always possible.

  • Try Construct 3

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

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

    Currently the 3D in construct is pretty limited. What is provided is a way to move and rotate the camera, as well as the 3D object. The 3D object is limited to a few primitives and can only be rotated on the z axis.

    There is also a third party plugin by mikal that lets you load other models, as well as more rotations.

    Beyond that there is also mesh distort which can let you make meshes that way. However you have to really get into the weeds of the math to do it with that.

    3D physics is another can of worms. Either do it from scratch or use a js library to do it. Although either aren’t simple.

    Anyways, 3D isn’t there yet to do what you want to do easily.

  • You do not have permission to view this post

  • You do not have permission to view this post

  • Keeping track of all the explored tiles is the only way to do it.

    You can find ways to have it take less space and you can store it in such a way as you don’t have to loop over all the spaces.

    You could store and load chunks of fog tiles every time you scroll. Say every quarter of the screen worth of tiles is a chunk. That way you only need to store what was changed.

    If you store the chunks in a dictionary you can keep the speed of accessing chunks constant. Also you could store the chunks as a string of 1’s and 0’s for fog or clear. Then you can do rle compression on it to make it more compact. Or there are more complex compression ideas.

    The data size would still increase but you should be able to slow how fast it increases.

  • So with the current method it gives this:

    A = a b b c

    B = b b d b

    C = 2 1 3 2

    For duplicates and such you need to give each Array element a unique number

    A = a1 b1 b2 c1

    B = b1 b2 d1 b3

    C = 2 2 3 3

    But I guess that doesn’t match what you were after. Probably would have to do it in three passes or something.

    1st pass just marks the 1’s

    A = a b b c

    B = b b d b

    C = _ 1 _ _

    2nd pass ignores the 1 matches and marks the 2 matches one by one.

    A = a _ b c

    B = b _ d b

    C = 2 1 _ _

    A = a _ _ c

    B = _ _ d b

    C = 2 1 _ _

    Last pass just marks the remainders as 3

    C = 2 1 3 3

    Implementing that in code is just another step. I don’t have a lot of time for that presently. I’m backlogged.

  • I realize you just want a complete template to use, but I’m sure you could use any number or features to make parts of that game.

    Tilemaps let you place tiles that both serve as collisions and as a visual, so I can see that useful to try to use to do the play area. You can loop over the tiles too. So that’s a plus. Performance would need to be seen though. The rest I’m too lazy to think about atm.

  • So I opened that capx and the only thing I tried to solve in it was a way to slice away chunks of the play area. It was a bit of presumptuous to call it a qix like. I do recall an older capx I made but the forum and a search of my dropbox yielded no results.

    The original qix probably did everything pixel based. Things moved a pixel at a time. It knew if the player was on the edge or inside the play area based on the color of the pixel it was on. The filling of areas was done with a pixel flood fill. And finally the filled percentage was done by counting pixels with a certain value.

    C3 has the canvas plugin that can be used to set and read pixels so that could be leveraged to do that stuff. The problem is with modern resolutions you deal with more pixels so it may not be as performant.

    All my previous attempts tried to do the game in a more modern way such as keeping track of the polygon around the unfilled areas and measuring the distance the player was from the closest edge to those polygons. All which are all slightly involved projects on their own. To top it off some creativity is necessary to utilize constructs available features to achieve that. I typically run out of steam after finding a way to erase chunks of the play area, so most of this is completely unsolved for me.

    To make good clone I think the best starting point would be to make a complete list of all the game rules. Like what is happening, what can you do as a player and what happens. Even something complex should be able to be broken down into simpler parts.

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 155 followers

Connect with R0J0hound