Game Development Community

Puzzle-style game question

by Mike Berg · in Torque Game Engine · 08/18/2004 (8:55 am) · 7 replies

I'm just starting with Torque (going through Finney's book now), but want to know if some of the things I'm thinking of are possible:

I want to make a puzzle-style game, with an essentially 2D grid map, overhead view.

1. Is it possible to have objects as a part of the map that can be moved around and interacted with?
2. Is it possible to have "terrain" tiles that affect movement of the character, etc?
3. Is it possible to allow the user to interact with the terrain tiles to change them, and how they affect the character?
4. Would QuArk still be the tool of choice for creating these types of maps?

Sorry for all the questions. I'm not looking for sample code or anything... a simple "yes, it's possible" will be encouraging to me, and a nudge in the right direction would be an added bonus.

Thanks!
-Mike

#1
08/18/2004 (9:19 am)
You should probably checkout the work Melv May is doing on Torque2D.

Also there is a resource for atic tac toe game that might get you started.
#2
08/18/2004 (11:30 am)
1. If you mean click with mouse and move, the mission editor supports this (click on object and drag), so it would be a little bit of work to get it going in regular game mode, but not much. That would require source code changes. There's probably a clever way to script it, too, but I'm not sure.

2. You can "paint" the terrain with different textures, and you can check to see what texture the player is standing over. That way you can change the way the player behaves. I believe there is a resource on this. Try searching for "terrain texture" in resources and other places.

3. Again, it's in the mission editor, so you'd have to look at that code.

4. If you're modifying terrain, no. The mission editor is the only tool to use to modify terrain. Quark is only used for making buildings or static objects with complex collision, or a static object with animatable lightmaps.
#3
08/18/2004 (11:48 am)
Eustacia, thanks for the info, will definitely check out the tictactoe tutorial. looks like it'll be helpful. As for 2D, I don't want to create a 2D game, I still want it to feel like a 3D game, just with an overhead camera.

John, thanks for the details.
How about picking an object up, storing it in a player inventory, then being able to place it somewhere else? For example, a block that (when placed) has collision detection, can be destroyed, etc. Would it be easier to somehow store these as Objects on the map, rather than make them part of the map itself? Am I talking nonsense?
#4
08/18/2004 (7:33 pm)
Mike,

I'm reaching the borders of my knowledge on this subject, but what you are talking about is correct. You would create these items either in Quark or (more likely) a general 3d modeling program (i.e. 3DSMax, Maya, Blender, Milkshape). There is an Item class of objects that can be picked up (by running over them) and put into inventory. This is fucntioning wonderfully in the default engine setup. There is also a throw function for these Items, but I'm not sure if/how well it works. I believe collision works for items (you make the collision mesh in the 3d modeling prog), but they are not generally destroyable. You would have to add variables for object "health" and properly destroy it when done. The particle/debris system can give you decent "destroying" effects, but that must be done yourself, and you must provide the art assets. There has been talk on the forums of having a "damaged" state for objects, especially vehicles. You might do a search for "destroy" or "damage".

My advice in learning Torque (it's huge) would be to pick something very very small and add it. Substitute an ammo clip or crossbow for your "block" and see if you can get your guy to throw it or drop it in a specific place. Then work on destroying such an object. Then maybe get the camera to go top-down (there's an advanced camera resource). Then click on items to pick them up or drop them (there's also a resource for this... object selection I think). Then try to destroy them. Do these one step at a time. Scripting is amazingly powerful... you can do a ton with it, so start by researching to see if it can be done in script. You won't have to change a huge amount of engine code to do the things you want to. Basically you'll need to change the camera, object selection, and damaging/destroying (collision is already there). Everything else should be possible in script.
#5
08/19/2004 (4:35 am)
If you add the object selection resource, becareful about which items you test it with. Some of the items that come with torque won't select. But if you create your own object, with bounds and collision meshes you should be fine.

I also recommend the advanced camera resource it is very good addition to torque.

Here's a resource on Moveable, Destroyable, Mission Aware Items.
#6
08/19/2004 (4:57 am)
Thank you both so much! This is very encouraging. I was really hoping to be able to do it all in script, rather than tinker with Torque itself.

The moveable and destroyable items looks to be the ticket for me. I will explore this more as I get into it. I'm still working through the Finney book to get a grasp on Torque. I'm not even a programmer, so it might be slow going! Lucky for me I have a willing programmer friend to help me out, and a forum full of helpful people! Thanks guys!
#7
08/31/2004 (11:36 am)
For those interested, the discussion about changing the way a player behaves when on different types of terrain, head on over to the Terrain Discussion Forum for this great posting on it.