Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 12 Mar 2005
Offline Last Active Today, 06:45 AM

#5254471 Need help for game. C#

Posted by frob on 28 September 2015 - 02:15 PM

Using the C# language and the .NET Framework you are still leveraging tools made by others.  You're just leveraging different tools.


Professional studios rely on all kinds of libraries.  There is generally no need to rewrite everything yourself.  In the 1980s you needed to write your own graphics drivers for every card, your own audio systems that wrote directly to the memory locations and IO ports of the different audio cards.  Over time more middleware came out where you could hit a generic driver for many different audio cards, or VESA drivers for a bunch of video cards. These days we hit systems like OpenGL or DirectX for graphics, we use systems like WWise or FMod for audio. And that can mean relying on major engines like Unity or Unreal as well.


There is nothing inherently wrong with doing it all yourself.  You could even write your game entirely in machine code if you felt the urge.  But doing so is directly at odds with productivity.


You can take advantage of systems that would take thousands of hours, tens of thousands of hours, or even millions of hours for you to develop on your own.  And that is exactly why most groups do it.

#5254468 Referencing other media in video games...law issues?

Posted by frob on 28 September 2015 - 02:09 PM

Why don't you guys think this qualifies as de minimis usage fair use?

It doesn't qualify because it isn't the least amount possible. 


In this case, the least amount possible is ZERO.  There is no need for the IP to be in there at all.  


The element is thrown in gratuitously. As an 'Easter Egg' it is content that is not essential to the game, it just happens to be an inside joke to the people who happen to find it.



Now if it were a proper parody that would likely be covered. But that would require using the characters to make a strong narrative about Adventure Time, maybe pointing out some absurd element of the show, or doing some other commentary.  But even then it must be kept to a reasonably low level of use, only using what they need for their social commentary.


Alternatively, if part of the game included making a list of top characters then de minimis use might mean only their names and not their picture, or using only their picture for nominative uses. 


But what was described is not either of those.  It was throwing in an element from another product not because it is essential for commentary, not because it is a parody of Adventure Time, but because they hope using the other company's IP will adds value to their own.  And that requires licensing.

#5254467 Managing different screen resolutions and Mipmaps

Posted by frob on 28 September 2015 - 02:00 PM

Am i right or do i miss something with Mipmaps?

You missed something.  That isn't what they are for.


3D graphics wrap the texture around the model. When the 3D object is displayed, the mipmap image most closely resembling the right distance is used.  That way a closeup view may have a detailed texture, but a far away view will show a smooth intermediate value rather than sparkling between the lightest and darkest values in the details. For example, th closeup value may be a black and white checkerboard. Without a mipmap, when rendered at a distance the graphics card picks a spot in the texture; it may pick solid black one frame, then pick solid white when the object moves slightly. Since a checkerboard pattern at a distance looks like a solid gray, the mipmap value for a distance will be gray rather than checkerboard, and the graphics card will sample a spot in the gray texture, which looks correct without flickering to black/white.


For UI elements you are generally best creating several sets of 2D images. If you cannot find an exact match, take the next biggest image and scale it down.

#5254465 The Simpsons Hit & Run on iOS

Posted by frob on 28 September 2015 - 01:54 PM

Moving to Business forum.



Making ANY games based on The Simpsons is going to require proper licensing.  Without it, sooner or later (probably sooner) you'll end up with some legal nastygrams arriving at your door.


Make your own game. 

#5254462 What exactly is API-First?

Posted by frob on 28 September 2015 - 01:51 PM

"API First" is similar to "Big Design Up Front".  You specify the methods you think you are going to need.  Or in this case, they're talking about web calls rather than method calls, but those are functionally equivalent.


If you've already got systems working, it is called "Standardization" instead.




TL;DR: Clickbait headline on slow news day.

#5254414 Referencing other media in video games...law issues?

Posted by frob on 28 September 2015 - 11:28 AM

Do I need licensing to use their character? 



