Game Development Community

Starting with Asteroids...(eventually a tutorial)

by Erik Yuzwa · in Torque Game Engine · 09/08/2004 (5:25 am) · 8 replies

Hey all,

Well usually the first project I target when either learning a new graphics API or game SDK is asteroids...

I finally have some more time now to seriously spend some time on Torque, as that's where I'm hoping to target my indie game ideas..

I've found some resources (by Merv) on doing the 2D stuff, but I'm not really looking to do it that way.

I'm hoping to basically have a stationary camera in a small 3d world. How small? So small it only encapsulates the camera view. :)

I've played with the starter fps scripts to just give myself a skybox along with one object in the scene.

However, I'm trying to figure out how to process collision detection with the camera's viewspace, so that when our asteroid (or player) passes an edge of the viewcone, they appear on the other side of the screen...

Does anyone have any ideas?

I'm also hoping to post this project for other n00bs with Torque, so I'll be definitely documenting on where I'm finding things and who's given me a tip or two...;)

thanks everyone, sorry for the long winded post! :)

About the author

multi-talented game and web developer based in the glacial ice-caps of Calgary, Alberta. I'm versed in C++, and trying out Torque Game Builder Pro. I hope to get to know you, drop me a line and let's chat.


#1
09/08/2004 (9:59 am)
Asteroids Demo
www.melv.may.btinternet.co.uk/garagegames/phasespace/asteroids.jpg
You read my mind; here's an asteroids clone I threw together for fun last week.

- Melv.
#2
09/08/2004 (10:57 am)
NICELY done Melv!

How did you handle world collision with the camera? Any small tips? :)

I love the explosion though..
#3
09/08/2004 (11:19 am)
Erik,

This is T2D.

- Melv.
#4
09/08/2004 (11:57 am)
@Erik
You might want to talk to this guy who started this thread.

Or wait for T2D, as it will definitely rock.
#5
09/08/2004 (12:24 pm)
I have had this kids 3rd - 5th grade math adventure game stuck in my head for a few years now, wanted to-do it
with TGE but felt it was x-treme overkill. Hopped on the reaction engine wagon and was impressed by it, but thought about cross platform (especialy the mac side) and decided it was not a feasable option as well. Now that Melv has kick arse (YET AGAIN!!) with T2E I think my math game will make it from my mind to the computer screen!!

-Ron
#6
09/12/2004 (7:45 pm)
I used the "GodView" camera resource here:
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=3435
And modified it a little to lag behind the player movement. It should be fairly simple to put it at a fixed position.

If you place the camera say, 10 meters above the game surface looking straight down and set the FOV to 90 (default), then the visible area will be +/- 10 meters from the center of the camera. Then you can throw some code in there that says when your ship goes beyond -10 meters, move it to +10 meters. I'm not completely sure what will happen with the view at the corners. You'll have to experiment.
#7
09/22/2004 (7:19 pm)
Thanks man, I'll give that resource a look and try to get some magic going here..:)
#8
09/23/2004 (8:45 am)
Hey, let me know how it goes. I am working on something very similar for the GG documents but we can always use more.

Ben