I am trying to make a web game, and before committing to one language, I need to decide weather to use Phaser.js or EaselJS. When looking at Phaser.js, it seems all of the tile maps are front on and flat..... example. Is there a way to make a diagonal tile map on Phaser.js.... example?
Thanks
Related
i'm fairly new to flutter.
The app i'm trying to develop allows the user to create simple shapes that can be transformed (scaled/rotated/translated) but also be able to select the corners and lines, therefore the position of the corners and lines must be known.
The app must also allow for multiple shapes to be present at any one time and each shape can be transformed individually.
I have been trying to use the canvas.drawPath in a customPainter, and can successfully transform
each shape as desired using a matrix4 array, but i'm not sure how to monitor the position of the corners after transformation.
I'd really appreciate any advice as i'm quite stuck on this.
I solved this by using MatrixUtils.transformPoint which returns the new Offset after the transformation.
The complete shape is just a list of Offsets so i just applied the transformPoint for each element using the .forEach.
worked for me.
I have a historical city map that I want to display using Leaflet.
I like to set the coordinates of this image to reflect the real world, e.g so I can click on the image and get the real coordinates.
I guess I can just make it an overlay to a real map, but there must be a better solution just define at what coordinates of the corners of the image.
For this image, the approx real world coordinates is NW: 60.34343, 18.43360, SE: 60.33761, 18.44819
My code, so far, is here:
http://stage1876.xn--regrund-80a.se/example3.html
Any ideas how to proceed? It feels like it there should be an easy way to do this?
Any help would be so appreciated!
EDIT: The implementation (so far) with tiles are optional. I could go for a one image-map as well.
I am making a big open world game where the map is hand drawn.
The dimensions of the map are 12800x3840.
Thus I have made world-tiles 1280x768 ( having 20x12 64x64 tiles )
My initial approach is to draw 9 world-tiles which are around the player. I also want my collision system to work on a tile based approach where i have a 20x12 2 dimension array. Is this the right way?
How do I do this in Unity? What objects do I use?
I used X-UniTMX to very good results on a tile based strategy game I'm working on. First you create the map using Tiled then you can import it using this software.
Tiled:
http://www.mapeditor.org
X-UniTMX:
https://bitbucket.org/Chaoseiro/x-unitmx/wiki/Home
this question applies to any item but in this case I would like to position my image above the map, currently it gets place below the map.
I am new to swift 1.2 so I do not know how to put together an example, any help would be greatly appreciated.
Are you talking about above in X-Y terms or in Z terms? If Z terms, and using interface builder, you can go to editor->Arrange->Bring forward, or just move the image in the relation to the other UI elements, as their order in the below menu defines their Z-order.
Basically, I'm making an iPhone RPG as a little project for myself, I'm using Cocos2d and thus 2D tiled maps. I had planned to do randomly generate the levels for the map, but have realised it may be harder than I think to randomly generate them and keep collidable tiles working.
Is this possible to do, and has anyone done it?
I'm not familiar with tmx file format you are asking about but usually the way you go about generating a map is to start with the physics of the map not the visual representation. Here is two way to do it
(1) Define materials (water, sand, rock)
(2) Define how much of each you want to use in the map (as percentage)
(3) Place material seeds in your map
(4) Grow the seeds by expanding the material in all directions until the space is full
(5) Now define relation between visual tile and material. If it's transition from one material to another or 100% of one material.
(6) Generate your visual representation using material map and relation between materials and art.
...
(3) Fill your map with the materials you defined using the appropriate amount you defined.
(4) Use clustarization algorithm to swap tiles and form islands. (increasing the number of steps of your clustarization algorithm will make fewer but larger islands)
...
(0) There may be some other rules that the map needs to follow like accesability from one area to another. You can start by placing that in your physics map first and not allowing the other algorithms to break it.
Good luck!
Random map generation is possible and is used in many games. Diablo is one of the first games that come to my mind. Don't forget to set proper boundaries for the generation algorithm, however, because it might create a map with impassable locations.