c++ question

Started by
21 comments, last by GameDev.net 17 years, 7 months ago
hi, I want to know what c++ commands aloow me to do the following 1. Load a 3d object from blender 2. Wrap a texture around a 3d object 3. Load levels I made from blender 4. Load animations made in blender 5. Play animation on an object thanks
Advertisement
Quote:Original post by Handsofmodder
hi, I want to know what c++ commands aloow me to do the following
1. Load a 3d object from blender
2. Wrap a texture around a 3d object
3. Load levels I made from blender
4. Load animations made in blender
5. Play animation on an object
thanks
I'm sorry to tell you there are no such functions :)

C++ is a (relatively) low-level portable programming language; it doesn't know anything (to speak of) about graphics, sound, models, levels, animation, etc.

Each of the above you will either have to implement yourself or (more practically) pull together from different 3rd-party libraries or publically available references and/or source code. For certain kinds of games you can use 'game making' software, and for others you can mod or use an engine such as Torque. One way or another though, you'll probably end up having to do some programming.
First off, you need to figure out what Graphics API you are going to use. SDL, OpenGL, DirectX..etc. Once you have that, search on the net for the exact things you asked for. There will be tutorials. The reason I can't tell you right now is because each of these "commands" you want are not really commands. In fact, they are a huge amount of code, that can be packed into a function. There is no one way to do it. You can download some code and just use it, but I recommend to learn the code, and learn how it works and then to attempt to make your own. Good luck. I use OpenGL, so if you want that, visit NeHe. I forgot the link, search it on Google.
bi-FreeSoftware
Man! Is there any programming languages out there that let you controll 3d objects that people in gaming industies use?

also I haerd about the fopen and fread command. How are those going to help?
from your title I will assume you have some modding experience ...

what you are not realizing is the difference between a programming langauges, and a game-kit / framework / engine.

C++ is a core programming langauge that can be used at the lowest level (writing operating systems and device drivers) or the highest level (configuring adaptable AI behaviors, dynamically composing music, rendering realistic particle systems and physic simulations) ...

But the langauge doesn't PROVIDE any of those functions. Those features are written in a langauge and made available for use. For instance if you install Half-Life 2 and the HF2 SDK, you can load half-life 2 models and scripts and develop half-life 2 mods. Half-life 2 was likely written in C++, but the models, physics, AI, etc are part of Half-Life 2, NOT part of C++. If you buy the $100 Torque engine you can load certain formats of 3D models, and Torque scripts and AI behaviors, the core of which is written and editable in C++, but they are not part of C+, they are part of the Torque game engine. OGRE is a rendering engine, ODE is a physics simulation library / engine.

So a master C++ programmer would know how to read what is happening in an ogre function, but would not necessarily know how to use OGRE to make games.

Starting from nothing, games take multiple people years to make, and just the code for loading a model file would likely takes weeks the first time ... but noone starts from scratch these days, we reserch existing libraries on the internet and download / purchase them to use.

Better questions might be:

1. Which libraries or engines would allow me to load 3D objects from blender, including applying textures, loading levels and animations, and controlling those animations?
2. Where might I find good tutorials on how to use those libraries / engines?
Quote:Original post by Handsofmodder
Man! Is there any programming languages out there that let you controll 3d objects that people in gaming industies use?


C++. Everything you want to do is possible in C++, you will just need to use some 3rd party libraries and...gasp...do some programming. Other than that, python is a very beginner-friendly language (but I don't know what kind of native graphics support it has). Java and Java3D may also be worth looking into. But I think you may be looking more for tools such as Valve's Hammer Editor rather than a programming language.

Quote:
also I haerd about the fopen and fread command. How are those going to help?


fopen and fread are for file i/o, and are somewhat outdated since C++ introduced file streams. No offense, but if you're asking basic questions about file i/o functionality, you are not ready to be doing the things you're asking about; at least, not in C++.
so where can I download the python script engine
Quote:Original post by Xai
from your title I will assume you have some modding experience ...

what you are not realizing is the difference between a programming langauges, and a game-kit / framework / engine.

C++ is a core programming langauge that can be used at the lowest level (writing operating systems and device drivers) or the highest level (configuring adaptable AI behaviors, dynamically composing music, rendering realistic particle systems and physic simulations) ...

But the langauge doesn't PROVIDE any of those functions. Those features are written in a langauge and made available for use. For instance if you install Half-Life 2 and the HF2 SDK, you can load half-life 2 models and scripts and develop half-life 2 mods. Half-life 2 was likely written in C++, but the models, physics, AI, etc are part of Half-Life 2, NOT part of C++. If you buy the $100 Torque engine you can load certain formats of 3D models, and Torque scripts and AI behaviors, the core of which is written and editable in C++, but they are not part of C+, they are part of the Torque game engine. OGRE is a rendering engine, ODE is a physics simulation library / engine.

So a master C++ programmer would know how to read what is happening in an ogre function, but would not necessarily know how to use OGRE to make games.

Starting from nothing, games take multiple people years to make, and just the code for loading a model file would likely takes weeks the first time ... but noone starts from scratch these days, we reserch existing libraries on the internet and download / purchase them to use.

Better questions might be:

1. Which libraries or engines would allow me to load 3D objects from blender, including applying textures, loading levels and animations, and controlling those animations?
2. Where might I find good tutorials on how to use those libraries / engines?


is there any libiaries let my load my blender objects
So I need a libary to export my game models into engines like HL2 SDK. Also where can I download SDK?
Not to sound stupid (altough I do) but what is a blender? I assume it is some kind of 3d graphics drawing program (kinda like paint but not sucky). If I'm wrong you can laugh at me, if I'm right you can still laugh at me. Either way, I probably won't be using one until I learn C++ anyway (QBASIC just sucks, man).

This topic is closed to new replies.

Advertisement