Game Development Community

TX PSK code breakdown

by Sam Pay · in Torque X Platformer Kit · 12/07/2009 (8:14 am) · 5 replies

Hello all

I have been playing around with the PSK for a while now. And i am planning on creating an indie game for release on Xbox live indie games. I’ve managed to switch out the PSK assets and put mine in. One of the issues I am coming up against though is the complexity of the code. Is there something out there that breaks the code down for a numpty (noob) like me. I have gone though the Torque X book and it has made things clear for me, i can now make games using torque X but the source code in the PSK still baffles me. The help files that came with the PSK seems to be aimed towards working with the PSK using torque X and not modifying the code to create my own unique game.

Any help would be appreciated

Thanks

Samuel pay

Lead Designer - Angler Games

About the author

doing a MSc in Software Enterprise and setting up my own Small games company. Currently working on a release for XBL Indie games and PC.


#1
12/08/2009 (12:17 am)
Oh man I'm having the same problem and I'm not even that new to programming (just VERY new to Torque)! In my case though, I can't even seem to put in my own assets---then again, I haven't heavily explored the kit since I just bought it a few days ago!
#2
12/08/2009 (8:13 am)
With regards to getting your assets in to the PSK this is what i did:

- used the platformer demo template(for some reason the Platformer starter game template didnt work and just froze when i edited anything in tourque)

- drag in your source image be it sprite sheet or static sprite into the create panel in torque (torque adds the image into your project library)

- double click on your newly imported image to set the sprites X and Y frames and name your new material something aplicable

- hit the new animation button located in the create panel above the materials pane.

-add your frames in order and choose a frame rate

-then if you choose the actor (ie the little yellow dragon) go into the edit panel. be carful not to choose the spawner. the go do into the components panel and scroll down until you find the PlayerDragonActorComponent. when you found this component you can find the animation sequence for the seperate input methods.

- for example if you have a sprite sheet of your character running then you can just go into PlayerDragonActorComponent and navigate down to the RunAnim, select the dropdown box and change the animation set to your animation name. Then repeat this process for all assets

-just a quick note if it is a static sprite you would obv miss out the animation stages

as i said i have a pretty decent working knowledge of torque. but its just the code that im having issues with. Are you using TorqueX Franco? have you created anything else using just XNA?



#3
12/08/2009 (12:04 pm)
Hey! I'll try that! thanks! And yes, I am using Torque X 2D Pro at the moment. I've done a few small projects with XNA but just for school and personal use (just graduated this June). Now I'm trying my hand at making something worthy of a release. I looked at the platform starter kit that comes with XNA 3.1 and I don't much like the idea of loading tiles via a .txt file. I think it's rather limiting (in addition to it being a pain to edit because I find the code just a little bit disorganized). That's when I started looking at TX2D and the PSK. Now I'm just trying to learn the material first (read John's book twice already).
#4
12/08/2009 (7:28 pm)
yeah i found johns book a great help. And i do agree with regards to the XNA PSK, one of the best features of TX2D is that you can set your collisions bounds with a few clicks of a button making your level easier to make and more interesting.

I think im totaly scrapping my idea of basing my game on the TX PSK and making my game from scratch. I am still going to use some of the source code from the PSK though, but i think im going to organize it in a way i can understand.

As i posted up on the "work" forum i am looking for a coder to work along side me on my project. I am offering £500 (sterling) for the completed project. And i really want a TX2d programmer as i want to use TX to design my levels. email me at Anglersam@gmail.com if you want some more infomation, "thats if you are interested"

#5
12/09/2009 (1:31 am)
I'm actually also thinking about doing the whole thing from scratch on torque and using a few bits from the PSK with logic that I understand.
And I'd gladly program for you but like I said, I'm still learning Torque X and I honestly don't want to waste your time (I'm actually getting the hang of a lot of things but I want to feel as solid on Torque as I feel on pure XNA and C# before I start working with others). Maybe in the future?

On another issue, if you're still looking for any PSK help for TX2D, there are some brief explanations with some pretty useful code bits about it here:
http://tdn.garagegames.com/wiki/TX/PlatformerStarterKit

However, it doesn't seem to give the in-depth code breakdown we seem to look for but it does the trick for a few things (like adding breakable bricks, etc.).

See if you can find any code breakdowns on it and post a link here though! That would be very helpful!

Good luck!