Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 15 Jun 2006
Offline Last Active Yesterday, 02:13 AM

#5313253 the very best resources I found for game programming

Posted by on 29 September 2016 - 09:18 AM

Oh yes. You wander into any large IT org. There they are. Zombies. Speaking something that was fashionable twenty years ago like... Uniface or something. Employed on contracts to maintain something crumbling that the government department concerned can't afford to have re-written but can sink tons of money into having badly maintained.


There are loads of devs who haven't moved on. I was once hired to teach UNIX development to a bunch of them. They had to leave their discontinued, unsupported, hugely expensive-to-sustain mainframe/JCL/Cobol world behind and move at least to IBM machines with UNIX on which was running a port of JCL and the same Cobol heap they were used to tinkering around the edges of. They were all "but how do you get register dumps?"[1] and "why isn't there a proper offline editor" when presented with arrays of AIX systems to play with. Perl looked like, and was treated as, witchcraft and shell was glaced at and dismissed with distain but no effort. Even Emacs and VI weren't sufficiently arcane to be untoylike to their minds...


I got bored of the task and quit.


The one thing I couldn't tell them was that they were getting fired if they didn't change role... and lo. They were fired.






[1] The machines concerned have about 200 registers...

#5313117 the very best resources I found for game programming

Posted by on 28 September 2016 - 04:34 PM

"Speaking of "Pro", one can't call himself professional if he only knows one language, try and know at least 3"


I was asked how many languages I've used at one point[1] so I compiled a list because I lost track after the first dozen. Terrifyingly, I found I've delivered software for money[2] written in at least 29 different languages (including 4 assembler languages) on 6 types of UNIX, half a dozen version of Windows, three major versions of Mac, several embedded environments and Android together with JavaScript running on various browsers.


That's a bit more than 1 language per year of my career. My main suggestion for career maintenance for younger developers is "get good at getting good at things".



[1] By someone who only wrote in one and was surprised that I could switch between several at a time.


[2] I've hobby-coded in at least a dozen more.

#5313113 the very best resources I found for game programming

Posted by on 28 September 2016 - 03:56 PM

"What about the Indie developers who dream of making there own games, yet they hate programming and can't afford to hire a programmer, should they give up?"


Partner up with a programmer, do the art for them for their game. After that first game, if you haven't done the normal artist thing[1], they're likely to listen to your pitch for your game...


No. I don't know what to do if you can't do art either.



[1] Done the first 1/4 of the things needed, had a change of heart about the style, redone the first 1/4, had a personal crisis and then apparently fallen off the planet for anything between a year and forever. And these were artists I was **PAYING** to do the work.

#5313110 Coding-Style Poll

Posted by on 28 September 2016 - 03:41 PM

Don't write a coding standard. Ever. People who write coding standards should be lined up against a wall and SHOT. Over and over and over and over again until everyone, everywhere forever stops writing them.




Because once you've put cursor to Word document[1], for the rest of time you have to boringly enforce it and have it boringly enforced on you.



Companies are very keen on coding standards and it wastes MASSIVE amounts of time. You spend ages messing about in code reviews with people going "oh, this needs a space here and two there and this line is one character too long (and fixing it will involve you hand re-formatting two subsequent lines..)" and everyone's smug about this because it feels like work and it's BLOODY WELL NOT WORK and then later on the review someone says "Oh hey, why don't you just use this API over here" and you throw away all that code and all the effort in fiddling the spaces into place.


Code layout standards are the sort of thing you need if you have either a lot of spare software engineer time you need soaking up or the kind of engineers better deployed on the task of counting spaces in code than in actually writing it. The first option is unlikely and the second is an environment to leave soon anyway.


Go and write an automated nitpicker / code autoformatter / automated nitfixer instead. Preferably by using an existing one wrapped up with some flags describing the selection of options made in the tedious meetings. And very preferably the latter two[2].


Now you a) don't have to enforce it and b) people don't spend their lives having to try and conform to it. A quick command and now you get nicely formatted code and you're having the machines doing the boring scut work. Which is supposed to be the business we're in but everyone seems to lose sight of that when it comes down to space-counting, bracket-lining-up OCD.



[1] Usually, ironically, a very poorly laid out one which sets off my typographical sensibilities but which for some reason can never, ever, ever be changed[3].


[2] An ex-colleague was horrified when my approach to getting frankly stupid quantities of silly, niggly complaints out of an automated Java style-checker was to write a python script which ingested its complaints, parsed them and ran regexes over the source to fix them. I considered this a set of problems which were hence solved for all time. He seemed to consider it cheating. I wasn't doing the penance properly and never would learn how to write compliant code. So I named it after him...

[3] I recall one such document for C++ which required that any condition must be compared to a boolean. So you had to write "if ((x == y) == true)". This was because once someone had had some code written without it which "didn't work". Given the skill background of some of the other "engineers", I suspect they were just a muppet. But despite no record of the incident, no repro, no witnesses or no sense for the rule I still could not get the committee to remove it. On the basis that "you just never know, do you?". Once you start down these routes, you're in a world of giving the Bs a mechanism to treat the As like Cs and soon you don't have any As.
Here endeth the lesson.