There are very few exceptions to copyright and trademark law.  Many game developers seem to think that the parody exception means any attempt at humor. It does not. Parody is an extremely narrow defense and it does not apply to 'Easter Egg' type content.

#5254410 How do I know what Android version to target?

Posted by frob on 28 September 2015 - 11:19 AM

Useful numbers.


Gingerbread (2.3.x) was the first major wave of devices. Currently it has about 4% install base. Most of these are devices are three years old or older.  In normal real life terms that isn't very long, but the mobile space has been rapidly changing.


Honeycomb (3.x) was the first major round of Android's Tablet-specific system. Most tablet vendors updated to Ice Cream Sandwich (4.0) so this doesn't show up on the stats.


Ice Cream Sandwich (4.0.x) has about 4% install base. It includes many early tablets, and phones made from 2011-2012.


Jelly Bean has three variants, (4.1.x, 4.2.x, 4.3) starting with phones and tablets from early 2012.  With 12% market share itself, API level 16 targets about 92% of all Android devices in use. This is what many businesses choose for their target today.


You might also select an older (lower number) API version if you want to target older devices, or chose a newer API (higher number) depending on your personal needs and beliefs. If you only old an old Gingerbread phone, target that.  If you only own a new Lollipop device and don't care to target older devices, or if you want to exploit some new feature, target that instead.

#5254403 Getting started with game programming!

Posted by frob on 28 September 2015 - 10:55 AM

flash games ... learning C++ ...  unity, adobe/macromedia flash, and java, but I just can’t get a definite answer.


If I just wanted to put up the simplest game, what programs would I need to do it? I can learn the languages as I go, but I don’t know what to use to actually write the code it. At this point, ANY help would be appreciated.


You can use whatever you want. Those who play the games don't usually care about how they were made.


About the tools you mention:


  • Flash. This was once a popular tool for making games on the Web.  It has fallen out of favor for many reasons.  It isn't dead yet, and it likely won't be completely dead for another decade or so.  But if you are looking to the future, this probably isn't it.
  • C++. Major studios use C++ for console and PC games because the language has many strengths for systems-level work. For major games, usually the core of the game engine is implemented in C++, other languages are used for game scripting, controlling game objects, and simulation work.  While the language is quite powerful, it is a terrible choice for a beginner. C++ assumes the programmer always knows what they are doing, and that the programmer is always right; beginners rarely know what they are doing, and are very often wrong about their implementations. When you do eventually decide to learn C++ you will need to know that the language does not provide direct support for most game-related functionality. Graphics, audio, networking, input devices, and high performance disk operations go through libraries that interface with C++.
  • Java. Java is the officially preferred language for Android devices. It also runs okay on desktop computers, can be fairly portable, and has built in graphics, audio, networking, and other systems. Unfortunately for beginners the design of the language is focused more on small business applications, transactions, and tiny chunks of processing work, so it can be difficult to get high performance. For hobby games and personal learning it is great. It is a fine choice for a beginning language.
  • HTML5 + Javascript (not mentioned in your post). Javascript -- which really isn't related to Java in any way except for the first four letters of its name -- is the current popular language of the Internet. You can do quite a lot with these two combined, but because every browser has their own implementation details and quirks, trying to get a program to run here is often a matter of building for one browser, then fixing the things that are broken in the second browser, then fixing what you broke in the first browser, then fixing it for a third browser and double-checking the first two, then adding another browser, and another.   Every programmer should eventually pick these languages up eventually because they are ubiquitous. It works as a first language, but beware that learning can be quite painful.
  • C# (not mentioned in your post). Works good in Windows with Microsoft's implementation, and with mono it works on most other systems, so it is quite portable. I love this language for quick prototypes and testing out ideas. It has some of the same problems Java has with larger systems and the language's design choices not quite matching what games need, but still a good choice for small hobby projects and personal learning. I recommend it as a first choice.
  • Python (not mentioned in your post). Another good learning language, tools like PyGame can help you build games rapidly.  Inside the professional world python is frequently used for quick scripts and automation tools. Some people recommend it as a first choice, I think it is a good early choice for a second or third language if not your first.


  • Unity.  This isn't a language.  Unity is a game engine where you can write your own scripts that get compiled and run by the engine.  Unity supports three different languages for development: C#, a variant of Javascript, and a variant of Python. Most people who use Unity these days tend to use C#.  Over the past few years they have added 2D support, so you can build 2D and 3D games relatively easy. (They are still a lot of work, easy is relative.) If you want to make games without years of experience, this is a great tool. Many people have built professional quality games with the tool with just a few weeks of effort. It also targets a wide range of systems, including PC, Mac, Linux, and phones/tablets.  Free for most hobby games.
  • Unreal Engine (not mentioned in your post). Another popular engine used for many commercial games. It primarily uses C++ for scripts you write, and it also has another system called Blueprints. You can do quite a lot with the built-in functionality, and is often compared against Unity. Both are very powerful, capable engines that are used in major games. Unreal has a longer history of the two. Also free for most hobby games.
  • GameMaker Studio (not mentioned in your post). Another popular game engine, it uses its own language. It can help you build 2D games quickly.
  • Game Salad (not mentioned in your post). Another popular game engine, using its own language. It can also help with 2D games.


