#### Archived

This topic is now archived and is closed to further replies.

# Internet source code question (edit - question on torque)

This topic is 5062 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi I have found a few projects that look interesting on source forge, I download them but i never know what I am meant to do! whenever i write a program i simply run it, save the source, open source, edit, thats about it, i have never publicaly released anything. I have just downloaded the source code to a few things, and in the folder there are a few files that description is "visual studio workspace" or similar. When i run and try to compile, it usualyl comes up with build errors. What am i doing wrong? Thanks [edited by - wilhil on April 12, 2004 9:54:49 PM]

##### Share on other sites
You''re probably missing libraries or some setup, usually there are readme files, or directions somewhere. Are there any projects in particular you have questions about, that may be easier for people to help with that just asking about using things off of SF in general.

##### Share on other sites
going back to this post i made...

I think i said somewhere in another post I am not a very experianced c++ programmer. I love programming but i am not the best! I mainly just specialise on visual basic and vbscript on asp, but i really want to move to c++

I really want to start programming games instead of just boring web pages! and following loads of advice i purchased the cheapest version of the torque engine. my last job paid off really well and I have a little bit of money to waiste so i thoguth what have i got to loose!

anyway, all I have is loads of diffrent files, source code and everything... I was wondering if there is anyone else here who has bought the torque engine can help me out?

basically i have no clue to as what i am doing! all i tried is opening the workspace files and click build... nothing happend had errors!

I have got the torque files. I have got Microsoft visual studio .net 2003 Enterprise Archtiect, and thats it! no sdks yet or anything installed. I was wondering is there any torque fan sites to help new users, or is there anyone here that can giveme a step by step guide as to make the most simplestof projects?

c++ isso much harder than i thought it would be to learn! for vb all i did was downloaded complied programs, change little bits and learn... I learnt how to do loads in avery little time, but c++ seems so much harder! I do exactly the same thing, download source codes, but when i open and build, i have no idea how to use it.

Sorry if i keep repeating points and stuff, it is 2:51am here, and i am tired!

see you later.

Wil

##### Share on other sites
No, dude, don''t do that...

You''ll waste your money getting an engine if you don''t even know the basics of C/C++ first.

Start by the cheap and easy stuff. Hello world, for one, is a good example. Learn Win32 API. Then move on to the GDI; make a Tetris clone. Then get SDL and write your own basic engine.

Until you''re somewhat comfortable with C/C++, don''t move on to game programming. Until you''re somewhat comfortable with game programming, don''t move on to using engines you don''t understand.

##### Share on other sites
What did you expect of the source code you downloaded? When you say "nothing happened" - and that can''t be true; at the very least you should get an error notification or a build error - what were you expecting, and what exactly happened?

Since you don''t know C++ at all, do you really think that dealing with complex 3D graphics technology is appropriate for you?

Calm down. C++ is a complex, difficult language that takes time to learn and has a steep learning curve. You need to understand the language, the build process and the tools you''re using before you can be productive. Visual Basic has only one set of tools (with C++ there are as many as there are vendors), so everything works a lot more seamlessly.

I''d recommend starting from the top.

##### Share on other sites
honestly i know this was a big step, but i am fed up of getting flamed all the time for people saying buy this,get that e.t.c.

I just got paid for the last job, and as i said i am extremly happy, it was loads and i bought loads of things that i have been wanting for years such as a msdn universal sub, the torque engine and if there is anything else i dont mind getting it, I am a fast learner with nothing to do, and I thoguht ratherthan tip toeing around, I could get a propour 3d engine that is good and successfull and learn from that.

any way,I had no ideawhat i was doing, i just clicked on a file that said visual studio workspace, clicked build and it said build errors,so i have just left it,I will learn it a bit later. I was just wondering ifyou cantruin the files directly, what am i meant to do with it,how do i make a game! (i know that is jumping a little!)

anywa,y going to bed now, see you all later

##### Share on other sites
quote:
Original post by wilhil
honestly i know this was a big step, but i am fed up of getting flamed all the time for people saying buy this,get that e.t.c.
So?

You can be fed up all you want. You did a stupid thing: You jumped in with no clue. Just because you "know" you "need" C++ to make top-quality games (not true), and you "know" you "need" Microsoft Visual Studio/C++ to build them (not true) doesn''t mean that you should get right to it now. If you wanted to build a tree house, would you just run to Home Depot (or whatever you have in the UK) and get planks of wood, a couple of Craftsman tools and hop in the backyard?

One of the ironic tragedies of software development is that anybody can get the tools, and that they don''t come with warnings. We don''t give blowtorches to neophyte welders; why do we put compilers, assemblers, debuggers and disassemblers in the hands of newbies?

Read a book, wilhil! Suffer! Endure! This knowledge doesn''t come cheap, and it doesn''t come without experience, and, above all, it doesn''t care how you feel. You bought MSDN Universal Subscription; have you read the terabytes of documentation it gives you access to? Does it overwhelm you? Does the thought cross your mind that maybe this wasn''t such a good idea?

