Jump to content
  • Advertisement

LorenzoGatti

Member
  • Content Count

    2212
  • Joined

  • Last visited

  • Days Won

    1

LorenzoGatti last won the day on September 5

LorenzoGatti had the most liked content!

Community Reputation

4564 Excellent

3 Followers

About LorenzoGatti

  • Rank
    Contributor

Personal Information

  • Role
    Programmer
  • Interests
    Art
    Audio
    Business
    Design
    DevOps
    Production
    Programming
    QA

Recent Profile Visitors

25936 profile views
  1. LorenzoGatti

    Review my AI idea for a FF7-like RPG

    You might be overestimating the impact of random elements on simulation cost: in many cases like an attack dealing more or less damage you only need to follow the highest or lowest possible result because any other outcome is strictly better, without estimating averages or complete random distributions. Can you elaborate? What game state are you processing? Maybe some inappropriate rules increase simulation cost without adding significant gameplay value.
  2. LorenzoGatti

    Review my AI idea for a FF7-like RPG

    I'm not an expert of this kind of game, but I'd expect the rules to be less flat than a simple race of dealing damage and healing damage. You mention a few "wrinkles" like action timers and a nasty bonus when a unit dies, and other plausible ones include defenses to avoid being hit and reduce damage, conditional bonuses (e.g. attack types vs. different targets), additional resource types (e.g. "magic points" that can be spent to use magic or drained away), restrictions to actions (e.g. stunning the opponent, throwing a heavy magnet to disable the opponent's steel sword), This kind of tactical landscape requires planning, although in probabilistic form: playing well should involve setting up a good combination of defenses, buffs and adverse conditions for the opponent, and maintaining or developing it, before and between using the most damaging attacks (as opposed to starting with a good move and repeating it until victorious or bored). You mention strategic principles that disguise planning (what is the situation going to be in the future?) as choosing actions smartly (what should I do right now?): coordinating units means planning the moves of all units in the team together, which is clearly strictly better than pretending other units are doing nothing looking for combos and exploiting flaws mean looking for a good final state when the combo is done or the flaw is exploited: not even special cases of pursuing an objective over the course of many moves. in the same vein, not falling into traps is only an extreme, obvious instance of not doing measurably bad moves focus on the right targets means that disabled and defeated enemies are a good thing: it should be implicit I'd frame this AI as, more or less, minimax exploration of the game tree, very deep, with cheap heuristic or in many cases exact rules to exclude bad moves very aggressively, and cheap heuristic functions to evaluate states (total team hit points would be a good starting point).
  3. LorenzoGatti

    Simultaneous turns? (turn-based strategy)

    You just need to find consistent and intuitive rules that fit your needs. For example, if you have a game similar to Master of Magic or Civilization, with complex armies of specific units that roam a mostly unoccupied map they can simply walk around simultaneously (turns processed after players give an order to each available unit), switching to a separate tactical scale "battle mode" when armies they meet. In this case you have to ensure that separate battles, should they occur on the same strategic scale turn, have no influence on each other and can be resolved in any order and provide interesting rules at the tactical level. On the other hand in a game about large and small stacks of abstract military force, like Risk, you can exploit the simultaneous resolution of multiple battles to introduce influences between adjacent locations in a graph (e.g. friendly units behind the frontline support the fighting ones) and perform heavy computations (e.g. ensembles of Markov chains)
  4. In your original example, the formation doesn't fit through the gaps: for instance, 4 and then 2 hit a X on their right as V enters the gap as drawn in the third figure. What are the exact constrains your formation need to obey? How large can they be? Since the map appears to be quite static, you could precompute pathfinding graphs for different formation shapes (i.e. the leader can walk into an adjacent walkable cell only if the other formation members can walk into the respective offset cells). It would be easy, exact, and cheap unless you have too many formation types for your memory budget or really huge maps.
  5. LorenzoGatti

    My main complaint with OOP

    In a good OO design, this doesn't happen. The Circle class Must be the representation of a circle in the geometric sense and nothing else. It cannot be allowed to depend on something that isn't geometry, such as a spatial index, a Canvas, or a file. This is called the "single responsibility principle": forcing together multiple responsibilities means creating tensions when anything changes. Should derive from a Shape interface or abstract class, together with other shape types. This makes clear that there are functions that apply to any shape (e.g. computing area, perimeter, bounding shapes), and operations that only make sense for circles (e.g. construct a regular polygon with the same center and the same area and a given number of sides, which can be useful as an approximation) In practical terms: The renderer should find a way to treat all shapes the same way (e.g. if the Shape interface offers a point containment test and a bounding convex polygon the renderer can test samples inside the region of interest) or segregate different Shape subclasses by their different rendering methods (e.g. scanline rendering of circles, scanline rendering of whole convex polygons and scanline rendering of a triangle decomposition of nonconvex polygons) A spatial index should probably deal with Shapes and their bounding shapes only. Serialization could be allowed in Shape classes because it's so basic and intrusive, but keeping it outside would be cleaner.
  6. The value of adding and removing data depends on the application. In a game with rather complex entities (e.g. a FPS with complex animations, AI state, character conditions, etc.) it might be a good idea to let level designers add data to entities with ad-hoc scripts; in a simpler case hardcoding archetypes isn't a big deal (e.g. adding guided bullets in the same FPS, which are like other particles with the addition of a target, and whose ECS administrative requirements would be negligible compared to the new requirements of spatial indexing to find targets and simulation methods that alow aiming at correct positions)
  7. You can "create tables" with well-designed templates (a "table of T" with assorted extra template parameters to represent metadata, behaviour variations, etc.) that are going to grow more sophisticated, and be upgraded for all components, as you develop your game. In case of allergy, you can "create tables" with all sorts of code generation tools instead of C++ templates. In any case, a std::vector<T> without any indexing and management is a very rudimentary data structure for the purpose of holding and accessing components, and handling multiple arrays "by hand", throwing away normal C++ facilities like allocators and names, is a complication for no benefit and not a simplification.
  8. LorenzoGatti

    Problem with my laptop

    Unless it's a known hardware issue with an inexpensive reliable fix (have you found manuals and user support forums?), I'd just buy a new laptop: adventurous repairs are in the same price range as replacing the whole thing, and sending your laptop out for, say, a motherboard replacement can take more than two weeks. Maybe you can reuse the RAM sticks and the HD or SSD unit to reduce costs.
  9. LorenzoGatti

    Navigating the GJK/EPA/SAT contact point jungle

    If you can populate your "persistent cache" of contacts over the course of successive frames, enduring an incorrect simulation state that causes artifacts, isn't it possible to repeat the contact computation in the same frame instead, until you find all contacts? Regarding performance, knowing that nothing moves between iterations should allow some simplifications, and doing all work for the same collision at once would improve locality of reference.
  10. LorenzoGatti

    "Blueprint" Serialization Format

    You seem concerned about non-problems and unconcerned about basic issues. I've never heard about AXOM, but for all the other structured text formats you mention there are good libraries that parse them to very convenient data structures in any decent programming language. Complex parsing is a solved problem; you should only worry about complex and error-prone manual editing, and from this point of view XML with advanced editors becomes a good choice. Your files are probably small enough to allow carefree use of easy to use parsers that load a whole file to a fancy generic object model, with no need for the extra effort of streaming file content or building frugal specialized data structures to save memory. As soon as you allow arbitrary user input (as opposed to editing operations allowed by your node-based GUI editor) you need to validate task definitions, regardless of syntax. I don't think visual editing of nodes and wires and textual editing are compatible authoring approaches. Given that a build pipeline or the like tends to have few and complex nodes and nothing interesting to show graphically, reducing the usefulness of a visual editor, and if editing task definitions by hand is important (why?) you should probably sacrifice node-based visual editing. For example you could use strictly automatic layout (or, more simply, read-only graphical reports of what a task definition does) to avoid polluting the task definitions with irrelevant graphical details and automatically generated meaningless identifiers. What's challenging to design in your task definition language is the abstract syntax (what building blocks? What data should they require and produce?) and semantics (e.g. where do tasks look for files? Is the language Turing-complete, or otherwise too powerful?), not the concrete syntax.
  11. I'm afraid you should examine your game concept with a more critical attitude. This is explicitly roleplaying drug use and acquisition, with the insult of presenting it as normal and realistic added to the injury of rewarding it with a major in-game strategic advantage, Such a game would teach that weed is the natural fuel of creativity, and represent rappers as a bunch of drug addicts. I can see how you could regard this kind of game element as a joke, but it's a very tasteless one.
  12. I would be wary of a game that promotes drug use so hard, apart from other troublesome rap music subculture stereotypes.Setting aside the theme, I think that if words are so important you should show them, with readable logs of the character's song and of the whole show, rap battle, etc. without inappropriate abstractions like "bullets" and colors. I suppose "slots" in the performance in progress can be filled by clicking or dragging boxes containing lines and verses.
  13. There should be a layered organization : the high-level GUI controller (the component that decides, for example, that since the mouse cursor has been hovering approximately in the same place for enough time, a preview of possible buildings at cursor should be drawn) can ask a service about game state and game rules questions like "what map tile is below this point" (corresponding to the mouse cursor, transformed toworld-space coordinates) and "what buildings can be built at this map tile". Then a proper low-level GUI module can draw preview animations of those buildings.
  14. LorenzoGatti

    How to convert RGB to ARGB

    Your array indices are wrong: pixels in the source image are 3 bytes, not 4
  15. LorenzoGatti

    How to convert RGB to ARGB

    Your code sample is completely #*@!ed up (some additions, some array access, absurd and unclear datatypes) does not convert a RGB image to a RGBA image, it does some strange interleaving of bytes from a four channel source to a four channel destination You should simply write into the corresponding channels of the destination pixels the red, green and blue values from the source image and the maximum alpha value (255 if channels are 8-bit unsigned integers, 65535 if they are 16 bit, 1.0 if they are floating point). Label your data properly (r,g,b,a instead of c1-c4) to understand what you are doing and to figure out whether you are swapping channels accidentally.
  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!