There is no wrong answer, except not to do anything.  Pick something.  My current recommendation (that changes every few years) is to learn C# as a language and learn Unity as the game engine. Both have strong community support and are widely used, both have shallow learning curves.

#5254399 Tool to measure memory fragmentation

Posted by frob on 28 September 2015 - 10:23 AM

On a PC or other modern workstation that uses virtual memory, those holes don't really mean much. They are only logical holes since the OS will page out lesser-used blocks of memory and page in blocks when needed.


If you start to come close to exhausting your memory space (e.g. 2GB or 3GB on a 32-bit program) and need another large allocation then those are important, but for most PC programmers it hasn't been an issue for two decades.


If you're on a console or embedded system, or a system that does not use virtual memory, then you will likely be using your own custom allocator. Inside your custom allocator you can build statistics on memory fragments.


If you're on a system where it is an actual potential problem, you'll need a custom allocator. Pull from one side for long-term allocations and operate on a stack-based system; allocate on entering that level of the stack, release on exiting that level of the stack, and make sure every system operates on a push/pop design. Short term allocations pull from the opposite side of memory and have strict rules about when you can and cannot allocate. Google can find lots of examples of the rules and requirements for such systems since it needs to match your system's design.

#5254302 Game Development as a Career

Posted by frob on 27 September 2015 - 09:14 PM

but when my professor told me that this isn't the place for game programming, along with knowing the learning game programming and arts is hard and time consuming, discouraged me from wanting to continue.


He is partially right.  No school will bestow upon you what you need for game programming, not even game-centered schools.


Schools are an environment to help you learn. Instructors guide through topics you may not normally know to cover, and topics you may not want but still need to know. They are guides to help you learn, and hopefully they can offer insights and direction that you wouldn't easily find on your own, but still it is up to you.


Games are software. Courses on software development are useful. You must learn how to develop software if you want to develop games.  Any tool or technology you learn about in a computer science program is going to have uses in game development.  You probably won't use everything on every job, a gameplay engineer is not going to use much of their database schooling, and a back-end game server engineer uses different knowledge, a UI engineer uses different knowledge, a developer working closely with designers is going to use different knowledge, but all the knowledge is useful to people in the industry.


Exactly what you learn and accomplish is entirely up to you.  


If you want to make games, doing it during college is a great time to build a portfolio of small stuff because you are in a safe environment, have tools and resources at your fingertips, have professors and peers to help answer questions, and have time that becomes less and less available as the years roll by.

#5254294 Singleton and template Error (C++)

Posted by frob on 27 September 2015 - 07:09 PM

