Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 12 Mar 2005
Offline Last Active Today, 02:07 AM

#5105301 Looking for feedback on programmer portfolio.

Posted by frob on 29 October 2013 - 02:14 AM

Ah, that does make it look a lot better. From browsing the source code it appeared you had simply pulled together a bunch of python libraries and only written a few scripts in python to bind them together.

In that case, I would add some additional notes, perhaps some "readme.txt" files, that point out to the potential employer what exactly the should be looking for.

#5105272 Looking for feedback on programmer portfolio.

Posted by frob on 28 October 2013 - 09:58 PM

Things I'm worried about:

  1. Is it getting too long? This specific project is pretty big and I still have some more parts to write about.
  2. Am I using the proper format? Is it okay to link to the source code the way I'm doing it or is it better to embed smaller parts on the page?
  3. Is the video demo actually helping? Is it a good practice?
  4. I'm not a native english speaker. Am I expressing myself correctly? (I'm aware there are some gramatical errors which I'll definitely clear up before going live.). Do my points get across or it just reads like a lot of gibberish?


1> It is both too long and too short. It has a very large collection of external libraries, and is not clearly organized for review by a potential employer.


It is too long, because most if is clearly based on duplicating the code rather than writing useful functions. Some of the directories have five files that are exact duplicates with only a single string different between them. Good programmers don't repeat themselves in code, instead they either loop or write functions.


It is too short, because it doesn't seem to have much stuff that you actually wrote. There are over 200 files for external libraries, and very few files that look like you actually wrote them. Most of the ones you actually wrote look like they are under 10 lines of code, a small number are 20+ lines, but with all the obvious duplication between files it really doesn't impress me.


It is not clearly organized because I cannot tell what you did and what other libraries are doing. I have no idea what you actually wrote. My spot-check of the 200 libraries find copyright notices that show they were written by various companies and not by you. It took quite some time to find the code that you actually wrote.


2> The videos and links themselves are fine.  That is, I can find the videos immediately and I can see the files. It is good to have both on a portfolio site.

3> The videos make it so I don't need to actually download and run your game. So in that respect they are good. They show the programs quickly, but they don't document what you actually did.
4> Your writing is clear. 

While the project itself shows you can write code, the code is all python. Very few game companies are looking for python programmers.

#5105252 Array.Sort performance issue

Posted by frob on 28 October 2013 - 08:03 PM

I see a few suspects. A simple sort of 1000 items is extremely quick, but you have a complex comparison function.

A sort by itself is extremely quick. Did you accidentally put the sort inside a loop, or otherwise call it more frequently than necessary?

Sort requires "strict weak" ordering, but I'm not convinced you are following that. This ruins the sort algorithm so be absolutely certain you follow it.

Your comparison function includes a nested loop, how big is TEXTURE_ARRAY_COUNT?

Your comparison function uses many accessors to read values from other objects, are those complex functions?

Your comparison function calls other comparison functions, are those comparison functions complex functions?

As others mentioned, these are things that should be obvious once run through a profiler.

#5105228 What measures can you take to protect game account?

Posted by frob on 28 October 2013 - 06:27 PM

As part of risk analysis you need to figure out who is likely to attack, what and how they are able to attack, and what they can find inside the treasure box when they succeed.



First, what is in the treasure box? What do the attackers get when they successfully break in? In some cases they find a list of millions of valid credit card accounts, or usernames and passwords, or other extremely valuable information. In other cases the most valuable thing a successful attacker can gain is a collection of salted email hashes and salted password hashes, along with a simple high score table and absolutely nothing of value. Make sure the treasure box is as empty as possible when the attackers arrive.


Then I look at what and how they are able to attack. It looks like you are most concerned about someone hijacking a computer. Sadly in that case you have no control. If a client's computer is fully compromised then they are fully able to act and behave as an authenticated account. 


There a few common attack vectors. One of the simplest and most common attacks is man in the middle (MitM) attack. Someone simply intercepts the message, modifies it, and watches what happens. Because this attack is trivially easy to perform, you must assume your entire communications protocol is known. Assume the attacker knows exactly what you are sending and why, so be prepared for garbled data, invalid data, and intentionally wrong data. Be prepared for this data to come from every user; when you are expecting the name of the player be prepared for an attacker to send an entire executable in the hope of a buffer overrun; when you are expecting a motion coordinate be prepared for the player to send a coordinate that jumps across a wall or boundary; when you are expecting credentials be prepared for an attacker to start at "00001" and test every value through "99999". Validate all data that comes across the wire. Another extremely simple and common attack is the replay attack. The attacker records the session, replays the username and password and other values, and gets logged in. The key to defeating it is to ensure data is invalid across sessions and that a unique session is established each interaction. Fortunately this has industry-standard solutions, and simple encrypted channels like SSL (also called TLS and HTTPS) can help limit the damage of replay attacks. Since an attacker can only replay the values from machines they already own they cannot spy on others. The third most common attack is the Human/Machine Interface (HMI) attack. In games these are hacks that change visibility of walls, or add outlines or markers to indicate otherwise invisible data that the player normally wouldn't see. These attacks can be much more difficult to overcome, and tools like PunkBuster can be licensed to help in that fight.


