About Store Forum Documentation Contact



Post Reply 
New to C++, Some Questions before I start
Author Message
runewake2 Offline
Member

Post: #1
New to C++, Some Questions before I start
I am new to C++ and have a few questions about the basic syntax of the language.

1. struct : What is it, why do I need it, how do I know what to include in it?

2. Casting : In java I would just do something like (float)12.25 In C it is 12.5f ?

3. Doubles : Do they exist or are they all floats?

4. Classes : Are the c++ files I create the classes/objects or can I create multiple classes within one c++ file?

5. App Name : I can change the name of the App by simply using App.name("New Name");
If so what kind of performance effects does a name change have?

6. "../" : What does this mean? From what I understand it is go up one directory. Am I correct?

7. Assigning a Script to an Object : How is this done? Can I script trees to sway and if so can I attach the script to the tree in World Editor?

8. States : How do they work? If I move from Menu state to Game state and back to Menu will menu be the same as I left it?

9. At the end of struct's : Their is a label. For example, in 07 Game Menu tutorial their is mm, mo and so on. These may be referenced when creating a new object? so mm.create() creates a new object of mm?

10. So with some math functions : I can add any GUI object to a window I want? So for example window += slider; window += button; etc?

11. Positions : Positions of text drawn using D.text is drawn centered at position on screen using range of -1 to 1? If so how can I draw text at an exact pixel location? Do these reanges change if the user is using a different screen resolution (3:4,9:16,10:16)?

12. Render : Each Render step draws only that object? I need a Renderer for each object I want to draw?

As You can see I am a little new to C++, I do however think I know how to program relativly well. I just don't know how to start with Esenthel. Starting with a new engine has always been the most difficult part for me.

Thanks in advance for the help and to Esenthel for this great engine.
11-18-2010 07:01 PM
Find all posts by this user Quote this message in a reply
darkpdx Offline
Member

Post: #2
RE: New to C , Some Questions before I start
On many questionssmile
11-18-2010 07:24 PM
Find all posts by this user Quote this message in a reply
llynx Offline
Member

Post: #3
RE: New to C++, Some Questions before I start
1. http://www.cplusplus.com/doc/tutorial/structures/
2. Yes
3. Yes
4. http://stackoverflow.com/questions/67732...ses-1-file
5. None?
6. Yes, up a dir.
7. Don't think so, I just used animations for tree swaying, as for leaf swaying, you can do this in ME when making trees by selecting the with Leaves, setting a material on it and making it type Leaf, then setting up the stem point from options in material editor.

lazyyyy, have class
11-18-2010 08:02 PM
Find all posts by this user Quote this message in a reply
runewake2 Offline
Member

Post: #4
RE: New to C++, Some Questions before I start
Thanks llynx. Those links were helpful.

Expanding on 6 some more. Do I need to be exact with how many directories I go up? ../../ for up two. or just ../ for up until directory becoes availible? I would assume the first since that makes more sense. I just want to make sure.

Also:
13. If I want to create a space craft that is not effected by gravity like everything else is and I also want it to have soem momentum when it shifts position so it doesn't just stop. How would I do that in EE? In Unity I used a rigidbody and added force while it was moving forward or in any other direction. Is their something that would be equivilant in EE?
11-18-2010 08:31 PM
Find all posts by this user Quote this message in a reply
Tottel Offline
Member

Post: #5
RE: New to C++, Some Questions before I start
../ to go one single directory up.

If you know how to program but you don't know how to work with Esenthel then you're in luck. go through all the tutorials in the (here comes) Tutorials folder and you'll be up to speed in no time. smile
(This post was last modified: 11-18-2010 08:35 PM by Tottel.)
11-18-2010 08:35 PM
Find all posts by this user Quote this message in a reply
runewake2 Offline
Member

Post: #6
RE: New to C++, Some Questions before I start
Ok. Thanks Tottel. I've been messing with the tutorials, They are fairly well documented and easy to understand.

EDIT: I've been reading over the tutorials and have another question.
In Renderer.wire^=Kb.bp(KB_TILDE); What does the ^ mean? I have never seen this before.
This example is from the Tesselation tutorial though I have seen it in other places as well.
(This post was last modified: 11-18-2010 08:54 PM by runewake2.)
11-18-2010 08:46 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #7
RE: New to C++, Some Questions before I start
^ means XOR
it's changing bits (you can google for it)

11. -1..1 is usually for Y range, X range is proportional (can be for example -1.3 .. 1.3, depending on resolution)
both ranges are affected by D.scale

12. no, Render handles rendering of all objects
11-18-2010 09:17 PM
Find all posts by this user Quote this message in a reply
runewake2 Offline
Member

Post: #8
RE: New to C++, Some Questions before I start
OK. Thanks Esenthel, Tottel and Llynx for the help. I guarentee I'll have more later but for now... Thanks.
11-19-2010 06:46 PM
Find all posts by this user Quote this message in a reply
Post Reply