The singleton, a type that can only have one instance ever created, where attempting to create more than one is forbidden by code, that is something to avoid. Even on consoles still a terrible idea. Even for logging where some people suggest it is good, it is a terrible idea: I've worked on plenty of projects where I wanted a private logging system.

A well-known instance, sometimes implemented as pointers within a globally readable data structure, is sometimes a compromise made in coding design.

These well-known instances are NOT singletons (you can create multiple instances if needed) and they are not globals (statically allocated objects), but they are dynamically allocated objects with well-known pointer locations, and they come with strict rules about who can use them for what. These also need to have carefully reviewed, vigorously enforced policies to ensure they are not misused, treating them as short-lived constants in almost all places, with well-defined times of when they can change, such as outside of Update() loops.

Sometimes these well-known instances are managed through a single global object that is nothing more than a bunch of pointers. So you could access it through ::Systems.audio->method(), but there are some big concerns about it. If you are careful that they are mutable and immutable at the right times -- that is they are not modified by using them and that they are only modified at specific times, then it can sometimes work out.

The worst bugs are the ones where those values are modified at the wrong time or by systems unknown. Without warning the behavior of the game is suddenly different, and you cannot find who modified what, when, or why. Suddenly a state was set or a value was modified, and you don't know which of the many systems that could have modified it did so in the wrong spot. Those are nightmares, and the reason globals and mutable shared state are considered terrible design generally.

#5254205 How does one Start Building a Top-Down 8-Bit Game?

Posted by frob on 26 September 2015 - 09:33 PM

Welcome to the site.


Sorry about to do this for your first post, but there is some required reading


After you've read that, if you've still got questions, feel free to ask them.  Just make sure they show you've already done a bit of effort and show you've read the basic rules of the site.

#5254038 What is more charged?

Posted by frob on 25 September 2015 - 01:19 PM

I'm not sure what you mean by "largest charges".  Do you mean what technology gives you the highest pay?


In general, game development pays high compared to the average wages, but pays low relative to other technology jobs.  If you are looking for the most money, go in to database development or high-performance financial software development.

#5253996 [Java] Most Efficient Way To Iterate Through A File ?

Posted by frob on 25 September 2015 - 08:16 AM

Yes, disks are slow relative to memory and CPU speeds.


But disks are much faster than are being described.  While no file sizes and times were given, different types of disks (slow spindle disks, fast spindle disks, ssd disks, thumb drives, etc) have performance that shouldn't be too painful.


It is common to see spindle disks with 30MB/s or 50MB/s.  Better SSD drives routinely reach 300MB/s, newer ones routinely sit around 500MB/s.  Then there are the high performance PCI card drives that are currently around 3GB/s. (Yes, gigabytes per second.)


A text configuration file should not be "painful" to load. Even if the configuration file is 5 or 10 megabytes in size, the time spent actually loading the file should be a fraction of a second. It may be a large fraction of a second like 1/3 second for a slow spindle drive, but not to the point of being "painful". 



When files take a long time to load, unless you're loading up gigabytes of files, facing a "painful" loading time likely comes from time spent doing processing and manipulating data, not so much time transferring data from the hardware.  


Java is particularly well known for flooding the world with copies of strings. (Profiling and debugging one tool, I found a vendor's library that in a matter of seconds started triggering garbage collection as it had filled memory with substrings, and surprisingly generated over a quarter million copies of the string "YES", all waiting for GC to clean it up.)  While some strings are automatically interned, it is trivially easy to fill memory with copies of the strings and pieces of strings because so many library functions think nothing of allocating yet another copy of a string.

#5253990 GPU load/temp monitoring for Intel?

Posted by frob on 25 September 2015 - 07:58 AM

The folks who made GPU-Z have a third-party library that works across cards.
Some of the information can be found with D3DKMTQueryStatistics, which is usually not meant for user-mode code. For a source-code example, ProcessHacker has source as well as header files for the structures you're going to need.  
Beware that these calls are venturing off into undocumented, unsupported, and vendor-specific territory.