• Advertisement

frob

Moderator
  • Content count

    11125
  • Joined

  • Last visited

Community Reputation

45220 Excellent

About frob

  • Rank
    Moderator - Mobile & Console Development

Personal Information

  1. Recently Decided to go for the Game Industry

    You mention details that apply to different jobs. Some are design, some are writing, some are programming. Usually you get to do only one of those. Choosing to become a programmer if you don't love working with code is going to be a frustrating career choice. I suggest you read over Tom Sloper's excellent FAQs regarding the nature of the jobs, some things to consider regarding schooling and job hunting, and helpful tips about getting your first job in the industry. As for financial aid, that is quite common. Apply to scholarships and as many sources of financial aid as you can find. Do all you can to qualify for it, such as keeping up your grades and working all your social networks. Financial aid can make schools more affordable, but cost is always something to consider.
  2. Since we're not in For Beginners, that's actually a tricky one. If you need any type of dynamic dispatch, virtual is the right approach. Compiler writers have done a great job of optimizing, so any type of rolling your own dynamic dispatch is likely to be slower, or at best on par with what the compiler provides. It is best to avoid dynamic dispatch if you can (the cost is currently around 5-10 nanoseconds per call on PC) but if you need it then you need it, and virtual functions are the best way to do it. In general you'll get far better performance gains by working with collective objects rather than individual items, which is something DOD preaches. That is, an object that contains a pool of items that is operated collectively, in a cache friendly manner. An individual function call that isn't inlined and has a few parameters (with lots of caveats and fine print about stack preservation and register assignment and parameter passing) can have an overhead of several nanoseconds. So instead of perhaps running 500 individual function calls to process 500 blobs of data each with an overhead of 2ns (meaning 500*2ns = 1 microsecond in overhead), you have an object-oriented thing with a single function that processes all 500 items sequentially with a single 2ns overhead. Also, be sure you're focusing on performance where it really matters. Some programmers spend a lot of time on this type of optimization in code where performance doesn't matter at all, there might be no difference if the processing took 10 nanoseconds or 100 microseconds. Knowing when it is important and when it isn't tends to be an advanced skill.
  3. C# 10,000 PNG files!

    Also, consider not using PNGs. They're great for transmitting data across the web, and they're (usually) lossless so they're great for image processing, but decoding them is nasty for performance and memory. They are an extremely tight compression format, but they require both time and space to decompress into a pixel-friendly format, and then they require time and space again to convert into a format directly usable by graphics cards. Most games will use different formats that are compressed in a format easily used by the graphics card. On a PC game the S3/DDS formats (DXT1 through DXT5) have direct hardware support on PC graphics cards. No processing is necessary, they get loaded directly into video memory with exactly the same data that appears on disk. Other compressed texture formats like PVRTC, ASTC, or others can be a good fit for specific graphics cards other devices. Professional games will do both. They have a compressed texture which is small and can be directly sent to the card, then they store that file inside a tightly compressed data file which minimizes the time doing I/O since even though decompression takes time, it is faster than file I/O. (Also, 10,000 texture files is a lot for most games. It can be an okay number if you've got thousands of game objects and they've got texture maps, bump maps, specular maps, reflection maps, alpha maps, or assorted other things, but even then consider reducing the number of objects, or at least, only load a subset of them.)
  4. [UNITY] Character Control Problem

    In that case, if you know the animations exist, ensure that they are being played. Exactly how you do that depends on which method you are using. Based on what you wrote, I'll assume the model is imported correctly, the matching rig has been imported with the correct settings (probably "generic" with an avatar created from the model and using either no root or the correct root), and the animations have been imported with the individual clips identified. Those are still my first guess at the error, but we'll assume they're working. If you're using an Animation Controller state machine, you can preview that they're working correctly in the Animator window. The animations should play correctly as you preview the state machine. If the preview works then ensure you're correctly using the controller in code. If not, then it is probably one of the three model/rig/animation import settings; fix them and re-import. Also is possible to mess up the details of an otherwise working model or rig or animations if you are really trying or messing around with them in code, but that usually isn't the case. At that point if you've got them all linked but it still isn't animating correctly in game, as a beginner your best bet is to delete those assets, dump the code relating to animation, and start over. If you're applying animation clips directly either through the old "legacy animation" system, or if you're applying the modern application clips manually, it is harder. You'll need to manually verify that each of the model/rig/animation parts are correct. The previewer mostly works okay with these, but sometimes has issues. Finding those on the old system takes more work, and is easier if you're already familiar with how rigged animations work. You'll need to ensure each animation clip works individually. They are easy to get wrong which is one reason the old system was abandoned. Use the debugger to ensure the expected model is being used, the expected rig is being used, the expected animation is being used, that the rig is set to the legacy animation system, and that generated elements are assigned to the right place (usually the root). Then go through the animations to ensure all the clips are identified, work through each animation clip to ensure the details work for the model, that they're using the right root and the right transform position and the right masks and the right everything else. The key is that you must know what the right values are supposed to be, so if you have access to the animator who created them and the animator knows the details of how to use them, that's the easiest way to get them verified and corrected. If you don't know those things, guess and check.
  5. Opinions on cryptocurrencies

    Exactly the point. Currencies have no "fair fixed rate", and hasn't been for ages. The value is whatever people say it is. If some people are willing to pay $18,000 for a bitcoin, then that is the fair value at that time. If those people stop and the highest bidding is $9,000 for a bitcoin, then that becomes their new fair value. The fluctuations can be tempered by trading on major markets, but even then the values are in constant flux.
  6. Opinions on cryptocurrencies

    But that's the issue brought up at the very beginning. There are no longer any mainstream currencies that are backed by physical commodities. All modern currencies, including cryptocurrencies, only have value because people say they have value. They do not have a fair fixed rate. There have been times in history where money had some form of intrinsic value. Gold and silver coins were worth their weight in gold and silver in addition to their value in trade. Other times paper money was backed by physical commodities including barley, wheat, corn, rice, tanned hides/pelts, directly usable metals like iron and copper and brass, and in some times and places, paper money has been backed by tobacco or cigarettes. Even so, there is no fair fixed rate except for what the market says it is. If that means one beaver pelt equals twenty fish hooks, then that is the prevailing fair rate. Tomorrow it may be twenty five fish hooks, or fifteen fish hooks. Similarly if a beaver pelt is worth five pounds of sugar today, depending on the harvest of both beavers and sugar then tomorrow a pelt may be worth four pounds or three pounds or ten pounds of sugar. The value is arbitrary and constantly variable. In modern currency there are currency markets where the value and fair fixed rate is in constant flux, with traders making money or losing money based on nanoseconds of transaction times. It is a mix of the currency markets and commodities markets that help ensure the stability of modern currencies. When one gets slightly better than the other the market traders will quickly identify a tiny difference in an attempt to make profits. There are markets for soybeans, cotton, cocoa, sugar, wheat, corn, barley, and most other foodstuff. There are markets for various types of oil and gas and coal and for processed gasoline. There are markets for gold and silver and platinum and copper and iron and steel. When traders (or these days, the trading algorithms) find a slight imbalance they make trades for it: sell 100,000 units of some currency, buy 50,000 units of a commodity future. Or sell 7,500,000 units of one commodity and trade it for 2,500,000 units of another commodity. Those commodity futures and currency markets help stabilize the rates of currency. That form of market has already been happening in crypto currencies.
  7. [UNITY] Character Control Problem

    Models alone don't animate. You need to make sure you're getting an animation rig (also called bones and skeletons and weights) that tells how the model's parts move, and you also need animations that move the rig around. Often the rig and the model are combined in the asset file so you need to make sure the proper import settings are used. Sometimes all three of them are combined and all three need to be extracted. Other times they are individual files that need to be assigned their proper role. Do you have those imported as well?
  8. Shadow bans do have their uses, particularly with regards to bots. Bots that get shadowbanned never notice. They will spam or do whatever they were doing, but nobody else has to interact with them. The bot thinks it is succeeding at whatever it is doing, and will quietly keep on doing that while everybody else ignores the bot. The site admins are happy because the bot damage is contained. The bot maker is happy because they think their bot is hitting the world with their spam. The bot is happy because it never gets error messages as it spews across the Internet. Everybody is happy. Malicious users leave destruction in their wake, so shadow bans are potentially dangerous. Giving them a shadow ban when it works as intended can help them feel like they are doing their destructive thing, but nobody notices or cares. They do their malice, they think they succeeded because they see their damage; they move on to another activity yet the site is unaffected by their apparent attack. But sometimes a shadow ban on a malicious user can backfire spectacularly since they want revenge, so they'll continue to attack and do malicious things. Done well, an automatic shadow ban on these malicious people will get bored and move on. Done badly and it just becomes more ammunition for attacks. Shadow bans are a problem when regular folk trip over the alarms, but that is fairly rare. Good systems allow sysadmins to remove the issue and return the person to a normal state. That's an unfortunate side effect since some innocent people will be shut out of the site. But fortunately web sites that use it are not life-critical, people don't die because their account is shadow banned. Some won't notice because they're once-and-done visitors. Others may wonder why people are ignoring them, then move on. Many will contact the admins and ask what is wrong, and it will be quickly corrected. Good systems will also have humans review the bans to make sure they were proper. Seems that didn't happen in this case, but it should happen to prevent real people from getting swept away.
  9. C++ Gameplay in C++

    Unreal Engine, for one. Also, moving to the Lounge.
  10. Backups (online and image)

    How big is your small business? If you are a big enough small business to have a few network servers, a D2D2T system may be quite affordable. If the sysadmin has some decent scripting skills a simple automated backup machine for the D2D portion, and a tape drive plus media for the D2T portion, can cost a few thousand dollars. Add a few more thousand if the admins aren't up to it or they need to buy professional backup software to sleep better at night. It may feel like a lot to some people, but the tape drive and media aren't that much more than the cost of the good backup server. The hardest part is periodically verifying the restore works and rotating out the media to an off-site location. They require a bit of elbow grease to get started, but compared to the long-term continual costs of online backup services a D2D2T system becomes cost effective rather quickly. At current media costs, once you've sunk the costs to get it started you're looking at about $4 per TB.
  11. "Responsive" sites are often terrible for mobile devices. While wealthy segments of society replace their phones every year or two, many people have phones that are many years old. Most responsive sites use JavaScript to run their resizing and rescaling and reflowing, which in turn means more processing and memory use on devices that are already low on processing power and memory. Other times they rely on complex CSS rules which require more processing power and memory on the browser. Consequently, visually "responsive" sites tend to have bad performance on phones making them less responsive in terms of performance. Either way you go, responsive designs may look nicer and are formatted in response to screen, but tend to make site load times and page interaction that much slower and painful and less responsive. You asked about media queries, those are also hit-and-miss that are sometimes ignored on older devices and browsers. Many mobile browsers have options that allow users to modify them or for the device to behave as a desktop computer to avoid problems with garbage code. HTML was meant to be display agnostic, displaying just fine on text system, on graphical systems, on any resolution from tiny screens to enormous. Just make proper HTML, the stuff designed to work in a display agnostic format, and the site should work fine. News sites have been particularly awful at this, with heavily enforced fixed-width columns and ads that take enormous screen space that only look reasonable on a large display. The more web site designers pull out the artistic crayon box and demand a picture-perfect Photoshop layout for the web site --- which is what many marketing groups and visual artists push for --- the farther they leave behind the core principles of the Web. One of the driving purposes for the creation of HTML was to get away from display-specific formatting, choosing instead to specify general structure and allowing the individual devices to decide how that looks. Responsive design takes exactly the opposite approach, denying the individual viewer from deciding how something looks, and enforcing the page creator's layout rather than the device's own layout based on content structure.
  12. Select() only indicates that there is something that needs action. There can be more than one message available. You should generally read all the messages available from the stream until no more messages are available. In stream-based protocols like TCP it is also possible to retrieve a partial message, as small as a single byte. Or it can mean full messages plus some bytes of a subsequent message. If it is possible to read partial messages then you also need to be careful about buffering the data so the partial data is not lost, and the complete message is put together when the entire contents are available.
  13. beginner

    If you aren't to graphics yet, I'd recommend "guess the number" as a first game as it gets you into the fundamental loop. It is all text and easy to implement in languages focused around text. Then Tic Tac Toe which gives you some play state information, more complicated win/loss conditions, and refreshing/redrawing the board and other information. You can also learn about game AI. A Connect Four clone can also work well, giving turns to the player, redrawing the board, game AI, keeping score, detecting win conditions. Text adventures can be done without graphics, and can teach about managing state machines and objects within the game world. There is no need to immediately jump into graphical games. Text-based or console-based games have a long and varied history. Text-based MUD and MUSH games were the precursor to modern MMORPGs.
  14. Opinions on cryptocurrencies

    Cryptocurrencies, like most currencies, have no intrinsic value. They only have value because people are willing to exchange them at a given rate. Much of the volatility in cryptocurrency is not because if issues with the math or the verification or the costs of mining, the volatility comes from the lack of established value and the lack of a link to physical goods except for the link of the cost of mining the coins. Apart from that, currencies are nothing more than a token. The token has value because people are willing to trade goods and services at a rate they deem fair. Tokens like dollars and euros have a constant dynamic on their value, and because so many people use them for a wide range of items the value is easily maintained. Digital currencies like bitcoin have had far fewer users, and even though they are used for many things online their adoption rate is minuscule relative to the transaction rates of other currencies. No matter the currency, their value will always remain whatever value people are willing to trade for them. As for making one unified currency, that sort of thing never works out the way people plan. As long as people desire to trade good and services using a token as value, the token will have value.
  15. initialize std::thread

    Note that even though that isn't required, it is something that Microsoft has chosen to do beyond what the standard requires. It is non-standard behavior, but they do it because too many programs have misused the old behavior in bug-inducing ways. It adds a performance penalty so use with caution. As I mentioned in my earlier posts, old code that correctly relied on the behavior in decades past would often use object aliases for both a volatile version and a non-volatile version. Tricky to get right and disastrous to get wrong, it can eliminate some of the performance issues. Or, you can use tools recognized by the language and compiler for the correct behavior which is the better choice in modern code.
  • Advertisement