Jump to content
  • Advertisement


  • Content count

  • Joined

  • Last visited

  • Days Won


frob last won the day on June 20

frob had the most liked content!

Community Reputation

45349 Excellent

About frob

  • Rank
    Moderator - Mobile & Console Development

Personal Information

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. frob

    Where value comes from in game

    Value depends on the games. People place value on different things in different games. In some games there is value to completely cosmetic skins, in other games skins are valueless. In some games there is value to having a long list of items to collect, in others collection is a valueless feature. Some value customization, some value completion, some value numbers and stats, some value action speed....
  2. frob

    Where value comes from in game

    Define value. For a commercial product, value is generally whatever brings in revenue. For personal projects value can mean anything else at all, including learning experiences. Value can come in research, value can come in market awareness, value can come in building tools and technologies used for creating future value. Value is also relative. One person's trash is another person's treasure. This is especially true across humanity such as a big city's trash is valuable in a poor refugee camp, but it applies to everything. What is valuable to one game as a high-priority high-value element may have no value at all in another product.
  3. As for the reasoning, that is easy: Regulations and policies encourage acting with long-term positive consequences. There is no need for regulations and policies that offer immediate gains and benefits because that is what people will choose by default. It takes discipline to go work out every day, not so much discipline to lounge around. It takes discipline to save up, not so much to use credit. When something is easy, pleasurable, or profitable, it will happen without regulation or discipline. The larger the cost of the policy or greater the regulation burden, the more difficult and onerous it is to keep the policy and regulations in place. The more immediate the gains and the more clear the benefits, the more easy it is to keep the policies and regulations in place. As a result of that aspect of human nature it is easy to get policy changes during times of crisis when benefits are immediate, and it is nearly impossible to get policy changes that will make an impact years or decades in the future. This includes environmental issues.
  4. frob

    WHO recognising 'gaming disorder'

    I doubt it. The clinicians who use the actual diagnosis and work with people who are stuck with obsessions and compulsions don't have difficulty comparing them with everyday laziness or preferences for pleasurable activities. They're quite different. If you're only looking at the description in isolation they can appear to be broad. That isn't the case when looking at human lives. Perhaps on the simplest level, one is free to choose, the other is a slave to their thoughts and compulsions. The fallout through the rest of the trapped person's lives is enormous: because they cannot do other things the rest of their life quickly falls apart in severe life-altering ways. Work is only one component.
  5. frob

    Pseudo 3D help

    Most of what you just asked are implementation details unique to each game. You must understand each of the fundamentals and building blocks, then put them together in your own unique systems. If you don't know how to implement the bigger pictures then figure out how to implement the smaller parts. If you can't figure those out your project is too big for your current skill set and you should reduce it.
  6. Many "isometric" games are actually at a 1:2:1 ratio, which is probably the angles you're thinking about. It isn't quite isometric since only two of the three angles are the same, but it looks much nicer on pixels. Probably the clearest writeup on that is in Wikipedia, here.
  7. The data is a stream. Often the quick-and-dirty implementations are of objects. The mismatch can be a problem for large data sets. The data stream here is about 900 megabytes. That all fits into memory and you could memory map it directly in place on many systems. That is, it can exist with a single allocation. On a fast modern SSD it can take about one second to load the entire file into memory, and you can read through the entire file at about 10GB/s on commodity memory. That's not the problem. Most likely the problem is that you're parsing it into objects. Dumping it into a database means every string exists independently. Each one has an allocation. Each allocation has some overhead, such as indicating it is part of a specific line, or in the case of a table, which column and row the entry is in. You're talking perhaps 80 bytes overhead per allocation, plus the overhead of storing the pointers and the data tables for where things are located. And all those allocations live in data structures, which have their own overhead. And adding all those relationships takes time and data space. As a parallel, think about the difference between a million byte array versus a million one-byte allocations. You can allocate a million byte buffer quickly and easily. It takes a million bytes, plus a few bytes of overhead. That allocation is quick and easy with a starting point and an offset. You can traverse the buffer quickly by iterating along the array, which is a pattern the CPU loves. Allocating a million buffers each of one byte is radically different. You still have a million addressable bytes, but it requires a million calls to the memory allocator, a million references to all the bytes (with 8-byte pointers the addresses require 8x the space of the data itself), and traversing the million bytes probably means the CPU is constantly jumping around, unable to use predictive patterns for memory prefetch. And when you're doing using it, instead of a single call to release it, you need a million release calls, each with their own overhead. I'd spend some thought to figure out if you need the extra structure. There may be other structures that give better usage patterns.
  8. frob

    WHO recognising 'gaming disorder'

    Right, that's another area where some of the naming gets confusing. For some people the compulsive behavior is cemented because initially it triggers a chemical response. The behavior triggers the brain to emit addiction chemicals, some become desensitized and they seek the same high by doing more of the compulsion or obsession, others continue to get the brain's chemical component that reinforces the compulsion or obsession. Too many people equate the thoughts, the behaviors, and the chemicals. Each are different, each have different treatments. Either way, when it becomes a disorder people continue with the compulsion or with the obsession even though they are aware of the damage it is doing. Many want to stop, they simply cannot do it. Strong actions like completely removing game systems triggers incredible anxiety and other issues, just like removing all the sinks from an OCD handwasher. The obsessions continue, but being unable to fill the compulsion causes all kinds of negative actions. It depends. A student who has obsessive thoughts about school can become a better student. Up to a certain point it can be useful in driving the student to study more, or to mentally review subjects and topics covered in the courses. But beyond that point it interferes with life. Exactly where that line is depends on the individual.
  9. frob

    WHO recognising 'gaming disorder'

    I was afraid that might happen. At the risk of being overly pedantic, let's get some of the standard definitions out of the way. (My wife is in psychology, several relatives are in the medical field, and I've had plenty of discussions about these topics over the decades.) It seems we need some definitions. These behaviors are called compulsions, the thoughts are obsessions, neither one is an addiction like you get by putting a chemical in your body. Disorder means that it actually impairs their life. Everybody has compulsive behavior and obsessive thoughts, they only become a disorder when it harms life, such as preventing the person from attending events, preventing them from enjoying vacations, or otherwise blocking living life to the fullest. Binge watching a show so you're sleep deprived in the morning as a choice is not a disorder. Even when it is an mindlessly hitting "play next episode" is still not a disorder. The same binge watching because you cannot stop yourself, where you feel compelled to hit the button and you experience anxiety about it if you don't watch the next show or aren't watching a show, then it can become a disorder. This can mean someone has a strong obsession or strong compulsion yet it still isn't a disorder because their quality of life is not diminished. Again: everybody has obsessions and compulsions. And as I wrote in my earlier reply they can be tied to quite literally any behavior or any thought. They are a disorder only for a small percent of people. And finally, what changed is that it is specifically listed. The diagnostic code for most obsessions and compulsions does not specify the obsession or compulsion. The APA and WHO have added some named classifications because some people and groups -- notably insurance companies -- refuse to accept that certain thoughts or behaviors are harmful. There was a major outcry when gambling was specifically named where insurance companies hated that they were forced to pay for treatment. That's the big reason for this change.
  10. On the question generally, the trick is to find ways to do less work. To that end, the first is usually to not do the work at all: Only some objects can be interacted with, and usually the list is quite small. Only test against the few that are, rather than everything. If you can directly pick the item do that instead of searching for things to interact with. If you must have a pool to test, and you've kept it small from the first guideline, there is a broad phase and narrow phase. Both phases are based around doing less work. Broad phase involves general tests that are easy to compute. That is, you're doing less work by a very simple test. Spatial trees and distance checks fit into the 'easy' category: a distance check involves simple multiplication to get the squared distance which can be compared; testing a spatial trees can be as simple as a computing a grid index from an xy pair and examining some pointers. Once you hit narrow phase you know you cannot eliminate the item easily and you're forced to do the expensive calculation for interactions. This is often simplified by using simple physics shapes (simple spheres, AABB, oriented bounding boxes, bounding slabs) instead of complex model shapes. But sometimes those simplifications aren't possible, and sometimes the software must pay the cost of operations like swept volume comparisons of complex models. Regarding how old games did it, they did exactly those things. Often there was no searching. You were in a state where you could do something or a state where you couldn't, no search required. That's the best case. It feels like you have a choice when you're the player, but as far as the code is concerned there is really no work involved. When they had to implement it, the number of items were typically small. there may have been a single-digit list of interactive items in a screen or board or level. Consider the original SMB, there could only be 5 tested items at once. Tested items included platforms and vines. Enemies appeared in waves but couldn't exceed the numbers. This meant Lakitu couldn't fill your screen with spinys. There were some exploits with this in water levels and levels with bullet bills or 1-up mushrooms that helped with speed runs; as long as five testable objects were present you couldn't get more to enter the screen. Many times they ONLY tested against the players. That is, enemies never injured each other and often could pass through each other. This avoids the N^2 problem, leaving only N tests. Broad phase tests and spatial operations were cheap by design. Levels were designed so broad phase tests excluded items quickly. When cells were used levels were generally designed with distance in mind, an interactive cell may have only a single thing inside it. When distance checks were used everything was far away so nearly everything failed the distance-squared test. When narrower tests were required, they were extremely low costs. Often they were AABB tests, sometimes bounding spheres. This meant you could often clip corners or get lucky and touch the sprite yet be outside the tested area. The interactive items were simple, generally not pixel-perfect narrow phase collision tests.
  11. frob

    WHO recognising 'gaming disorder'

    It was already diagnosed by both the WHO's ICD and by the APA's DSM. In both it could be diagnosed as a compulsive behavior disorder. Many people with compulsive behavior about game playing have been diagnosed (and successfully treated!) under the diagnostic codes of compulsive behavior disorders or obsessive compulsive behavior disorders. What changed is that now this is a specially enumerated compulsion. The nay-sayers who claim the behavior cannot be an actual disorder now have this against their argument. That includes nay-sayers in the insurance industry who are forced to accept it can be an issue. People can have nearly any behavior become a compulsive behavior. People commonly think of excessive handwashing and aligning objects when they think of compulsions, but it can be any behavior at all. Having locked doors at home or thinking about the stove being on are common ones; many people have it trouble them during vacations and long trips, but a few people obsess over the ideas. Mothers repeatedly checking on children is common; most mothers think about their children, but for a few people the thoughts and behaviors interfere with their lives. Obsessive thoughts or compulsive actions about work or school classes is common. Risk-taking compulsions are common. None are considered a disorder until they start interfering with regular life. When someone hears about them it is easy enough for most people to realize this is not normal and needs help. Most compulsive behaviors are never specified in a diagnosis, the person is merely diagnosed to have a compulsive behavior disorder or an obsessive compulsive disorder. Only a few specific behaviors have been specifically enumerated, in part because they are severe yet people don't think they are real health problems. Gambling was controversial when it was added as a named diagnosable item, and many common folk who didn't know better said that people couldn't be hooked on gambling, it was just a bad habit. Hoarding was also controversial when added, many common people struggle to understand that hoarding isn't just that the person doesn't want to throw stuff out, it is that they cannot get rid of things without psychological harm. A kleptomaniac is another, they cannot stop from taking things even when they know it is wrong and even when they make a concerted effort to stop. They're not taking things because they want to, or because they covet the items, they are incapable of stopping themselves. Telling them not to steal doesn't help because they DO know better. Trying to explain it is wrong doesn't help because they ALREADY know it is wrong. Many times they don't like that aspect of their lives and they would change it if they could. It takes professional help to change the behavior. Relatively few people are affected by the condition and most thieves don't have it, but it is a true medical condition requiring professional help. Sadly there are people who refuse to accept that certain behaviors are actually compulsive, that the person cannot help themselves and cannot stop themselves no matter how hard they try. This affects all entertainment. Most common folk don't seem to understand that binge watching, or being a couch potato, or a lounge lizard, or even a gamer, for some people is not just about being lazy or choosing to play before getting the work done, or choosing to play late into the night. For some people it is a behavior they cannot stop, just like the person compelled to wash their hands. By specifically enumerating it, they're more likely to accept that some people can have it as an actual condition rather than "just being lazy".
  12. Just to be clear, what is being automated? The game at its core is a connectivity graph. You pointed that out in your own post. Since this isn't in For Beginners, we assume you know how to manipulate a graph. Manipulating that type of graph is fundamental in computer science, they are included in the earliest data structures and algorithms courses. Often in the first year of studies they start with trees then include more connected meshes. The other part, creating a connectivity graph out of an image, is not something that can be easily automated. Identifying areas of uniform color is straightforward enough, but anything more than that requires either a human or an enormous amount of computing work. For example, how would you know the British Isles are a single unit, or Indonesia is a single unit? And heaven help the machine that must figure out the mess of northeastern Canada and Greenland. Don't automate that part. Drop it in an image editor like Gimp or Photoshop, draw boxes around each zone, color each box with an indexed color of 1, 2, 3, 4, etc., and use those to build your clickable regions. When the user clicks on a point, run the coordinate through your indexed image, get the number, and use that to know which node the user picked. (You can use more complicated regions, but there is no need.)
  13. frob

    wait loop

    Modern graphics don't work with "erasing" like that. The view is obliterated every frame and a new image is drawn fresh from scratch. An enormous number of graphics algorithms break if you try to draw a new frame on top of an existing frame. There is no concept of "erase". What you have there will add another polygon, nothing is ever removed. The API doesn't support the operation. Instead, wait for the next frame either by the next pass through the loop or by invalidating the scene for a new redraw. Remove the item from the things that need to be rendered. Then render the next graphics update. This is part of what is meant when describing how to decouple rendering from gameplay.
  14. frob

    Why are enums broken

    All this reminds me of the problem that naming things is hard. Enumeration means something. For historical reasons programmers use enums to name the bit patterns, but generally flags are not an enumeration. An enumeration lists all the things one by one, every name must be present in the enumeration. We don't enumerate FlagsAB, FlagsBC, FlagsABC, FlagsAD, FlagsABD, FlagsACD, FlagsABCD, and so on, but that is what an enumeration would do. The grouping was done with enumerated types because they were silently converted to integers. You can implement flags with type safety using wrappers, using template magic, using a class like a bitset, or similar. But when you're doing that, we should stop calling them enumerations. At that point they are bit flags, not an enumeration. If that's what you want, implement a flag class instead.
  15. frob

    game programming

    This is one of my biggest concerns when hiring someone who doesn't have a CS degree. If they have no degree or a degree in a different field, I need a lot of reassurances that they have a broad knowledge base. One of the biggest benefits of a computer science degree is that as an employer I have an assurance that the candidate has been exposed the full range of topics. The person many not remember the details but if I talk about state machines or talk about heapifing data to pull by priority, or talk about network bandwidth, or talk about manipulating relational database on the database, or talk about cryptography and the risks it solves or the risks it doesn't solve, a CS graduate should have a basic understanding of all the topics. As part of the program a CS graduate should have some exposure to the full breadth of the field, even if they didn't dig deep into every topic. Those who do not have the degree and are self taught tend to have more limited experience. There are topics they didn't teach themselves. Sometimes it is due to lack of interest, the person has no interest in relational databases so they don't study it. Other times it is due to pure ignorance, they don't know that they don't know it and therefore have no knowledge that they could study it. When an applicant does not have the degree I need to quiz and test them to ensure I'm satisfied with their knowledge. As one example of this, years ago I worked with a self-taught programmer who had worked on many games over the years. He was working on a data processing tool and was taking far longer than expected. Eventually others were brought in to help, and he showed he was having trouble figuring out all the combinations of options to the tool. He had built a state machine that handled much of it since he was quite familiar with that, but he had absolutely no concept of a grammar. Some of us sat down with him, learned about the state of the tool, and it was painfully obvious he was trying to implement every step of a grammar through a convoluted state machine, making a bunch of states at every step to account for each option. Although he had been a game programmer for years, he never learned about grammars and didn't even know they existed. Sure he'd seen documentation that explained grammars, but he thought they were a convenient documentation format and didn't know how they worked. He had a hole in his education that a CS student would not have had. Having a degree helps assure the employer you've got the background you need. It will help you every time you apply for a job. You can gain the knowledge on your own, but neither you nor your employer will know what gaps you've got until you fall into a trap like the one described. If you don't have a CS degree and I'm interviewing you, you can expect some questions on a range of CS topics, particularly theory topics, that you may not have studied on your own.
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!