There are many more attacks, as many attacks as your attackers can invent, ranging from the $5 wrench (just hit the person with it until they reveal their password) to social engineering, to extremely complex technical attacks, to attacks that haven't even been invented yet.



Ultimately it is up to you. You need to figure out the value of the treasure chest and how much money, time, and effort you are willing to invest in protecting that chest.

#5104935 32bit/64bit Woes?

Posted by frob on 27 October 2013 - 10:44 PM

Could be various issues.

One of the more likely causes is pointer truncation. It is a relatively common problem from header mismatch where something is referencing the old 32-bit headers rather than the 64-bit header, or a link issue or code duplication issue where something is using the 32-bit version of the function.

A little bit of time with the debugger and the disassembly window can show you if the pointer is getting truncated. Hopefully it would be as simple as using a watch window where a pointer suddenly changes from an extended 64-bit address to a 32 bit address. Stepping through the code with a mixed disassembly enabled can also help reveal the mismatch, such as using the 32-bit ecx instead of the 64-bit rcx register.

#5104420 Indie Game websites

Posted by frob on 25 October 2013 - 12:11 PM

But depending on the game, their web presence might be far more important than a non-tech company.  Games need to have a "cool" factor that a non-tech company doesn't have to worry about.

How much money do these hobby/indie game developers have on hand to develop the site?  Most build EVERYTHING themselves because they are unable or unwilling to pay others for it.  That is the nature of the group of people.


For some, even the payment for a domain name and for hosting is painfully high.


Yes, having a great web site would help their business. Marketing is one of many important factors. Of course, these individuals are having a struggle making the product in the first place. Marketing the product is often an afterthought to them, and an incredibly expensive one at that.


By the very nature of their choices they are unable or unwilling to pay others to develop their web site for them.  




Yes, it is true that many indie game developers and hobbyist developers could benefit from professional development of their web site and marketing material.  But it is also true that these same individuals are generally unwilling or unable to pay for such a service.  Consequently the market is almost nonexistent.  Sure there is a potential benefit for customers, but the potential customers are unable or unwilling to pay, making it improbable for a successful service business.

#5104413 Which OpenGL book to pick?

Posted by frob on 25 October 2013 - 11:57 AM

complete newbie to OpenGL


recommend where one can learn it from scratch?


I have the impression of only scratching on the surface all the time.

Unfortunately you are asking for contradictory things.


A beginner book needs to educate you on the beginner topics. This means teaching you the basics of the pipeline, the basics of what a model is, what a texture is. The basics of what is involved in manipulating models, how to work with transformations, and how to work with the fundamentals.  


This is what you NEED in a beginner book.  A good beginner book will walk you through the beginning steps, and if you apply yourself to your studies, you might graduate from the book as an advanced beginner or intermediate skill level.


A good beginner book absolutely should only scratch the surface. Most of the high performance graphics techniques are complex and nuanced --- the opposite of what you want in a beginner book.  You can start out with a beginner book, and that is a good thing. Beginners start at a beginning level. Then they move to an intermediate level, and on to an advanced level, and finally grow to become experts. 


When you were learning to read you probably started with the equivalent of "See Spot Run" beginning books, eventually moving on to chapter books, and only after years of practice did you evolve to complex reading material. When you were learning mathematics you started with addition and subtraction, moved on to multiplication and division and fractions, slowly growing and learning trig and algebra and other skills.  You don't start a beginner with expert material.


Glancing over at my shelf right now, I see copies of the beginner books (the Red Book, The OpenGL SuperBible) but also about ten other books like GPU Gems series, Graphics Gems series, and also three 3" binders full of advanced printed material.  


If you choose this as your field it will not be your only book. Do your best to master the content in the book, and then move on to more advanced material.  Eventually you will be able to grow to advanced-level and expert-level techniques, but right now recognize you are still a beginner. And that is okay.

#5103804 Will it be C++ the preferred game dev language in 3 years from now?

Posted by frob on 23 October 2013 - 11:44 AM

There are many parts.


There is the language.  The language says that a garbage collecting memory manager is used.  When you call new an object is created, and when it has no more references the object is cleaned up.  The details of how that gets implemented internally is left up to the implementation.  


