Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 19 Aug 2002
Online Last Active Today, 11:57 AM

#5285521 I am beginning to hate the IT and gaming industry (Part 2)

Posted by Nypyren on 06 April 2016 - 07:52 PM

...I'm trying to find out what I'm doing wrong...

We need to know what your interviewers, coworkers, and managers see when they see you.

Things that go through the employer's mind in rough order of precedence:

- Need: Are your skills/knowledge something the company requires?
- Investment: Are your skills worth what the employer pays you?
- Competitive Ability: How does your motivation, speed, and correctness compare to others?
- Competitive Knowledge: How does your domain-specific knowledge compare to others?
- Team Fit: How well do you communicate? Do you get along well with others?

Good companies will try to give employees periodic reviews to let them know which areas they think need improved. Interviewees almost never get this kind of feedback, though.

How have your periodic reviews gone? I don't recall seeing you ever mention them.

#5285453 If statements are all you need

Posted by Nypyren on 06 April 2016 - 11:24 AM

At first I thought it would just be if statements instead of other control flow techniques. But no, it's much worse than that.

if (printHPMax - 90 >= 0)
    hpTen = 9;
else if (printHPMax - 80 >= 0)
    hpTen = 8;
else if (printHPMax - 70 >= 0)
    hpTen = 7;
else if (printHPMax - 60 >= 0)
    hpTen = 6;
else if (printHPMax - 50 >= 0)
    hpTen = 5;
else if (printHPMax - 40 >= 0)
    hpTen = 4;
else if (printHPMax - 30 >= 0)
    hpTen = 3;
else if (printHPMax - 20 >= 0)
    hpTen = 2;
else if (printHPMax - 10 >= 0)
    hpTen = 1;
else if (printHPMax - 10 < 0)
    hpTen = 0;

#5285098 Currently perusing a Computer Science degree, but I think I may be on the wro...

Posted by Nypyren on 04 April 2016 - 02:38 PM

I find that I am very bored/uninterested in my programming courses. I only really care about programming games but not so much anything else. I feel as though the Computer Science BS is not for me and I'm not sure where to turn. Just wanted to put this out there and get some thoughts.

That's just how programming is; mostly boring with very few naturally interesting parts. It's a kind of masochism; you have to embrace the boring stuff in order to MAKE it interesting.

#5284647 Dealing with unstable contractors?

Posted by Nypyren on 01 April 2016 - 02:18 PM

Based on the text, the other person is not a native English speaker, and is using machine translation to write their response. You probably had a breakdown in understanding due to this.

Forget unstable attitude; I wouldn't work with someone who can't clearly communicate.

#5283812 When you realize how dumb a bug is...

Posted by Nypyren on 28 March 2016 - 01:05 AM

Unhandled exception at memory location 0x000000c