#5312105 Serious Question needs serious logical feedback

Posted by on 23 September 2016 - 07:58 AM

Wasn't there a plan once to stop answering these sorts of questions in the hope that people would stop asking them...

#5311127 Is fread considered a seek memory on disk operation?

Posted by on 16 September 2016 - 02:45 PM

Map the file into memory. Issue some pre-reads from the pages you want. Let the memory management system pull them into RAM for you using DMA transfers. Go do something else. Come back in a bit and find the sections in RAM.

#5307184 Preventing overengeneering

Posted by on 22 August 2016 - 06:54 AM

"When in doubt, use brute force" (Ken Thompson)


It's what powered the development of UNIX. It's why it's a) full of singly-linked lists and fixed-size arrays and b) was written in a few months by a couple of people.


They always presumed that at some point their known-naive algorithms of searching linked lists iteratively would need replacing, and they did -- but it took decades for some of those uses to need that performance. And by the time that came around, they had a lot more people working on it....

#5303080 Mmorpg Idea.

Posted by on 29 July 2016 - 07:26 AM

"I was thinking to write GamePlay and how will in game systems work."


Jolly good. You'll just need to get several tens of millions of dollars to pay your software developers with and you're ready to go.

#5295935 Pros/Cons of coding alternatives to std::algorithm?

Posted by on 10 June 2016 - 03:53 AM

"I always felt like it's probably a bad practice to do so."


It's not if it does the job. I get to say it again; You don't need code to run as fast as possible -- you only need fast enough


Build it using the BIGGEST tools you can find -- the less work you have to do the sooner you can get a project done, profile it, then replace only the sections that mean you're not hitting your target.


Your goal is a completed project, not a tiny section of very-very-very-very spiffy code.

#5285785 Should getters and setters be avoided?

Posted by on 08 April 2016 - 06:59 AM

Methods on objects should be verbs or questions.


Sometimes it's appropriate that the verb is to set some state.


But generally no, the state of the object should not be visible or changeable from outside the object. So you don't need getters and setters.


If you find yourself with a "bag of values" object, just make it a verbless bag of objects. And make all the members public and save a bunch of typing.


One of the common flaws of developers is that given a setter interface, they try and drive the objects through it, leading to pages of boring settering code instead of a single verb operation to abstract that away -- and which, appropriately named, tells you what it does.

#5278439 "check before flight" list - for OpenGL

Posted by on 27 February 2016 - 08:20 AM

  • Did you clear the depth buffer before trying to using it.

#5277849 Manufacturing chain for paper

Posted by on 24 February 2016 - 03:21 AM

Paper/card is also used as packaging in a lot of industries. Think about how much cardboard/paper Amazon gets through.


When I moved house a decade ago, I ordered a bunch of 84 litre packing plastic packing boxes from a company in the UK which makes them[1]. Each of them arrived in a cardboard box, which we reused for packing light stuff in...




[1] They have locking seal lids which meant my Lego collection could be moved at minimal risk.

#5277848 Black screen when trying to implement ibo

Posted by on 24 February 2016 - 03:17 AM

"uint16_t is the same size as short?"


Usually, yes.


" Also I still don't understand why can't the indexBufferData work with GLfloat? I don't exactly understand what is the problem."


The index buffer is a set of array indices to use. Passing "7,47,998" means "draw vertexdata[7], vertexdata[47], vertexdata[998]". So floats don't make any sense. In C++ (and most other languages) you can use floats as array indexes, but that's only because they're being silently converted to integers while you're not looking... OpenGL is just being stricter about what types it'll accept. This is largely to simplify the work of the driver and the hardware by making you get things right to start with -- for example mobile phone OpenGL only takes short ints as indexes. Anything else is an error -- this makes the code inside the OpenGL driver simpler (and hence faster). The philosophy is that it's not OpenGL's job to sort your types out for you and most game developers would complain if it spent time doing that work when they just want triangles drawn as absolutely fast as possible.

#5257704 MySQL applications for a game

Posted by on 17 October 2015 - 01:28 PM

Or just a shopping list application. Multiple users, multiple lists, multiple things in a list. Login system, shopping list display, checking things off it. 


Which is rather quicker than an entire MMO.... and something you can just hand the entire source code of to someone. AngularJS as a frontend would be a big win, but regular boring HTML would suffice, something like Python running a resty API somewhere and a MySQL in the backend for the storage.


If you turned up having done something like that, we'd definitely consider that sufficient MySQL to get you into the interview. (We're not finance but we hire database-manipulating type people).

#5257471 Advice for start-up

Posted by on 16 October 2015 - 06:03 AM



What are you bringing to the table? You'll need one or more of;

  • Experience in the business side of gaming -- contacts with publishers and so on, with involvement in a couple of titles.
  • Experience as lead developer on a games project.
  • Several million dollars.