If you''ve never programmed a game (your previous experience was in web pages/applications and VB form applications), you can''t just jump into it. Read the link I gave you; there''s a section there for people who''ve programmed before. If you''re not willing to put in the work, to take the time to learn properly, well, you''ll have to get used to being "flamed" (btw nobody flamed you, as far as I can tell).

Games are complex pieces of software, and C++ is a complex language. Trying to learn how to program games in C++, all at once, is an exponentially more complex task.

quote:
any way,I had no ideawhat i was doing, i just clicked on a file that said visual studio workspace, clicked build and it said build errors...
What were the build errors? What were the error numbers (eg C1066, LNK2001, etc)? If you want an answer to your question, you have to ask a good question!

quote:
I was just wondering if you can''t run the files directly, what am i meant to do with it...?
You never run source code. You build it into the target, which can be of various types. If it''s an executable, then you can run it; if it''s a static library, then it must be combined with other code in specific ways to yield an executable; if it''s a dynamic link library, it must be invoked by executing code in specific ways at specific times to yield runtime effects; if it''s a "control", it''s basically the same as a dynamic link library, but the nature of the runtime effect is more narrowly defined. And so on.

There''s a reason people recommend starting at the beginning: there are many foundational issues which you must understand to be able to not only program effectively, but also learn to program (more) effectively.

##### Share on other sites
I have to agree with Oluseyi: you''re jumping into this WAY too fast.

This is going to sound very negative, but with your current attitude, you''ll probably never code a game. Slow down, take it step by step.

##### Share on other sites
I just wanted to remind you that as a Torque Engine license holder, you now have access to more online documentation and several extra forums at GarageGames.

I don''t use Visual Studio myself, but I have seen several threads about it there. Browsing through them to find posts containing similar error messages to those you''re getting should help (assuming someone answered the question of course).

##### Share on other sites
Hi

Ok, I have made the hello world example, I have done a couple of little things. I want to move on now, And I have bought a couple of books.

Ok fine, I did jump the gun purchasing torque, but as i said, I dont really care if i have to buy loads of things i dont use, if it means I get to learn c++ it will be a bargain!

I have been looking up direct x sdk, but there are so many diffrent versions, and from msdn, there are so many updates, diffrent sdk''s "extras"... I have no idea what I should get!

I was wondering if someone could tell me what ones should i download?

also if anyone can tell me of any other sdks i should get.

not needed but - I remember ages ago downloading a sdk that allowed me to build images of pocket and handheld pcs, such as microsoft smart phoes, ip phones, tv boxes, and so many other things. It was called the microsoft windows ce emulation edition or sometihng like that. I have been looking onine for ages andfound somethingsimilar, but I can not find the exact thing and was wondering if anyone knew what i am talking about, could they give me a link?

and finally i was wondering how does the offline msdn library thati am using compare with the online one? I thought the offline one was meant to be as good, but when i was trying to look up direct x, it looks ike there is tons more stuff online.

I appreciate all the help i have been getting and thank you even if they are bad replys saying i am going to fast, I like critosisms rather than flames that just serve no purpose other than to annoy people!

William

##### Share on other sites
Download the latest DirectX SDK. It will let you use older versions. I Got a book called ''Windows Game Programming For Dummies'' by André LaMothe. It takes you through windows programming, and then eventually 2d game programming under directX seven (which you can still use with DX9, the latest). Take your time.

The true general first seeks victory, then seeks battle
- Sun Tzu

##### Share on other sites
The Torque Engine - which I assume you''d ultimately like to get to grips with - uses OpenGL and OpenAL rather than DirectX, as they can be used on Windows, Linux and Mac platforms (DirectX is Windows only).

Most compilers include all necessary OpenGL libraries, although Visual Studio is likely to be different, being made by Microsoft.

When I compiled Torque for the first time in Win98, all I needed was MingW and MSYS, both of which are available to download free of charge.

Okay, it might be a little scary for a complete novice to use the command line, but there are IDEs available for GCC (which generally comes with MingW).

##### Share on other sites
Thank you, ifyou could give links and step by step guides, it would be helpful. But i will do my best to look up what you said.

##### Share on other sites
this is the fastest newb yet, lol.

no offense meant, i think you should put away the torque engine at least for a few months while you get familiar with your compiler, how it works, and learn the meaning of downloading libraries and getting them to work with microsoft visual C++. If you have Microsoft Visual C++, to set libraries you press Alt-P, which accesses the Project Options. Go to linker tab, and add the appropriate libraries (for example, if you''re using OpenGL, add: opengl32.lib, glu32.lib, etc) or for directx: d3dx9.lib, d3d9.lib, dxguid.lib, etc.

I HIGHLY Suggest getting Tricks of the Windows Game Programming Gurus (affectionately known as TOTWGPG here at gamedev ). It is like a tome for newbies I know, and it IS really useful, it helped me get started game programming.

Start from the beginning...have a torque engine in the hands of a newb is like putting a gun in the hands of a kid. You might ruin the torque engine inadvertenly if you don''t know what you''re doing. Leading to my next point, back up the torque engine - i''m assuming people download it, i''m not sure, i''ve never used it :-).