Always first assume any small memory addresses (even if they aren't exactly zero), are due to (null)->member. :)

#5282546 GIT vs Mercurial

Posted by Nypyren on 22 March 2016 - 01:20 AM

I've never used Perforce. Based on some quick looking it doesn't seem to provide significant benefit over Subversion. Is merging branches better or something?

- It doesn't create .svn folders everywhere.
- It's more robust and is easier to figure out what to do when something unexpected occurs.
- Client specs are awesome.

- Kind of a pain to use for personal projects with remote backups compared to git or svn. With git, there isn't really a server so much as remote locations you can push to if you want. SVN has various online hosting services. I don't know if there are any free private cloud services for Perforce due to its license. I haven't used Perforce in about 5 years, so something could be out there by now.

#5282507 GIT vs Mercurial

Posted by Nypyren on 21 March 2016 - 08:49 PM

I prefer:

Centralized: Perforce over Subversion.
Distributed: Git over Hg.

The Git learning curve is absolutely terrible, though. I've been using it for four years and there's still things I run into that make me say "what the hell, git?" Git lets you shoot yourself in the foot with almost every single command, and overloads commands seemingly for no reason other than to make it easy to accidentally pick the wrong use of that command. Try to avoid the CLI at all costs and do things in a good GUI.

The third-party GUIs in order from best to worst: TortoiseGit, Visual Studio 2015's integrated Git interface, SourceTree, and way behind everyone else: SmartGit.

My only real, technical complaints about Git are: submodules and large files need some major reworking. Submodules COULD be handled much more conveniently than they are and would make my life much easier. Large files are common in games and without mitigation strategies like recreating a new repo every year, you end up with 30 gig repos for a 500 meg game.

#5281972 (split thread) c-style casts

Posted by Nypyren on 19 March 2016 - 02:00 AM

Does anyone know of an example where C-style cast causes a problem with non-pointer/non-reference types? All of the intentional problems I've tried to cause result in compile-time errors.

#5281745 casting double* to float*

Posted by Nypyren on 17 March 2016 - 03:28 PM

You're telling the function you're calling that your pointer points to memory that has enough room to store a double, but the actual memory is only big enough for a float.

Getting zero back is the least of what could go wrong - you are corrupting the stack. The additional 32 bits of the double are being written to whatever comes after the space reserved for your float. Most likely problem is that you'll overwrite a different local variable in your function, but you could also overwrite the saved frame pointer or return address.
Stack view for this scenario on x86/x64:
                                          |                 |
                                          |        +------------------+
                                          |        |        |         |
<- glfwGetCursorPos locals | ptr window | ptr &x | ptr &y | float x | float y | ptr {rBP} | ptr retAddr |
                           (      pushed call arguments   )
                                                          ( your locals                   )
                                                                                          ( return to whoever called you )
Write to *x overwrites both x and y:                      | *x as double      |
Write to *y overwrites both y and rBP:                              | *y as double  ------|
rBP = EBP on x86, RBP on x64, optional if you have "omit frame pointer" turned on. If that's the case you'll stomp retAddr instead.

On x64, RBP and the return address are 64-bit and you'll overwrite half of them with part of your double.
On x86, EBP and the return address are 32-bit and you'll completely overwrite them with the second half of y.

In your calling function, your local variables that you take the address of must be doubles. You can cast them to float *after* you get them back.

If your function has other local variables besides just x and y, they will be somewhere on the stack as well, and could be getting overwritten instead of rBP/retAddr.

(edited like 50 times: ASCII art is a pain)

#5281434 C++ Self-Evaluation Metrics

Posted by Nypyren on 15 March 2016 - 09:23 PM

Stop asking stupid interview questions.

This. If I am at an interview and I get asked this question and something like "What is your greatest weakness?", I am walking out.


#5281059 how could unlimited speed and ram simplify game code?

Posted by Nypyren on 13 March 2016 - 11:53 AM

Forget games; I would use a computer to predict the future and become infinitely rich.

#5279925 Has anyone ever ported a ps2 game to pc?

Posted by Nypyren on 07 March 2016 - 12:14 AM

Also, if you don't have source code, then give up right now. I was once part of a PS2->PS3 porting project where the original developer lost the source code, and we had to abandon the project; trying to resurrect a game via decompiling MIPS disassembly is the worst thing ever when you have a tight budget and schedule.

If you're in this situation, use an emulator and call it quits.

#5279917 Has anyone ever ported a ps2 game to pc?

Posted by Nypyren on 06 March 2016 - 11:41 PM

My experience is similar. We targeted console platforms, but several of our porting contracts had a (barely) functional PC version we used for development purposes. It lacked a bunch of stuff. You could only play in a window and you HAD to use a gamepad (mouse and keyboard didn't work at all). The main menu didn't quite work correctly - typically you would launch the game with the level identifier you wanted and it would just load directly there with basic character equipment. Cheat menus were added to do the rest.

Most of us had devkits though, since the large companies we contracted for had a huge stockpile of them and would ship them to us for the duration of the project.

Here's a handful of things I can think of off the top of my head, but there are likely more:

- Add mouse and keyboard support: GOOD camera controls, tooltip-icons for keys and mouse buttons, keyboard binding option screen (Us PC gamers hate it when you can't rebind keys).

- Add options menus with graphics options. Old PS2 games almost never had resolution or graphics detail settings, and us PC gamers ALWAYS notice and rightly complain about hastily ported games that overlook these.

- Redo textures at a higher res. PS2 texture quality is crap due to space limitations (the limit on PCs is much, much higher), and you should have artists spend some time increasing their quality.

- Redo meshes with more detail (try to keep the same rigs and animations though - some games had their animations tuned precisely to behave in specific ways, and changing these risks breaking the game's behavior in hard-to-detect ways).

- Add task-switching (ALT+TAB) support and a menu option to exit to the OS. PS2 games had neither. Alt+Tab support can be more painful than you'd think. Don't underestimate it.

- Make sure the game works with a variety of different gamepads, assuming you keep gamepad support from the original. PC gamepads come in a wide variety and they don't always work with identical code in the same way. Don't just assume everyone has a 360 controller.

- Depending on the graphics and sound libraries the original game used, you might expect to spend quite a lot of time fixing/replacing them for PC.

- File system stuff will be slightly different (easier). Many of the older consoles had memory cards which were a pain to deal with due to all of the possible hot-swapping cases you had to test for. You can probably comment out most of that stuff and just keep the no-free-space handling code. You'll likely want to add file system permissions checks.

- Add an Installer. PS2 games just insert the disk and run. On PCs you have to install them somehow (via Steam or via a disc or whatever).

- Test on Intel, AMD, and NVidia GPUs - as many different models as you can afford. Many a port has been ripped to shreds by gamers due to developers only testing on NVidia cards.

- If the game had an online matchmaking service (pretty rare back in PS2 days), it's likely no longer running. You'll need to host your own (or, if you're contracting for a publisher, have the publisher's online services team host it), and update URLs/IP addresses that the game uses to connect, OR take the drastic measure of ripping out multiplayer.

#5279896 Has anyone ever ported a ps2 game to pc?

Posted by Nypyren on 06 March 2016 - 07:26 PM

It's easier than making the same game from scratch, but harder than just recompiling the source code.

Without any other information about what you want to port, it's impossible to narrow it down further.

#5279876 Determining amount of taggers per round

Posted by Nypyren on 06 March 2016 - 02:47 PM

What is the best way for me to determine how many taggers I should have per round in my game?

It requires playing to find out. Allow the players to change the ratio.