• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

1682 Excellent

About Zahlman

  • Rank
  1. Creating Stepmania gameplay

    What have you tried? What part are you having trouble with? What you're asking is overly broad and can't feasibly be answered as asked.
  2. Create a 4x game

    I have no idea what you mean by "4x".
  3. [quote name='Ravyne' timestamp='1321660363' post='4885457'] Forgive the formatting and wall of text. I don't understand how they adopted third-party software that specializes in this sort of thing, yet is so freaking broken. Trying to fix it only makes it worse. [/quote] I think I fixed it. My suggestion: go to "My Settings" and uncheck "Enable visual (RTE) editor?", and kick it old-school.
  4. [quote name='bennettbugs' timestamp='1321762060' post='4885789'] OH MY GOD... Everything was saved in the .map file as 0x28fc4c... It was when i used the line std::stringstream Buffer; //Put map data/format into buffer std::ofstream Saver<<Buffer; I didnt convert the Buffer into a string before i saved it. DX silly me... Thanks for the help though! [/quote] This is a golden rule: whenever you are debugging your saving and loading routines, [b]verify the actual contents of the actual files[/b]. Use a hex editor to be sure.
  5. overhead of wrapper struct

    I'm moving this because it's clearly not a beginner topic and most beginners are probably better served by being kept away from thinking about this kind of micro-optimization...
  6. The way your logic is written right now, you only actually perform logic on the first note in each sub-vector, and then use the result to decide to clear out the entire vector. That's messy and misleading; do the single check outside the loop. As for the actual looping... you're messing things up by iterating over the vector as you modify it. Elements get shifted down each time through the loop, and the index also increments, with the net effect that you skip every other item. You wouldn't need any of that if you just stored Notes by value in the sub-vector - then you could just .clear() it. Why are you storing pointers? ... Actually, wait, I see what you're trying to do with the 'i-1' bit... you want to get rid of all the elements at the beginning of the vector that match the condition, until the first one that doesn't, yeah? Still way overcomplicating it, and yes, potentially slowing things down (although it honestly shouldn't cause a problem with the number of objects you're talking about). Iterate to find the first element that doesn't match the condition, using an iterator. Then use the vector's erase method to erase an iterator range from the beginning until that point. That way, the elements get shifted down in the vector all at once. Simplify your code. Simple code is easier to debug and easier to optimize (and often implicitly optimized anyway).
  7. Dynamic memory in game

    [quote name='fastcall22' timestamp='1321648758' post='4885393'] [quote name='colinhect' timestamp='1321638131' post='48] I would suggest not using raw arrays in C++ (especially for 2-dimensional arrays). Perhaps try something like this: [/quote] Well, not quite: [code] // 1: Simple 2d array. not contiguous, simple access vector<vector<bool>> vec( size, vector<bool>(size,false) ); vec[2][3] = true; // 2: 2D array as contiguous 1D array, slightly more complex access vector<bool> vec( size*size, false ); vec[size*2 + 3] = true; [/code] [/quote] ... Or you could [b]really[/b] stop reinventing the wheel, and just use boost::multi_array.
  8. "global" is relative. What is meant here seems to be more like "nonlocal", or at least "less local than we might be able to get away with".
  9. too much collision check

    Hold on, here. How many asteroids and bullets are we talking about? Let's make sure we have a good idea what the real problem is before we try to solve it
  10. What online game services are there?

    OP: the people whose "nonsense" you want out of the thread are well-respected, established forum members (including a moderator) who know whereof they speak. Thus far, you have not demonstrated yourself to be any of those things. They have answered your question to the extent that it can meaningfully be answered and explained to you how to ask more useful questions. Your response is to shower them with abuse simply because they do not provide a comprehensive list of what you have in mind so as to supplement the Google search results that you find unsatisfactory for a reason you won't even explain. Oh, and then you submit a report because "the QQers are QQing" explicitly. Guess what? You earned that QQ, and you've earned formal disciplinary action as well. Locked and warned.
  11. Structure functions?

    [quote name='dpadam450' timestamp='1320905680' post='4882426'] First, is this code C or C++. [/quote] It's obviously C++, as many of the features illustrated are not available in C.
  12. Unity Is Unity3D spoiling me?

    There is no such thing as "being spoiled" in this context. Professionals determine and then use the best tool for the job, as measured in minimum expected time to create something that's up to standard. Full stop. You can always go back and learn how to do things at a lower level. This is useful not so much because "you won't always have Unity to fall back on" (going forward, engines are only going to get more powerful, so this would only happen if you got into less powerful platforms such as mobile), but because it exercises your problem-solving skills and your ability to see the "big picture". To that extent, get the most varied education you have time for. Dabble in stuff. Talk to artists (and writers and sound engineers and game designers and producers and even publishers, if you can). The primary use for lower-level stuff is to create more new higher-level stuff. Everything is built in layers in this industry - just like basically any other industry. [url="http://en.wikipedia.org/wiki/I,_Pencil"]Nobody on this planet can make a pencil "from scratch"[/url], and you're worried about being "spoiled" by getting a "head start" on an MMOWTFOMG?
  13. [quote name='quiltkickkiller' timestamp='1320891456' post='4882361'] My point is that you don't need object-oriented programming to perform such a task, such as propelling one given instance on the screen towards another. [/quote] The techniques you have been describing, to the extent that I can make any sense out of them... are perfectly compatible with OO. OO is not about having a lot of classes and following rules out of a textbook for how to hide data members (that isn't even what "encapsulation" really means in the first place). If you want to pick on things like, for example, needless use of accessors and mutators, then do that. Point out the part that's actually complicated; don't just say "it looks like what I think of as "OO" so it must be too complicated". OOP does not require "inheritance" by many definitions, and while it is normal for OOP languages to include the concept of a constructor, the concept of a destructor is actually pretty specific to C++ (where you don't have automatic garbage collection) and other languages that have to interface with C++ APIs. A finalizer is something different again, and also very, very rarely needed. In C++, structs [b]are [/b]classes. They can have member functions, and the only thing the differs is the [b]default [/b]for access protection, which can be overridden. In C#, the picture is similar, except that structs are value types and classes are reference types. Instances of either are still objects, however. You pick the object-type with the semantics that make sense for your problem. Comments cannot solve the problem of fundamentally flawed design, and aren't really relevant to the discussion anyway. Although honestly, this entire mess is irrelevant to the discussion. What you seem not to have understood is that the OP is having trouble understanding the actual algorithms.
  14. ffMPEG VS C++ example

    Closed per OP request.
  15. Question about Managers

    [quote name='jonbonazza' timestamp='1319487933' post='4876457'] Then what exactly is a [i]Manager[/i]?[/quote] The fact that this question can meaningfully be asked is exactly the problem.
  • Advertisement