Start small, since I see you''ve had some programming experience, you learn C++ at a faster rate than most, and then dive in programming small games like Tetris of Galaga. My first game was Pong, followed by Breakout, then Asteroids, (yes I''m an Atari fanboy ), and then a little RPG. Now I''m working on a full fledged RPG. See how I''m progressing? I don''t immediately code a First Person Shooter (although I tried, heh, don''t follow me in that step, I failed horribly), I started with Pong. So try something like that.

Good luck,
Cipher

##### Share on other sites
ok right from the beggining, what should i do.. new project, and then what shall i choose? when i did my hello world project i did win32. I have heard so many people saying about mfc applications, and I was wondering what is the diffrence and what shall i choose?

##### Share on other sites
ok, MFC is a library microsoft created to simplify and help developers create GUI (Graphical User Interface) applications. It is usually used by game developers to create game editors (such as Worldcraft, 3ds max, etc). Most applications you use are MFC - based. MFC is good for creating GUI applications quickly, but not suited for any actual game, as it takes up a lot of memory.

so anyways, start off with Win32 Console Application. I suggest start writing programs as you learn the major concepts of C++, such as writing a class application, and inheritance application. Save these, you might want to refer to them later on, when you bring all these concepts together into a game. I suggest buying a decent C++ book. Since I don''t have any C++ books, I can''t really recommend any, perhaps people around here can help?

After learning C++, try learning DirectDraw, or if you want to delve into 3D right away, start with Direct3D. There''s a lot of tutorials around here.

If you want to get started learning OpenGL (I suggest this because you''re using the Torque engine), here''s the famous NeHe site:
Nehe

As you browse through gamedev for a few months, you''ll start visiting sites regularly, such as NeHe''s.

However, I know a lot of people will suggest SDL (LibSDL.org), because it is a very easy-to-use library that provides for 2d drawing, sound, input, and generally allows for newbies to make games without mucking around with OpenGL or DirectX. I''ve used SDL before, and I can say using it would be beneficial to you, but I still recommend going straight into OpenGL, seeing that you want to work with the Torque Engine pretty quickly.

Anyways, that exhausts my time for now. Ciao.

##### Share on other sites
Alright, a little example of a error is as follows

went in to any Visual studio workspace, clicked on the play button, and i got loads of build errors. I copied it this time!

d:\space\torque\tools\map2dif\main.cc(21): fatal error C1083: Cannot open include file: ''tools/morian/tokenizer.h'': No such file or directory

The file is there, and i have no idea what is wrong. As i said I think i will put torque on hold for ages, maybe not even use it! I just cant figuerout how to use it! no idea how to include it and when i do, how to do it. there are sample files but wheneveri try and build them, i just get errors such as above... im so bored of trying to do it! but i dont want to give up!

see you later, wil

##### Share on other sites
i think you may have to modify the #include line to ..\morian\tokenizer.h.

##### Share on other sites

I know for a fact that there is documentation on how to get TGE compiling under .Net2k3 and also a few threads on the subject as well.

Not to say anything bad about these forums, as the answers you are getting are quite correct in an overall sense for your problems, they aren''t answering your TGE question whereas the GG forums and site which contains all the documentation for the product you purchased (and told you so in the email giving the download info) are more appropriate for your specific question.

##### Share on other sites
Ok, you jumped in WAY TOO FAST!!! Do you really expect to make an awesome game like Halflife, unless you hire like 50 people anyways if your doing win32.. I hope you don't expect that:
#include <iostream>main(){  cout << "Hello World!\n";  return 0;}

will be that easy to make a game... start off with making a text based game, maybe an rpg and see if you like it, because believe me, if you can't make an rpg in text(console) then you surely can't make an advanced 3D game and in a matter of weeks!!!!

[edited by - snyp on April 13, 2004 9:36:49 PM]

##### Share on other sites
lol i dont want to build halflife!

I want to build a space flying mmorpg game.... LOL

I am being serious though, I dont care if it will take me years! or if it looks crappy, but when I have finished doing all noob programs and examples I want to start working on this! as i said, i know it is jumping the gun! but i dont see why i cant try and do it!

##### Share on other sites
I think you''re going to need to decide on what you want to concentrate on first .

You don''t need to know C++ in order to use TGE in it''s default configuration, you just need to know how to compile it. You can customise the example (FPS) game fairly extensively using the C like script commands which are built in, and/or the various third party tools.

As has been already mentioned, the best place to find out the details of that is the Garage Games site.

You might also want to check out the Realm Wars project at some point, as that is being created using TGE.

Once you have a feel for which aspects can be used as-is and which need adding or modifying, you can then edit the C++ source code and recompile.

This is probably the point at which you''d want to learn C++ and perhaps a little OpenGL as you''d then have a little more insight into which areas you want to concentrate on learning.

If you''d rather learn about game design, C++, the Win32 API, or OpenGL first, then the resource section of this site would be the best place to start looking.

The latter two subjects are only really useful if you already know a little programing first though, as otherwise it''s a little difficult to experiment with them.