Jump to content

Mumbles

Members
  • Posts

    691
  • Joined

  • Last visited

Posts posted by Mumbles

  1. Or you just can you two Vector3, with each Z value = 0

    and just give X and Y for these two Vector3

     

    There's no point using a 3 component vector for 2D calculations because the Z will never be used. It's the same reason we don't usually use 4 component vectors for points in 3D space.

    • Upvote 1
  2. Is it plugged into a surge protected outlet socket (or extension board), or do you have an inline surge protector between the power cable and the PSU's input socket? If you have any surge protectors, look for the indicator lights - what do they show? Fault or healthy? Given the green light inside your case, a surge sounds unlikely, which is good as this means you're more likely to be looking for a single (faulty) component rather than replacing the whole lot.

     

     

    Try power supply first, because it's cheaper and easier to replace. Was anyone else at home? Any power surges or spikes reported in the area whilst you were away?

     

     

    Check all of the power cables for your internal devices (and the PSU connectors for the CPU and system fan) are connected properly, a short circuit may prevent the computer from powering.

     

     

    Check power switch. Connect the reset button wires to the point on the motherboard marked for the power button. Now attempt to power your computer by using the reset switch.

     

     

    Most other faults should allow the computer to switch on, and get to the point of giving you beep codes to determine the fault.

  3. Thinking about it, it's probably a better idea to have the "big" function using a Vec16 instead. I assume Vec9 and Vec16 still exist? The only difference would be that if there are more than 4 elements you may wish to print an index number rather than a letter. Also, in case of a Vec9, you may want a new line every 3 elements, and for a Vec16, every 4 elements, just to make it more readable.

  4. Copying and pasting similar functions like this can lead to problems, particularly later when they are more complex. You'd do better to roll them all into a single function, particularly if you want to do more complicated things with your vectors later. This is a general programming thing

     

     

    //Header (Kept the same)
    std::string String(Leadwerks::Vec2 vector);
    std::string String(Leadwerks::Vec3 vector);
    std::string String(Leadwerks::Vec4 vector);

     

     

     

    //CPP (New function added at top. It's not declared in the header, so it's invisible outside this source file)
    std::string VectorToString(vec4 v, int elementCount)
    {
       std::string outputString = "";
       char letters[] = {'X','Y','Z','W'};
       for(unsigned int element = 0; element < elementCount; element += 1)
       {
           outputString += letters[element];
           outputString += ": ";
           outputString += Leadwerks::String(v.a[element]); //I'm hoping the member 'a' was carried over from LE2's vectors, because in for-loops (like this) is where it really shines
           if(element != (elementCount - 1)) outputString += ", "; //If it's not the last element, put a comma after it.
           //Single line if statement, code below (if any) executes as part of the for-loop as normal
       }
       return outputString;
    }
    //Now, this is the only function that manipulates vectors into strings. If you notice a mistake, or want to change the formatting for example, you only rewrite this function, rather than 3 separate functions, Where you might forget one. Or you might typo in one, but not the other two...
    
    std::string String(Vec2 v)
    {
       vec4 tempVec;
       tempVec.x = v.x; tempVec.y = v.y; //We don't care about z or w... The VectorToString function will ignore them because we have passed the elementCount parameter as 2.
       return VectorToString(tempVec,2);
    }
    
    std::string String(Vec3 v)
    {
       vec4 tempVec;
       tempVec.x = v.x; tempVec.y = v.y; tempVec.z = v.z;
       return VectorToString(tempVec,3);
    }
    
    std::string String(Vec4 v)
    {
       return VectorToString(v,4); //We already have a Vec4, no need to create a new one just for purpose
    }

     

    As you see:

    Don't like the comma between the vector components? Take it out.

    Want to put brackets around the whole vector? Do that on either side of the for loop.

     

    Whatever change you want to make, you just make the change to that one function. You don't have to copy the change to the others as well. Copy and paste errors are one of the most frequent you'll come across. Try not to get into the habit of copy and pasting for small (but slightly different) functions, as projects get bigger, they begin to cause you no end of hell...

    • Upvote 1
  5. Your intel HD 4000 is probably the problem. It should work on that (you may need to upgrade your drivers), but there may be a load of rendering bugs. Intel isn't that great when it comes to Open GL, which is what Leadwerks uses. The best intel can offer for graphics is almost as good as a load of doggy doo doo...

  6. -make your game fast, re use libraries and people code

     

    Yeah, because C++ doesn't have like 100 million+ free libraries available to reuse...

     

     

     

    - Fast to learn

     

    So is C++... Both languages are just methods of writing a very long sequence of events that you want the computer to perform. One uses lots of meaningful symbols to reduce how much you have to write, and the other prefers a more "verbal" style of writing that long list...

     

    The symbols are quick to learn, like when you learn numeracy at school, it's very quick to learn what the + sign means. Before long you know that 123+456 means 579. The symbols in C++ are the same, once you've seen them a few times, you know what they mean and how they work...

  7. I use winsock2. I'm happy with the performance but the lack of OO may turn some people away from using it. One thing I'm confident about is that it's built in to the Windows OS, so it's nothing third party and should work flawlessly. Wine handles it perfectly too, but if I wanted to port to native Linux, I'd have to adapt it to Berkeley Sockets and whilst Winsock is designed to mimic Berkeley's commands, some of winsock's commands work differently to Berkeley's and some are totally new.

     

    That would take a bit of learning to work out which functions work the same (like accept) and which work differently (like select)

  8. How many times per second are you checking and updating?

     

    This should have no impact. In my setup I have 1000 physics updates per second, with 25, 40 or 50 "major updates" spaced evenly... It was just as smooth as when I was using 25, 40 or 50 steps per second, but it now produces the same results whatever the update rate is.

     

    My advice to anyone having trouble using the integrated physics engine is, provided you're using the C++ interface, ignore it and use any physics library of your choice. Seriously, the fact I could do it speaks volumes of how easy it is...

  9. You shouldn't need swept collision on the walls because they don't move, thus they can't move too fast fast for accurate collision. You should only enable swept collision on bodies that can reach high velocities (If it can move further than its own length in a single step).

     

    Swept collision should be enabled on as few bodies as possible because it really slows things down. Same goes for "autosleep" but I don't believe that functionality has been exposed to us...

     

     

    Edit: Actually no, that's badly written.

    Enabling swept collision on too many bodies severely degrades performance.

    Disabling autosleep (if it's available) on too many bodies also severely degrades performance.

    • Upvote 1
  10. Rick, are you using swept collision for your character controller? When the frame rate is smooth everything is fine but when it drops below 20 you tend to zoom around so fast you can pass right through the doors and walls etc. At about 30 FPS, I can slide half into the doors but then it slides backwards again.

     

    Also I'm curious as to your timer based movement handling. At about 30 FPS you seem to move at twice the speed you do at 60...

    • Upvote 1
  11. Perhaps the following:

    • Do not set a mass for the object.

     

    No, this makes a body totally immovable. You can't move it and no matter how small it is, if you place it on a train track -- worry about the train... It could be less than 1 mm wide, but if it's got no mass, nothing will move it...

     

    Turn off gravity and apply the "adjusted" (negligible) gravity yourself every frame. It's what you'd have to do if you were using raw, unwrapped Newton.

  12. My take on it has always been, only really C++ does it right. Not everything is an object...

     

    Why have an "engine object"? Fine if you're going to create more than one instance at once, but, I can't really see a reason for it.

     

    My view has always been that engine functions are procedural, and things like sounds and models are objects. Mix and match and get the best of both worlds...

     

     

    The singleton class is a complete oxymoron. Do you ever see "classes" in school with just 1 kid assigned to them?

    • Upvote 1
  13. I don't necessarily know if war has been done to death, but Second World War certainly has. Evil Nazi Germany tries to conquer the world, and the mighty United States saves the day - Yawwwwn... Modern day war is becoming a little saturated too with the likes of Battlefield and Call of Duty, but it's got some time left yet...

     

    I used to love SWAT 3 and 4 because it wasn't all about war, but it was squad based combat. It was an FPS but one of the only real tactical FPS games that have actually been worth playing. You checked the rooms before you entered and then decided which grenades to throw in first, if any. Then you went in and if you'd thrown the right things in, you'd arrest the crims, if not then they'd shoot you, and because you weren't Rambo, you'd lose.

  14. That message is saying that you do not have the Visual Studio 2010 runtime DLLs installed (or you do, but it can't find where they are). To the best of my knowledge, having VS 2012 should make no difference - I'm don't ever remember my VS 2008 installation installing the VS 2005 runtimes for example.

     

    If the Leadwerks 3 installer is supposed to install this, then it probably did (but it probably didn't put it in the right place). Try using the find files utility, and search all your hard drives for this file. If you find it, then place it in the same folder as your Leadwerks 3 executable. Be advised though, that there are probably several missing files though, so when (or if) you find that one, it will probably say the same thing for a slightly different DLL.

     

    If you can't find these DLL files on your computer, and the installer is supposed to install them, then check if your user account has permission to write to the system directories (regular users aren't allowed to do this by default).

    • Upvote 1
  15. You cannot "port" LE Windows to Linux, I don't know if LE currently works on WINE but in that case you'd be ALREADY able, though the LE Linux campaign is to create the native editor and (I suppose) library to build a native game client and not a WINE-compatible. This is a generic software so you don't even need a LE license at all. Isn't this section "Off-topic"? So since this is not showcasing a competitor engine but a sider software related also to game development (but also for any kind of software).... :-)

     

     

    No idea how LE3 works under Wine, but LE 2 always worked fine under Wine. BlitzMax and Code Blocks executables worked more or less every time. Visual Studio executables required the 3 visual studio runtime DLLs to be present (msvcm90.dll msvcp90.dll msvcr90.dll), either in the same directory (preferred), or in Wine's system32 directory, which I believe is usually found in ~/.wine/dosdevices/c:/windows/system32

     

     

    Chances are, any LE 3 project created with VS2010 will need the 2010 version of the DLLs before Wine will even touch it. Most Linux users don't like installing the Visual Studio runtimes.

    • Upvote 1
    • Get an AMD CPU. Dual cores are fine for most gaming. CPUs don't matter as much as GPUs, so just buy something in your price range. I usually get the second-best, because it gives 80% of the performance at 50% of the price.
    • Get an ATI GPU. Something like this will be good:
      http://www.newegg.com/Product/Product.aspx?Item=N82E16814129272

     

    Times might have moved on a bit from when I was last building. I would certainly recommend AMD, but why stick to a dual core? Their quad cores have been excellent from day one unlike Intel's Core 2 Quads that were actually 2 dual cores working side by side. For anyone who's using something newer than XP, you can use all four coes, and even if the game you're playing doesn't need the extra cores, it can still run all the spyware and viruses that people seem to like downloading...

     

    In the past I've always favoured GeForce cards over Radeon cards simply because back in like 2006-2008 both were fairly good at Direct X 9 rendering, but the Radeon was horrible in Open GL rendering. As a community, many of us may remember the early teething problems with LE 2 due to the Radeon cards simply not supporting Open GL 2+ properly. These days though, Radeon cards are serious competitors in the Open GL scene aren't they?

     

    Also, for a restricted budget, would the AMD APUs be a suitable low or mid price option for those who want to play games, but don't need to absolute top notch.

     

    I ask without trying to thread steal, because my AMD 6000+ dual core and the GeForce 8800 GT paired with it are starting to show their age now, but I definitely have a much lower budget than I did when I last upgraded back in 2008... Both of those will probably go to my brother who still plays a bit of LAN stuff with me (Except he uses Windows 2000), he's got an AMD 5400 dual core but his real killer is the GeForce 7300 GS graphics card. He sold out to the 360 in 2008 when I upgraded, so went for a cheaper dual coure CPU and took my GeForce 7300 that I was swapping out for the more powerful 8800...

×
×
  • Create New...