Game Development Community

So You Want To Make An Arena Shooter

by Darthuvius · in Torque X 2D · 05/05/2010 (10:38 pm) · 26 replies

Hi!

I'm documenting the creation of my game Dungeon Smashers by creating a series of tutorials about how it is made. The tutorials are geared towards people who don't know that much about programming but like to learn things and also want to make a game. In other words me lol!

These tutorials are on googlesites which allow for comments and things. A few people have told me that they have tried TorqueX but just couldn't get into it for one reason or another. "The tutorials are too complex" "The tutorials are boring"

If you have any comments or questions about these tutorials please leave them here or on the tutorials site. I think you need a google account to leave comments on the site. The tutorials are currently a work in progress but they should work as they are.

I would be very interested in creating a set of community tutorials based off of these. Is anyone else interested in making An Arena Shooter and helping to document its creation so that others may as well?

So You Want To Make An Arena Shooter

Page «Previous 1 2
#1
05/13/2010 (7:38 am)
just finished your tutorial , and it was fabulous !
just one problem though with the the sound , you mentioned that you should add a new category for the sound banks , what should I name it ? or the name of the category doesn't have any effect ?
because when I changed the torque settings XML file and enabled the audio
there was still a "Null Pointer Exception "
AudioCategory _sfx =Game.Instance.Engine.SFXDevice.GetCategory("Sounds");
is "Sounds" the name of the category which was in XACT ?

thanks man and keep up the good work!
#2
05/13/2010 (8:17 am)
Thanks for the feedback! I like writing the tutorials. Yes, Sounds is the name of the category you give to your sound effects and Music would be the category you give to your music.

This is helpful if you want to adjust the volume of an entire category. I'll make this more clear in the tutorial.

I used this thread to get help with the sounds,
www.torquepowered.com/community/forums/viewthread/113621

Let me know if you get sound to work.
#3
05/13/2010 (10:14 am)
@Darthuvius...just checked out the tut. Good stuff man...you should write some more of these.

Just wanted to give you props for GraphicsGale. Nice we to use tile maps without using the tile mapping features in TorqueX...which are...broken...to put it lightly.

;)

--RB
#4
05/15/2010 (10:45 am)
the sound works fine now .Thanks again and good luck with your game!
#5
07/23/2010 (7:21 am)
this tute is awesome but i'm getting errors in the Assorted Delegates component the same error for the _orcHitCollisionDelegate and the _ourObject

"The name '_orcHitCollisionDelegate' does not exist in the current context" ditto for _ourObject

did anyone else come across this?
#6
07/23/2010 (6:22 pm)
A great resource. Thank you very much :)
#7
07/23/2010 (7:34 pm)
thanks for the feedback. I've been unable to code for a bit but I will try to finish up these tutorials soon. Probably have to cut some features that I wanted though. I'll look into that error as well.
#8
08/03/2010 (1:43 am)
this is pretty cool I like your tutorial style
#9
08/13/2010 (4:24 pm)
Hi again, regarding that error in the _orcHitCollisionDelegate,

there was a typo in the tutorial 4. When you declare the delegate you need to type,

static T2DOnCollisionDelegate _orcHitCollisionDelegate = OrcHitCollision;

I also "finished" part 5 of the tutorial which deals with arena switching. It might be a little messy though.



#10
08/13/2010 (8:34 pm)
Hi Ben,

You might also want to include this line at the end of the explosion execution in Part 4

explosionSprite.RemoveOnFinished = true;

Otherwise the explosion remains on the screen.
#11
08/13/2010 (8:53 pm)
ah thanks for that, I usually set that flag from within TXB. I probably need to update all of the tutorials and add files at the end of each one. After that I will try to put something together regarding powerups and score.

Update: Tutorials 1-4 have been updated and in particular the Aural delights tutorial has been rewritten to hopefully make it easier to use.

Update:2 Powerups are GO!
#12
09/08/2010 (4:31 am)
I did all the tutorials but hit a wall at (5)Moving On, I'm using the Torque X 2D with the menu so that may be why i messed up, anyone else doing these tutorials with the Menu?

