• Content count

  • Joined

  • Last visited

Community Reputation

10978 Excellent

About rip-off

  • Rank

Personal Information

  • Interests
  1. Can you describe at a much higher level what you're trying to achieve? Is the AI trying to predict where objects will be at some point in the future?
  2. Does violence stem from video games

    I agree with others who question the survey, I tried to answer it and found the questions ambiguous and/or leading. In my case, I abandoned the survey part way through due to these issues. Even if this were fixed, if the majority of the survey respondents are people who have an active interest in game development, that will likely skew the results (unless your aim is to measure beliefs in the game development community specifically). In my personal opinion it seems unlikely that playing violent computer games at an inappropriately young age is a common cause of real world violence. Sadly there will always be a few outliers, and the sheer novelty of it will attract undue media attention and make it seem to the causal observer that there is a much bigger "problem". While I'm thankfully sheltered from day to day experiences of violence, the little that I have seen anecdotally I would correlated with poverty, lack of education and opportunity and I would speculate that there are cyclical aspects where the individuals were raised in difficult circumstances (e.g. abusive parents). I find it curious that there is such a focus by some on computer games in connection with real world violence. One possibility is that it serves as a distraction that diverts attention away from the more fundamental issues that would need to be addressed to reduce violence, measures that might be unpalatable to people in power (wealth inequality, etc). Another is that the people who drive these conversations are earnest but have (IMO) "simpler" view of the world, driven by emotionally vibrant anecdotes rather than statistics and seeing direct cause and effect where other people might see co-incidence or mild correlation. Yet another might be that these people object to the existence of the violent computer games and don't mind exploiting tragic circumstances to demonise them in order to regulate and/or censor the games.
  3. Goodbye!

    Thanks for all the fish!
  4. I'd recommend watching the video "Playing to Lose", which might get you think about the problem in a slightly different way:
  5. Deciding on what your gameplay and design is.

    Experience. The games you love were not the first things that their authors did. In addition, commercial games are team efforts, you might be surprised at how big those teams are - check the credits! Uou need to decide which skills you want to invest in. Art, game design, music, programming, etc, these are all areas that one can dedicate a lifetime to mastering. Few people will be able to do all the above for even a modest game (exception that proves the rule: Cave Story?). Start small. Make clones of other games, or mods. Hone your chosen skills. Try to find others who have the skills you don't - for example an artist friend can sketch concept art that could guide your visuals. Keep your best ideas simmering, evolving, motivating you to improve. You'll be disappointed if you try too soon - imagine someone expecting their first painting to be the Mona Lisa! When you have more experience, you'll have a better idea of what you want (based on your skills), what others will bring to the table, and the uncertainty of discovering the answer to the questions that are best deferred to leave the design space open for exploration.
  6. random selection of array elements

    Whether it is mathematically correct depends on whether you've defined what "correct" is. If you're using it for a game (presumably), then if it "feels good" then that is probably enough. That said, the code you've posted may not very general, I suspect, as it depends on the largest number to calculate the "weight", so I imagine you might be less happy with the results if the largest number were either extremely large or not very large compared with the others. Generating the random numbers inside the inner loop could result in surprising distributions, particularly as the array size increases. That said, I cannot really visualise the resulting distribution, I could be wrong, these are just intuitive guesses. Without knowing your use case, from your description you probably do want the "Fitness proportionate selection" algorithm.
  7. What exactly do you have at the moment?
  8. Nobody Wants A Cybergod?

    The description about missiles, being the most concrete description given so far, is interesting. While I've not played the game, so I can only speculate, it sounds like such an approach has the potential to add additional mechanical depth to such a game. Now, to play devils advocate against such an approach. from your description it sounds like it takes power away from the player and gives it to the ship "captain", which may not be ideal. For example, imagine the ship in question is likely to be destroyed shortly - perhaps the player would rather the missiles be fired now while the ship is definitely alive rather than gamble on whether it gets to the "perfect" attack position. Or perhaps the player has a different goal in mind, maybe they want to feint an attack for some reason, hoping to distract or panic the opponent (assuming multiplayer). Off the top of my head, and bearing in mind I've not played the game in question, another approach might be to make it easier for the player to co-ordinate attacks between multiple ships, rather than to try automate this for them. This might feel more subjectively fun approach, the player feels like they've executed the tactics rather than issuing an order and watching the game "play itself". In any case, it is very important to realise that the lack of intricate details is not a flaw in a game. The fact that the game chooses a simplistic modelling of missiles is likely an intentional choice. The designer may be trading off such depth for other goals like shorter play sessions or reducing the complexity to achieve a broader appeal. That is not to mention the production difficulties like trying to integrate many competing features in a balanced and accessible fashion, or simply the commercial necessities of completing the game in a given timeframe. Incredibly detailed simulations exist (e.g. Dwarf Fortress), but they are a niche. In contrast, if you look at ancient games with relatively simple and abstract rules. like chess or go. They're deep game in a different way, ones you can play for a lifetime. Their lack of detail is not a limitation, their enduring popularity attests to this. Maybe you've got a decent idea, but that shouldn't take away from the many developers designing different games and being successful with it.
  9. Nobody Wants A Cybergod?

    It is easy to write a design document, even one that is not possible to implement, at all or with acceptable fidelity / performance. From what you say, I think it may be the case that you are unaware of the infeasibility of your ideas. For example, simulating reality at the sub-atomic particle level is not a new idea, the reason nobody is making games like this is that computers are not powerful enough to simulate a non trivial number of particles. Consider that the most powerful supercomputers are needed to approximate weather forecasts, and they don't try to model at the level of particle interactions. Then consider how imperfect the results of these predictions are. You're talking about people with obscene amounts of resources, have you really solved problems that they haven't? I may be wrong, because you haven't described your idea in sufficient detail, but I infer that your idea is basically some kind of game / physics engine. I think you believe the ability to predict where the game objects will be in the future is somehow new, which it is not, and will that it would improve game A.I. to make use of this. A.I. can already try to predict the future, if the designers so choose. Any limitations you feel in computer opponent intelligence is likely due to the difficulty in actually making use of the resulting data, it is not due to a deficit of imagination on behalf of the designers to try this. For example, a key difficulty is predicting how the human player will react as events unfold. It would be one of the biggest breakthroughs (technologically and philosophically) in history if you or anyone could solve this. The goal of games is to be fun. Perfect A.I. is not fun - how much fun would it be to play chess against a computer that can beat any grand master? See "playing to lose", an excellent video explaining some of the decisions behind the Civilisation computer opponents. Sure, there are players who crave an ultra realistic game with incredibly difficult A.I. - but it is a niche, it is not the "Holy Grail" you claim. In summary, ideas are easy, execution is the hard part. If your experience hasn't taught you this... p.s. "Rube" seems like a terrible name for any project, much less one as revolutionary as the one you claim.
  10. I've hidden some more unhelpful replies. To Asokanta, this is not a real time chat. Please have patience and wait for a reply. Also understand that we're not here to write your code for you, but to help you learn how to write your own code. To others, please bear in mind that Asokanta is relatively new to this and what might seem like a straightforward suggestion could be confusing or not very obvious. All future replies should be respectful and on topic. Failure to follow these instructions will result in moderation action being taken.
  11. In your updated code, you have not declared a global variable "Z2". It is not clear to me whether you really want to introduce a new global variable, or whether you want to update one of your existing variables from the configuration settings. In general, setting a global variable is done like so: #include <iostream> int global = 13; void changeValue() { global = 42; std::cout << "Changed value: " << global << std::endl; } int main() { std::cout << "Starting value: " << global << std::endl; changeValue(); std::cout << "Updated value: " << global << std::endl; } If you want to declare a new variable, then you need to add it to those globals like you have done for the others. The other thing to be careful of is to not declare a local variable with the same name: #include <iostream> int confusing = 13; void changeValue() { int confusing = 42; std::cout << "Changed value: " << confusing << std::endl; } int main() { std::cout << "Starting value: " << confusing << std::endl; changeValue(); std::cout << "Updated value: " << confusing << std::endl; } If you run this, you'll notice that the global has not been updated. This is because a new variable with the same name was introduced in "changeValue".
  12. I've hidden some negative comments that weren't helping. Please, be respectful and understanding of one another.
  13. Can you show us your current code, after you tried making the variable global?
  14. Try Catch Statement Question [2]

    You are partially correct, many exceptions can be avoided by placing explicit checks instead. In the example you quoted, catching a FileNotFoundException could be considered poor style (abusing exceptions as flow control), an alternative approach would be to check if the file exists explicitly before opening it. However, as Kylotan mentioned, exceptions can still happen - in your example, even if you manually check whether the file exists, there is a "race condition" between the two steps - maybe the file is on a network share and the Wi-Fi suddenly drops! Another source of exceptions can be misunderstanding the code. When the codebase becomes large, and the team working on it grows, it can happen that two pieces of code with differing expectations can interact. For example, maybe one module was written with a strict policy of no "null" references being passed or returned, but another module allows null. If someone who doesn't remember this fact is writing code on the boundary of the two modules, they could pass "null" references into code that isn't prepared to handle it. This can happen even as a solo developer, with enough time passing the code you wrote a year or more ago will feel like it was written by someone else! Given that exceptions can occur despite your best intentions, it is very common in Java programs to have a high level try ... catch statement to handle all unexpected exceptions that were thrown, and try to show some kind of error report to the user. Even if you're quite thorough in trying to avoid exceptions, once you release software into the wild world someone will eventually break your program, so having a way to capture the error so that the user can submit a useful bug report to you can be quite useful. A related issue is throwing your own exceptions. Obviously, you have limited choice when it comes to exceptions that the language, standard library or crucial third party libraries might throw at you. It can be a quick way to "bail out" of an operation, but overuse of exceptions can make the program difficult to reason about and can contribute to requiring catch blocks to handle them. Whether to use exceptions over return values is somewhat of a philosophical question. I would say that try ... catch is a useful construct, but one that you should try to use sparingly. If you find yourself using it often, consider whether there is some other way to avoid the error in the first place. Note that try ... finally is a different construct, you should not worry about using that where necessary. My advice would be to avoid throwing exceptions, but don't be afraid to do so when the alternative would be worse. They are particularly suitable for handling programmer error, where something is wrong with the internals of the program, for example a critical array is empty but it should never be. An example of this kind of usage is the "assert" keyword, which can result in an AssertionError being thrown. Trying to handle all unexpected situations with return codes can lead to lots of complexity, because "unexpected" errors can happen in lots of places and you would need to propagate this error to every caller.
  15. Again, watching a video is a different experience from actually playing the game, but looks like a big improvement to me - well done! Just the movement alone looks way better, it gives the entire thing a different feel I think. Is the game playing a bit more like what you were looking for now? A potentially simple thing to look into is toning down or changing the particle effect when somebody is hit - it looks a bit like an explosion at the moment. I'm not an animator, but the sword attack animations look like they could use some attention. That said, I would also say that the player's kick attack looks more dangerous - where it looked a bit too weak before. Have you playtested the game with anyone? Would it be hard to package up a demo? Soliciting feedback about videos, while better than nothing, will tend to result in a focus overly on the visual impact and will not give you as much insight into the interactions. As an example, imagine if people could have given feedback on Tetris during development. The game is aesthetically simple and arguably even boring to watch, but actually playing it is a different experience altogether! But the feedback Alexey Pajitnov might have gotten would not have been about gameplay (e.g. the ability to commit a shapes position and drop it immediately), but rather would naturally be on the more superficial elements. Finally, remember we lack a lot of context about the game. I don't know if this is the only mode, or if there might be others. I don't know what kind of enemies you're thinking of having, nor what kind of levels and level elements. Will there be multiplayer? I don't even know whether it is a purely action game, or if there might be other aspects (e.g. stealth mechanics). Fleshing out your vision might help us understand what you're aiming for and whether that is coming through to us.