Then there is the compiler and execution environment implementation. Currently there are two major implementations, MS and Mono. The language gets compiled into the virtual machine's intermediate language, but that is not a requirement. It could be compiled to any target, even directly to machine code if you wanted to build a compiler for that. Just like any compiled code, the details of how that works are up to the implementation. It could be part of a virtual machine and rely on the virtual machine to allocate it. It could be done through a third-party library behind the scenes. It could be managed in raw machine code. That is not specified as part of the language, but is part of the implementation.


The .net framework has a huge collection of classes and functions. Some of those functions are designed to control Microsoft's runtime environment, including the garbage collector. This is also not part of the C# language, but is a piece of library functionality. These libraries may or not be present, and are not required by the language.



It is not so different from any language, including C++.

#5103750 Will it be C++ the preferred game dev language in 3 years from now?

Posted by frob on 23 October 2013 - 09:51 AM




language features such as LINQ, reflection, garbage collection, synchronized methods, properties, etc are pretty nice for productivity imo.



Isn't reflection & garbage collection really part of the framework instead of the C# language?



Yes and no.


The language uses a garbage collection system as part of its memory management. The .net framework includes classes and functions that let you manipulate the garbage collector.


The language specifies the exposure of metadata. The .net framework includes classes and functions that let you make use of the metadata for reflection.



I've used C# in tools since about 2005, and I've been writing internal game code in C# for over three years. When all my C# usage was in the tools I could see there was a huge productivity gain, but since the tools rely on the .net framework for many calls I could not be certain where the productivity boost was. Since the game engine provides most of the functionality and only uses C# for object scripting, about the only things I use from the framework are the generic containers and the very occasional reflection. There is a huge productivity difference between working in game's C# code and the game's C++ code, and since I don't rely on the .net framework for most features, I can assure you the performance difference is not coming from the framework libraries alone. The language design means much less effort and mental work to write software.

#5103477 Gameplay vs. programming abilities

Posted by frob on 22 October 2013 - 02:07 PM

There are many factors involved in what makes a fun game. The factors all multiply together, they don't add.


Also, they are subjective.


A so-so design would have a subjective quality factor of 1. It doesn't help the game, but it also doesn't hinder. If a design is great you might think of it as a very high factor, perhaps 5, or 10, or even 500 for an extremely compelling design. If the design is horrible that factor gets a very small value, perhaps 0.1 or even 0.00001. When that multiplies through it will hardly matter how good the other components were.


Mediocre game art may also have a factor of 1. Visually compelling, beautiful art can give a much higher factor, and ugly art can be a low factor. Again, this multiplies against all the other terms.


So a game may have a fun design (5.0) and reasonable graphics (1.5), but the audio may be a bad fit (0.5) and there may be horrible bugs (0.01). So on that subjective score the game may have been a fun game is ruined by bugs. Another game may have great graphics (8) and beautiful sound (5) and no bugs (0.99) but have such a horrible design concept (0.00001) that nobody is interested in playing it.




For the second half of the question, about the importance of each feature, it also varies based on the game and is subjective.


For an artistically-themed game the choice of art has its own additional multiplier for importance. In an audio game having a consistent selection of high-quality sound is vital. 


In spite of each element getting their own factor, I strongly believe that a solid gameplay mechanic is the most important feature. 


Games have been around for thousands of years. Symbolic games like Go, Mancala, Mah Jongg, Checkers and Chess all have solid gameplay mechanics that can be enjoyed even without music, art, or effects. People spend fortunes on beautiful game boards and pieces, but the gameplay is so solid that you can use bits of stone or cloth or paper or bone or buttons or any other symbolic marker and still have a great game experience.


Even in computer games, classics like Pong, Tetris, and Breakout are all very symbolic and are carried by gameplay alone. Other components improve the games of course, but the mechanics behind them are able to stand alone.


These days there is certainly a component for art and music and eye candy. They are also multipliers. Do them well and they will multiply the quality of your game by a factor greater than 1.0, drawing more players to you. Do them badly and they become smaller or much smaller than one, keeping players away.  But if you leave them out entirely, often they are not missed too greatly and the game does not particularly suffer, nor does it benefit. Leave them all out and the game stands on the mechanics alone.


So that would be my ranking.  Mechanics must be able to stand by themselves, and by itself is the base rating of the quality of the game. Everything else is just a multiplier.

#5103470 in-app purchases

Posted by frob on 22 October 2013 - 01:39 PM

At a very high level, yes that is correct.


There is more to the process, of course, such as setting up your account with Google or Apple, provisioning the product, marking them as consumed, and so on. The exact details depend on which system you are using.


The documentation for Android is located here, for your reference. Apple has their own similar system you can look up.

#5103299 Will it be C++ the preferred game dev language in 3 years from now?