The part i messed up on is taking control of the player as you move him from one room to another, i also have problems moving the walls. any help will be greatly appreciated.
#13
09/08/2010 (7:33 pm)
Hi! Thanks for checking out the tutorials, part 5 probably needs to be clearer. I uploaded new versions of ArenaSwitchComponent.cs and ObjectMoverComponent.cs to the tutorial site. I think there was some bugs.

Arenaswitch and the AnimatedCharacterComponent both have an active flag, but only one should be active at a time. Also when attaching the ArenaSwitchComponent to your player, the pathname should be the name of your blank sceneobjects without the numerical suffix. At the moment you need to actually create all of the arenaswitchobjects, and place them in specific spots.
#14
09/08/2010 (11:02 pm)
i will try the tutorial again and hope it works, I'm pretty sure i did something wrong, still new to XNA and Torque, thanks for you help and keep up the good work, :)
#15
09/09/2010 (5:45 pm)
I was wondering if you could help convert your FireProjectileComponent.cs to fire on use of the right trigger? I have already got the player to rotate with right thumbstick but spent 4hrs trying to figure out the trigger portion. Great tutorial by the way. Less the above mentioned problems, which we are only using one big map now so it dont apply, the process was easy and explained very well for the new guy. Unfortunately others dont have the tutorial writing skills as you so it makes new guys to coding such as myself get lost real fast.
#16
09/09/2010 (6:32 pm)
Hi Doni!

You can change the input map to use whatever button you want, actually the FireProjectileComponent doesn't even need the thumbstick mappings since they are declared in the AnimatedCharacterComponent,

inputMap.BindMove(gamepadId, (int)XGamePadDevice.GamePadObjects.RightTrigger, MoveMapTypes.TriggerDigital, 1);

and then replace the thumbstick code with trigger code,

if ((move.Triggers[1].Value > 0))
             {
               _Fire(_projectileType);
             }

Have you noticed how when you fire the first bullet it always heads to the top of the screen? or at an angle of 0? I'm trying to fix that but for some reason I can't get it to not do that lol.

#17
09/10/2010 (3:41 am)
Hi Darth.

I am working with ol "Spudz" on this shooter. I am trying to help him with some of the coding. It seems it is like the blind leading the blind on this 1. Both of us have very little knowledge of coding but seem to be getting the hang of it. I want to thank you for the tutorial and commenting out allot of your codes so people like me can figure out what everything means.
I am running into 2 problems when i enter the new input code. *1 is that I can't get my keyboard buttons to mount like the trigger.
int gamepadId = InputManager.Instance.FindDevice("gamepad0");

            if (gamepadId >= 0)
            {

                inputMap.BindMove(gamepadId, (int)XGamePadDevice.GamePadObjects.RightTrigger, MoveMapTypes.TriggerDigital, 1);
            }

            int keyboardId = InputManager.Instance.FindDevice("keyboard");

            if (keyboardId >= 0)
            {
                inputMap.BindMove(keyboardId, (int)Keys.Space, MoveMapTypes.Button, 1);
            }
*2 When we hit the trigger to fire we get an error on this code.
//Set the Velocity based on the Component's Owners Rotation
            projectileObj.Physics.Velocity = 100 * T2DVectorUtil.VectorFromAngle(_rotation.Value + i);
            projectileObj.Rotation = _rotation.Value;
We have changed a few things with movement as well so i am not sure if this is what is affecting our fire projectile. We are not using animated sprites, and we are using the _sceneObject.Rotation with the right thumbstick.

If I have not been clear in anyway plz let me know. Once again I am fairly new to coding.

Thank you in advance!!!!
#18
09/11/2010 (4:49 pm)
Any word on this yet? The error we are receiving is a NullReferenceException was unhandled on this line of code:

projectileObj.Physics.Velocity = 100 * T2DVectorUtil.VectorFromAngle(_rotation.Value + i);

#19
09/11/2010 (5:17 pm)
I use "TriggerAnalog" with my left and right trigger mapping.

inputMap.BindMove(gamepadId, (int)XGamePadDevice.GamePadObjects.RightTrigger, MoveMapTypes.TriggerAnalog, 1);

"move.Triggers[1].Value" then gives a float value between 0 and 1 depending on pressure of the trigger.
#20
09/11/2010 (5:47 pm)
Edit: I got it working. Thanks.
Page «Previous 1 2