Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - andrew2110

Pages: [1]
1
Support / How to create a "night time mode" with tk2dtilemap
« on: December 02, 2014, 07:12:02 pm »
Hello all,

Am quite far through writing my game with tk2dtilemap - It's great, but now the artists I work with are trying to make me find a way to enable a night time mode. Just doing a simple overlay on the UI layer made things look darker, but without being able to add lights into the tilemap, it just looks like exactly what it is, an overlay placed on a tilemap.

I would like to attach a way of adding a light to the player, NPC's and some buildings so that they light the surrounding areas, but am pretty certain that this will absolutely ruin performance on mobile devices. Is there any way this can be achieved?



Here's how the tilemap looks at the moment. It's actually made up of two different tilemaps each with 4 layers on them (one for base tiles and another for the maps buildings and trees).

2
Support / Disappearing parts of tilemap in editor
« on: October 14, 2014, 02:42:06 pm »
Hello all,

I'm having some problems with t2kdtilemap. When editing maps it would appear that occasionally whole segments of tiles will just disappear for no reason as shown in this video:

http://www.blueomega.me/Output.mp4

The first disappearance of tiles is from just normal map editing, the second is when I click Edit -> Undo.

Does anyone know what could be the cause of this?

3
Support / Top Down Customizable Avatars
« on: August 26, 2014, 09:57:46 am »
Hello All,

I'm trying to find the best way to create a customizable Top-down perspective avatar.



Here's our current avatar. It's just a plain sprite sheet at the moment with a different set of frames for each direction.

The original version of our game which was written a few years ago was done in Flash. We achieved customizable avatars by having hundreds of animated movie clips for each different piece of clothing / hair style / accessory etc.. And when the user changed anything, we generated the new sprite sheet from the new set of movie clips. This felt like a horrible way of doing it, but at least in terms of file size, it was ok because it used flash motion tweens to move everything around.

"Attach Points" seems to be the feature I need to understand to be able to get working with this. Are there any examples of anything similar to this that I could look into? I guess I'm really just looking for a push in the right direction.


4
Support / Clamping tk2dCamera to the bounds of a tk2dTilemap
« on: July 24, 2014, 02:26:00 pm »
As the title suggests, I'm looking for a way to clamp the position of my camera so it never leaves the bounds of the tile map. At present, the game follows around an avatar but when the avatar reaches the edges of the map obviously you can see off the side of the tilemap.

It's because of a lack of understanding over everything I'm having some issues of this. Through trial and error I worked out that to get the current tile my avatar is occupying I had to do:

int tileX = (int) (pos.x/2.5);
int tileY = (int) (pos.y/2.5);

This works ok, I'd be happier if I knew why I divided by 2.5 to get the current tileX and tileY. My tile size in pixels is 80 x 80, the cameras orthographic size is 10, zoom factor 1. I can't quite figure out from those numbers where the 2.5 comes from, but if I manually move my avatar to tile 64x64 and observe its X,Y position, I divide that number by 2.5 to get to 64,64

With that in mind, I started trying to clamp the camera to the bounds of the tilemap with:

camPos.x =  Mathf.Clamp(camPos.x, 0.0f+(Screen.width/2*(1/this.globalCamera.orthographicSize)*(1/2.5f)), 2.5f*(this.explorer.tileMap.width-1) );
camPos.y =  Mathf.Clamp(camPos.y, 0.0f+(Screen.height/2*(1/this.globalCamera.orthographicSize)*(1/2.5f)), 2.5f*(this.explorer.tileMap.height-1) );

(trying to restrict from going too far left, too far down to start off with). Any advice anyone could offer would be greatly appreciated!
      


Pages: [1]