Game Development Community

A few general questions about the PSK

by Matt Gunter · in TGB Platformer Kit · 12/06/2008 (2:38 pm) · 1 replies

I just have a few questions about why the PSK does certain things the way it does, and then a few questions about how to implement things.

For one, I was wondering why the PSK uses separate images for the level tile maps. Is there a reason to keep all the images separate instead of creating a tile sheet for each type of terrain, like for example having a tile set image for grass terrain and a tile set image for cave, instead of having each piece of the tile set as an individual image?

Another question about tile sets, this time about the actual tile set objects you create when building your level. Is there any specific pro's and con's to creating a new tile layer for each landmass in your level. Like say you had an island and it was created using one tile layer, then a few feet away you had a second island using a second tile layer. Is there a reason to do this over having the entire level covered in a single tile layer and then just filling in the tiles wherever you please, or is it just personal preference?

My final question is about implementing 2-player support into the PSK. So far I have found that very simple to do but I am very new to Torque and programming in general so I'm just wanting to make sure I'm doing things the right way.

Right now to implement 2-player support I simply created a new datablock for the second player. Both players use the normal player behaviors; actor behavior, control, and animation. I have both players as the class PlayerClass. The question I want to know basically is just, with everything setup the way I have it what is the best way in script to call each player individually. Ideally I want to name player one something like player01 and player 2 something like player02. However I don't know how to give the objects a name outside of writing it on the object inside the editor. I was assuming you could define the objects name in the datablock but so far I haven't had any luck doing it that way. Is there a way that I can give each player their own name?

Finally I just want to say that I am very happy with the PSK I think the best thing about it is how fluid the platforming controls are. A lot of platform games suffer from shoddy controls which really ruins the game. It's nice to have something to build off of that has such a good foundation.

Thanks in advance!

About the author

Recent Threads


#1
12/11/2008 (12:04 pm)
Ok! Sorry for the late response, hectic week!

The TGB PSK was more or less a port of the TX PSK, including its art. I never took the time to merge the images to form texture sheets.

I think the pro's to using multiple tilelayers is that you can reuse them later in the level. It also means that you have greater control of how the layers fit together, instead of being forces to have things at X-by-Y unit intervals.

For creating two players, what I would do is omit the spawn points for each player and just create them directly. If you've created a datablock, then all you really need to do is create your two t2dAnimatedSprites, and select the config datablock for that player. There you can also name them Player1 and Player2.

I am glad you are enjoying it!