Game Development Community

A C++ "Hello World" example

by theraptorlightly · in Torque Game Engine · 02/28/2002 (9:31 pm) · 7 replies

I just starting looking at Torque today, and it strikes me that most of the examples are script based except for the momumental demo, which is way too complex to serve as an in troduction to the engine. Are there any demos which show how to open a window and maybe just display an object in C++? It would be good to have something like thit to get started with.

#1
02/28/2002 (9:38 pm)
That really wouldn't do much to help you understand the engine. Your best bet is to download some of the many tutorials (or do them if there's a step-by-step tutorial)

They'll help you understand scripting and some of the c++ code used. A hello world program won't do much but teach you how to print "hello world" :P

I learned what I learned by looking at most everything in the source, and looking through all code provided by the community... even if I won't use it.
#2
02/28/2002 (10:33 pm)
I dunno, I think the demo while complex, is relatively simple for it being a demo of a fairly complex application.

Best thing is to rip it, the demo that is, apart and put it back together again and then you'll understand much better what its doing, find place to improve on it, etc. I think the demo does fine as a "Hello World" app.
#3
03/01/2002 (3:24 pm)
Yep, it's how I learned so much about how the engine works. Look at the source, mess with the source and alter variables (but make backups! hehe) Try adding a GUI control object, and altering the player's speed or add a field to a shapebase object.

It's all there, and for the most part well-documented! LEARN!
#4
03/16/2002 (11:41 pm)
I've got to chime in and say I believe some smaller more focused samples would be useful as well.

The current demo is great, assuming you want to build a game similar to Tribes 2. However, if your game is significantly different in operation, it would be nice to start from something smaller -- an object loader/viewer (Thor's example) with a simple GUI interface would actually be quite cool, just to give a better idea of where the game 'engine' stops and the 'demo game' begins (I've been messing with torque for about a day now, and where this split occurs is still not clear to me in every situation).

In any case, this isn't a sticking point for me, I'm working through learning about the engine for use with the game my team is developing now (which is not an FPS, nor an RTS with FPS elements)... but things could be a lot easier, IMO, with many smaller more-focused demos instead of one large demo which is very complete, but in its completeness winds up biased to a certain game type. And, time permitting (read: 'maybe'), once I figure out how to break everything down and start from the bottom up myself I will attempt to make a couple such demos available to others to save them the hassle.
#5
03/17/2002 (2:06 am)
The demo is a great way to learn how to do most things relating to a game that involves 3d movement.

Genre or type... it really isn't limited by the demo itself.

What kind of game are you going for? Only game I can think of is the more "standard" puzzle game like Tetris.

I'm not making a FPS either, but from what I've learned in the demo I know where to get going with pretty much any game genre.

The demo shows:

1. Movement in 3d
2. Animation sequences and threads
3. Items (weapons and otherwise)
4. Level (interior, water, sky, terrain)
5. GUI (simple elements)
6. Basic scoring system
7. Spawning of players
8. Simple camera stuff

If you give a hint on the genre of the game you're going for, and why the demo doesn't work for you as a learning tool then I might be able to help. I enjoy writing tutorials, and like to find interesting stuff for the newsletter. So give us some more details, or else your complaints will only be complaints.
#6
03/17/2002 (3:36 pm)
I didn't say the demo doesn't work as a learning tool.
My argument is that it is far less efficient of a learning tool than many smaller, focused demos would be for me personally, based on the way I tend to go about learning new systems.

In any case, there's no right or wrong answer here -- some people prefer to have a complete and working demo to start from so they can get immediate results, while some would rather be able to create their own design and add feature from the engine to it as needed in a manner that works well with their custom design.

I don't feel that either of these approaches is any way more valid, but it would be nice if the engine SDK also (in addition to the current demo) included lots of smaller more-focused demos for the second type of people (myself included).
#7
03/20/2002 (9:14 am)
I was wondering last night if someone could put together a skeleton application. Basically a cut down version that loads a map, loads a very basic mission and sets up the camera and lets you zoom around the map with the camera.

My (*cough*) game doesn't need player animations, or anything like that.