Posted by frob on 21 October 2013 - 10:29 PM

I'll go a bit further with that.


If you only learn one language, you will generally tend to think in the mindset of that language, and have difficulty following to other languages.  


Some examples are in order from recent posts on the forum. People who only know C++ tend to think of object life cycles in terms of constructor and destructor, and have difficulty in situations where lifetimes are more complex or where destructors may not exist or are not guaranteed to be called during the program's lifetime. People who only know Java tend to rely heavily on exceptions, and pass-by-reference is a foreign concept, both were some interesting forum topics. People who only know C# tend to not realize the costs involved at a lower level, and take features like primitive boxing for granted.


I read a really good example of this some years back. A group was looking for a tools developer, and their required skills included being able to develop in multiple languages in addition to basic shell scripting. As part of their coding sample they asked the applicant to write some code to be run from the command line, accept a bunch of integers in std in, sort them, and write them back out to std out. Most examples were 10-30 lines of C, C++, perl, python, and other languages. Only one person wrote a simple shell script, "/usr/bin/sort -n".


If you are limited to only one language you will think only in terms that fit that language naturally.  If you know many languages, you can think in terms of other languages. There have been hundreds of time I have been writing code in language /x/ and thought to myself, if only I had this feature from language /y/. Sometimes it has been faster and more efficient just to link against a utility library that calls code from another language, just like the example above where the person reused existing functionality from somewhere else, because they could.


Don't get trapped in the single language rut. At a minimum, learn C++, Java, C#, JavaScript, Python, and Perl. Each one will teach you different ways to think about problems. Learn more languages as you have the time and inclination, hopefully pick up a functional language or two as they will teach you a great deal if your life has been limited to imperative languages.


Knowing a language is like having a tool available to you. When you only have a hammer your skills are limited. When you have 5 different kinds of hammers, many types of saws, a collection of drill bits, grinding tools, welding tools, etc., you will be amazingly productive compared to the guy whose only knowledge is how to use a claws hammer. Just because many game engines are written in C++ does not mean that is the only language to learn. No matter what primary language you will use in your day job, simply being aware of many languages will improve your skills and abilities no matter what language you are using at the moment.

#5103196 Will it be C++ the preferred game dev language in 3 years from now?

Posted by frob on 21 October 2013 - 01:02 PM

It already isn't the language it used to be.


By volume the current top development platforms are iOS and Android. The language you will likely use for either are Objective C and Java, respectively.  The next biggest development platform for games are web-based games, often either playing directly using JavaScript or indirectly using Flash or another plugin.


If you want to be part of the big player AAA party you absolutely need to know C++.  I include C++ in my list of must-know languages for game programmers even if you don't use it every day. Other languages are C#, Java, JavaScript, Perl, and Python. Even if you only touch them rarely, you really ought to be able to read the files and work with them on a minimalist level.


Also, having worked on many major game engines over the years, I can tell you that game companies rarely use full-on C++.  Usually it is more along the lines of "C with classes".  For various usually good reasons game studios in C++ code will disable exceptions and eschew large portions of the C++ standard library. Many C++ features come with a cost, and when it comes to the highest performance sections of code even those small costs are unacceptable.  Inside a rendering engine the cost of a virtual function, roughly 7 nanoseconds, is unacceptably high. Inside a particle system the cost for encapsulated data, roughly 28 nanoseconds, is too high.  The main gameplay code is a totally different matter, in AAA games it is often written in a scripting language that is run on its own time in a non-critical performance thread.



Learn and know all of those languages: C++, C#, Java, JavaScript, Perl, and Python. The effort of learning them at a rudimentary level is well worth the investment, even if that isn't the language you end up using on your day job for this project. A different language may very easily become the language you end up using on your next project.

#5103170 How To Get Freeware Game Content Without Restrictions!

Posted by frob on 21 October 2013 - 11:01 AM

I'm a little confused about what you want.



There are many open source games out there right now, which you can use for free. You won't be the only person using the game, there is no exclusionary system in place. This means you will need something else to drive your potential customers to you, something other than content. These games are often already widespread because they are free with no restrictions. 



If you are looking for someone to provide you with exclusive content, games that require hundreds or thousands of hours to develop and just hand them over to you exclusively for free, that is unlikely to happen. Generally either the authors are looking to monetize it themselves, or they make it freely available to everyone as open source.


So, will open source games work for your needs?

#5102562 # games released as of yet?

Posted by frob on 18 October 2013 - 11:14 PM

Released by who?

There used to be a large number of technical and scientific magazines with little games scripts in them, do those count? Many introductory programming books include small games like tic tac toe in them, do those count? What about the hundreds of Tetris clones that have come out of this site alone over the years?