Jump to content

  • Log In with Google      Sign In   
  • Create Account

Bregma

Member Since 09 Dec 2005
Offline Last Active Today, 03:26 PM

Posts I've Made

In Topic: Errors that effect a computer's system.

23 August 2016 - 05:03 AM

Here's the most likely scenario a develop will encounter that will damage their computer irreparably.

 

(1) Write a program with a tight infinite loop that taxes the GPU to the maximum of its ability.

(2) Leave the program running on a laptop and go an make a soothing, relaxing mug of chai latte.

(3) Sit down and relax, inhaling the intoxicating aroma from the mug in anticipation.

(4) Pull the laptop on your lap to check how far to completion of the infinite loop has gotten.

(5) Scream in pain and jump to your feet cursing uncontrollably as the heat from the processors sears your sensitive lap flesh with second degree burns.

(6) Spill your sugary sweet and deliciously spiced chai latte all over your laptop keyboard.

(7) Watch as the laptop shuts down, never to boot again.

 

Sure, it's a complex series of steps but it's about the only likely way you;re ever going to fry your computer as a game developer.


In Topic: IFSTREAM: take coordinate from file and convert 3 digit coordinate into integer

23 August 2016 - 04:51 AM

C:\Users\Jeff\Documents\project\main.cpp|60|error: variable 'std::istringstream stream' has initializer but incomplete type

That error message usually means you forgot to include the appropriate library header before using the class.

#include <sstream>

int main()
{
    std::istringstream istr("100 x 300 [1]");

    int x;
    istr >> x;
    // etc....
}

In Topic: Disable Ubuntu shortcuts

15 August 2016 - 09:57 AM

If you're running the Unity 7 shell (sounds like you are), the alt and super keys are grabbed by the gnome-settings-daemon and forearded as necessary when it turns out they're not needed.  If you want to customize your session, you can always modify the upstart files to not start your session daemon.  You will lose a lot of desktop functionality that way, though, so be prepared.

 

Once the keys are sent on by GSD, they get mapped by Compiz.  You can change the default mappings in Compiz using compizconfig-settings-manager (aka CCSM).  You'd want to go through each of the plugins and remap the keys used for each.

 

You could also try grabbing the keys yourself through the X11 protocol.  Other programs do it (for example, Factorio works fine on my desktop and uses the left-alt key successfully).  You're build to end up in a shady place if you handle grabs incorrectly -- eg. on VT switching or program crash.


In Topic: Ide For Linux

10 August 2016 - 05:50 AM

Ah, yes, the vi vs emacs game. It feels good to be back in the 1980s again, Ronald Ray-gun and electropop, skinny ties and lofty hairstyles.  Let's do tar vs. cpio next, that's another good one.


In Topic: Loading Rather Complex Objects Quickly

10 August 2016 - 05:38 AM

JSON is a good alternative to XML - still human readable but less verbose. I strongly recommend against a binary format at this stage. They can be much quicker to load but they will give you a lot of grief during development until your formats and tools are nailed down.

 

QFE

 

Step 1: make it work.  Step 2 (advanced users only): make it work fast.

 

Get your game 'finished' then polish level loading performance.  Until then, benefit from a widely-used well-tested well-supported human-readable format like JSON or YAML.  If your loader is well designed, it's just a matter of substituting one well-tested concrete loader for another at the same interface later on when you no longer need to be manually tweaking levels or debugging your pipeline.


PARTNERS