• Content count

  • Joined

  • Last visited

Community Reputation

131 Neutral

About Dragonion

  • Rank
  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. 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. 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. New is SLOW!

    [quote name='Álvaro' timestamp='1354645307' post='5007155'] [quote name='Dragonion' timestamp='1354644568' post='5007148'] However, in referrencing the loop is translated because two external functions (the int constructor and -destructor) are called in each iteration. [/quote] 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. New is SLOW!

    [quote name='KingofNoobs' timestamp='1354539654' post='5006582']Hello all. I just ran the following two functions 100 times each ...[/quote] 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. anyone start with c++ as their first language?

    [quote name='ApochPiQ' timestamp='1336598253' post='4938784']As above, I'm not saying at all that there's nothing to carry over. Just advising heavily against the perspective that syntax is the big thing to get over when coming to C++ for the first time.[/quote] 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. [quote name='ApochPiQ' timestamp='1336598253' post='4938784']Compared to the really important differences between C++ and basically any other language under the sun, I'd say the presence or absence of certain squiggly symbols is really pretty irrelevant.[/quote] What are these really important differences from a newcomer's perspective? [quote name='ApochPiQ' timestamp='1336598253' post='4938784']C# and Java, by the way, are not really what I would consider C-family languages. They use superficially similar syntax in a few notable areas, but they derive very little else from the true heritage of C. This isn't a history lecture thread so I won't bother digging into the genealogy; suffice it to say that Java was originally created with the express purpose of escaping the C legacy in a number of areas. The syntax resemblance to C and C++ (which, I would argue, is basically limited to curly braces and semicolons) was deliberately chosen to psychologically make it feel more familiar to programmers with a C background, but conceptually and semantically they are vastly different beasts. It is precisely this confusion with "oh hey they use the same squiggles" and the idea that "therefore they must be similar languages" that I consider so dangerous.[/quote] 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. anyone start with c++ as their first language?

    [quote name='ApochPiQ' timestamp='1336590124' post='4938726']Saying that you can learn one language easily after another because they have similar syntax is like saying flying a jet is similar to driving a car as long as they're both painted the same color.[/quote] 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. [quote name='ApochPiQ' timestamp='1336590124' post='4938726'][edit] And having seen the results of C# programmers actually [i]believing[/i] the idea you propose here (i.e. that C++ has similar syntax so it must be easy to learn once you know C#), I can honestly say that this is utter insanity. C# (or Java) programmers coming to C++ without [b]expecting[/b] to learn a totally new way of thinking generally write really, really, really, utterly horrible code.[/quote] 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 [i]these[/i] language do indeed use a fundamentally different syntax than both C++ and C#.
  8. anyone start with c++ as their first language?

    [quote name='way2lazy2care' timestamp='1334706811' post='4932324']If you think this is a flame war, then it shows that you haven't been a member of a forum before ;) This is probably the most civil programming language discussion I've seen.[/quote] ROFL [img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img] I would personally recommend downloading [url="http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-csharp-express"]Microsoft Visual C# 2010 Express[/url] (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. [quote name='yannickw' timestamp='1333131740' post='4926749']Could you recommend me some good tutorials or books, pref with some tutorials about create game states, loading models,...[/quote] The [url="http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=6812"]DirectX SDK[/url] 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 [url="http://www.amazon.com/Game-Engine-Architecture-Jason-Gregory/dp/1568814135/ref=sr_1_1?ie=UTF8&qid=1333200124&sr=8-1"]Game Engine Architecture[/url] 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 [url="http://msdn.microsoft.com/en-us/library/windows/desktop/bb174837(v=vs.85).aspx"]X files[/url] 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 [url="http://www.martinreddy.net/gfx/3d/OBJ.spec"]Wavefront OBJ[/url] (supported directly in 3DS) or the [url="https://collada.org"]COLLADA[/url] 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. [quote name='yannickw' timestamp='1333113631' post='4926667']So I just need to catch the WM_TOUCH message and subscribe to the different touch events?[/quote] Yes. [quote name='yannickw' timestamp='1333113631' post='4926667']Which would you recommend, DirectX or OpenGL?[/quote] 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). [quote name='yannickw' timestamp='1333113631' post='4926667']I chose XNA because it's rather high level and makes things a lot easier. We don't have enough time to write all the code for loading models and stuff like that, we'll have enough work trying to get the foil to work properly.[/quote] 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. [quote name='Washu' timestamp='1333096964' post='4926606']The tree structure you would [url="http://en.wikipedia.org/wiki/Abstract_syntax_tree"]want happens to have a name as well[/url][/quote] 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. How to properly organize parts of my "program"?

    As a general rule you should not place classes in a namespace using headers (because that [i]is[/i] actually messy). Instead, I would personally do something like this: [code]// 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[/code] Or, in case of multiple small classes, I would perhaps do like this: [code]// 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[/code]
  14. One solution would be to first [url="http://en.wikipedia.org/wiki/Tokenization"]tokenize[/url] the input line using [url="http://en.wikipedia.org/wiki/Regular_expression"]regular expressions[/url]. This would convert the input string "2 + 2" to a token list like { Value(2), Operator(+), Value(2) }. Next, perform a [url="http://en.wikipedia.org/wiki/Parsing"]syntactic analysis[/url] which identifies and organizes (typically in some [url="http://en.wikipedia.org/wiki/Tree_(data_structure)"]tree structure[/url]) 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).