Jump to content
  • Advertisement

Dragonion

Member
  • Content Count

    121
  • Joined

  • Last visited

Community Reputation

131 Neutral

About Dragonion

  • Rank
    Member
  1. Fair enough, I just updated the question (although one could argue that there really is nothing stopping anyone from calling themselves an expert either)
  2. Dragonion

    Feedback on a demo Track! Mixing/Balance

    As for the beginning I guess you could add a few discrete effects here and there although I personally think it sounds pretty good with a simple synth and a few echoing "blobs". As for the kick I guess it's a matter of either boosting the lower freqs a bit with some EQ, finding another sample/VST/RTAS, or perhaps adding an emphasizing bass drum wherever you need some additional punch. The "haha"-break sounds fine imo and I'm sure you can fix the supposed emptiness with some good mastering software like iZotope Ozone 5. That said, I think it's a good idea to let it rest for some days. I know from my own experience that working on the same track too many days in a row tends to kill the enthusiasm.
  3. Dragonion

    Feedback on a demo Track! Mixing/Balance

    I don't know how helpful this is but the mix sounds fine in a regular Razer headset. Good and full atmosphere. The composition is also good although it really isn't a genre I usually listen to. Very creative with all the mouth-generated sounds.
  4. Dragonion

    New is SLOW!

    The int constructor and destructor are trivial and not present in the compiler's output. The two function calls you see are the memory allocation and deallocation. [/quote] True. But for the sake of simplicity I took the liberty of using the words "constructor" and "destructor" as aliases for the entire memory allocation/de-allocation processes they initiate when you use them.
  5. Dragonion

    New is SLOW!

    When using MSVC your code is translated like this: [source lang="plain"]?passing@@YAXH@Z (void __cdecl passing(int)): 00000000: C3 ret ?referrencing@@YAXPAH@Z (void __cdecl referrencing(int *)): 00000010: 56 push esi 00000011: BE 40 42 0F 00 mov esi,0F4240h 00000016: 6A 04 push 4 00000018: E8 00 00 00 00 call ??2@YAPAXI@Z 0000001D: 50 push eax 0000001E: E8 00 00 00 00 call ??3@YAXPAX@Z 00000023: 83 C4 08 add esp,8 00000026: 4E dec esi 00000027: 75 ED jne 00000016 00000029: 5E pop esi 0000002A: C3 ret[/source] As you can see, the first function, [font=courier new,courier,monospace]passing[/font], is reduced to a single [font=courier new,courier,monospace]ret[/font] instruction making it equivalent to this one: [source lang="cpp"]void passing(int j ) { }[/source] In other words, through optimization algorithms the comiler "concludes" (notice the qutation marks because we a talking about a piece of software) that the loop is redundant and removes it entirely from the function body. However, in [font=courier new,courier,monospace]referrencing[/font] the loop is translated because two external functions (the [font=courier new,courier,monospace]int[/font] constructor and -destructor) are called in each iteration. And even though it may seem like this could be optimized out of the loop as well, as soon as you invoke an external function things change quite significantly from a complier's "point of view" because the function's implementation isn't part of your code and is stored in binary form in some library (or object) file on your hard-drive. I hope this answers your question.
  6. Dragonion

    anyone start with c++ as their first language?

    I think you are underestimating the importance of syntax. Not only does it define the concrete building blocks of the language, it is also the first thing newcomers have to learn in order to actually use the language (which -in extension to my original post- is also why learning C# in advance to learning C++ would contribute to a better starting point). That said, I know from my own experience that it's sometimes difficult to view a programming language (or the entire concept of programming for that matter) through the eyes of a newcomer like the OP. For example, try thinking about the difference between two calling conventions like fastcall and stdcall. This is pretty straightforward, right? Well, now imagine that you have a person utterly new to programming in front of you and try explaining it to him/her while keeping in mind that every single time you use a word or topic that he/she would not know as a newcomer (instruction pointer, register, parameter, memory address, stack, binary number ...) you would have to elaborate on this as well. I think this would be a good exercise for you as it would probably make you realize just how much knowledge you take for granted when you have been programming for several years. What are these really important differences from a newcomer's perspective? Well, in addition to curly braces and semicolons I just counted 44 operators in the C++ programming language. Out of these, 39 (88.64%) have the same meaning in Java and the remaining 5 of them are all related to pointers/memory access and does thus not exist in Java. In addition to that, all of the most basic keywords for conditional statements and general control flow (if, else, switch, return, case, for, while, continue, break, do ...) along with the names for primitive data types (char, short, int, long, float, double ...), and the keywords for exception handling (try, catch, throw) have essentially the same meaning in Java. There is a reason I mention all this. First of all, I hope you will agree that C++ (originally called "C With Classes" by the way) belongs to the C family. I don't know if you are familiar with the scripting technology called Lua, but this library is written in what the developers call "Clean C" which means it can be build with both C and C++ compilers. I am pretty sure you wouldn't be able to do this had they not had a very tight connection between them. Now, as my little 'research' concluded Java (and presumably C# as well) obviously inherits much of its syntax from C++ which is why I place them in the same family, although I agree that compared to C++ the relation between Java/C# and C is more like the one between a son and his grandfather. Nevertheless, this relation is based on the syntax. From a different and more historical perspective (specifically how machine code stored on punch-cards evolved to assembly language and later on to high level languages) I totally agree that both Java and C# belong in an utterly different family since they in contrast to C and C++ are interpreted languages.
  7. Dragonion

    anyone start with c++ as their first language?

    I think it varies from person to person and also depends on how much experience they have obtained with the language they started with. When I learned C++ I already had some experience with Java which made it a lot easier for me. For example, I was already familiar with the concept of classes, operators (+ - * / << >>), functions, inheritance, accessors/mutators and a gazillion other things these two languages have in common, and consequently I read my first C++ book a lot faster than if I had not known Java. I never said it would be easy, I said he would have a good starting point (like I had myself, as I described above). Big difference. Besides that, based on the fact that you think C# and C++ are so fundamentally different that claiming it would be beneficial to know one of them when starting out with the other is "utter insanity", I take it your experience with programming languages in general is more or less limited to the C family (C, C++, C#, Java). Try looking up languages like ML or Haskell and I'm pretty sure it will become immediately clear to you that these language do indeed use a fundamentally different syntax than both C++ and C#.
  8. Dragonion

    anyone start with c++ as their first language?

    ROFL I would personally recommend downloading Microsoft Visual C# 2010 Express (it's free) and learn this as your first language. It's extremely user-friendly and you can click on just about anything in your sourcecode to get help and information, even suggestions on how to fix bugs. Besides that the syntax is very similar to C++ so if one day you would like to try out this language you would have a really good starting point.
  9. The DirectX SDK contains a rich set of documents, including a very comprehensive manual and some tutorials to get you started. These have been my own primary source for learning DirectX. I don't know any books specifically aimed at creating game states, but Game Engine Architecture by Jason Gregory has gotten some exceptionally good reviews (I'm planning to read it myself some time in the future). As for loading models DirectX has it's own format called X files which is probably the easiest format to start with since the SDK has build-in functionality for handling these files. Various 3rd party 3DS plug-ins are also available for saving in this format. Alternatively you could export your models as either Wavefront OBJ (supported directly in 3DS) or the COLLADA format (3DS plug-in available). Both of these formats are very popular in the game industry and you can thus find many resources for handling them on the internet. Also there is an entire forum on gamedev.net dedicated to DirectX programming, so ask around whenever you need some advice.
  10. Yes. DirectX. Both API's have advantages/disadvantages, but DirectX is a tad more user friendly/high-level (not to mention a lot bigger) and has many utility functions that makes it easier to work with. A good example is that DirectX has a function for loading a texture directly from a file (D3DXCreateTextureFromFile) while OpenGL can only handle raw pixel data (which means you need some external functionality for interpreting/reading a PNG/BMP image, for example). Well, as a general rule very high level languages tend to decrease development time at the cost of less flexibility.
  11. I haven't worked with XNA myself, but if you use DirectX or OpenGL the WM_TOUCH message will be sent directly to the main window (the one displaying your game), so in this case making the program react to touch input is rather trivial.
  12. Thanks, I haven't worked on a compiler since 1998 so I have admittedly forgotten about many of the data structures used in this branch of programming.
  13. As a general rule you should not place classes in a namespace using headers (because that is actually messy). Instead, I would personally do something like this: // engine_vehicles_car.hpp --==>> namespace MyEngine { namespace Vehicles { class Car { // ... }; } } // <<==-- engine_vehicles_car.hpp // engine_vehicles_motorcycle.hpp --==>> namespace MyEngine { namespace Vehicles { class Motorcycle { // ... }; } } // <<==-- engine_vehicles_motorcycle.hpp // engine_vehicles.hpp --==>> #include "engine_vehicles_car.hpp" #include "engine_vehicles_motorcycle.hpp" // <<==-- engine_vehicles.hpp // myprogram.cpp --==>> #include "engine_vehicles.hpp" using namespace MyEngine; // optional using namespace MyEngine::Vehicles; // optional // <<==-- myprogram.cpp Or, in case of multiple small classes, I would perhaps do like this: // engine_vehicles.hpp --==>> namespace MyEngine { namespace Vehicles { class Car { // ... }; class Motorcycle { // ... }; } } // <<==-- engine_vehicles.hpp // myprogram.cpp --==>> #include "engine_vehicles.hpp" using namespace MyEngine; // optional using namespace MyEngine::Vehicles; // optional // <<==-- myprogram.cpp
  14. One solution would be to first tokenize the input line using regular expressions. This would convert the input string "2 + 2" to a token list like { Value(2), Operator(+), Value(2) }. Next, perform a syntactic analysis which identifies and organizes (typically in some tree structure) the elements that need to be evaluated. Continuing with our "2 + 2" example this would create a tree from the token list with 3 nodes constituting a single addition expression: { Addition(Value(2),Value(2)) }. Lastly, evaluate the tree (or more specifically each node in the tree), which in our example would yield something like Value(4).
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!