Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 25 Nov 2005
Offline Last Active Today, 03:39 AM

#5269155 Criticism of C++

Posted by LorenzoGatti on 04 January 2016 - 03:05 AM

The constructive answer to complaints about language flaws is discussing how to mitigate or accept them. For example:

  • "Templates are ugly": a respectable opinion, but as a matter of fact duplicating code by hand with slight variations in a number of non-template classes is far more ugly.
  • "You cannot print enum values": by writing the enum with clever macros and templates you can (any particularly good example to recommend?)
  • "std::vector<bool> sucks": then don't use it. If you need a true std::vector, you can usually afford it to be of a normal numeric type; if you need to pack one boolean into one bit, you don't usually need your special container to be vector<bool>.

#5267621 Alternatives to zombie apocalyptic settings

Posted by LorenzoGatti on 23 December 2015 - 04:30 AM

  • In the future, Earth has been hastily abandoned, maybe because of some environmental collapse, and after a long time someone tries to return; it is a short trip from the space colonies, and many people do it for a variety of reasons. Cities and specific places contain abandoned treasures, but also dangerous autonomous robots and of course people. Wild animals are a much smaller threat, even if they are not the traditional ones.
  • In a fantasy world, there have been no news and no travellers from a large and prosperous island kingdom for the last few months; several expeditions have already failed to return. As your ship approaches their capital, you see a completely deserted port.

#5267147 trying to think up a new way to level up

Posted by LorenzoGatti on 20 December 2015 - 08:32 AM

In Dungeon World characters level up after getting a handful of experience points and experience points are earned when failing a roll. The trick is that failing a single roll is a very big deal: it means getting hurt, failing at an important task, often a strategic turn for the worse.

Players are therefore mildly encouraged to push the envelope: they can become more powerful only by doing something hazardous and difficult. Easy life is not for adventurers.

This kind of system can be good in a computer game if the player is in control: flexible schedule (to get into trouble when the characters are ready), risk mitigation opportunities (e.g. allowing easy retreat in most cases, instead of punishing the player too much), an obvious challenge to complete the game quickly and/or with limited resources because playing it safe is easy.

#5266636 Sailing game: should players consider the wind?

Posted by LorenzoGatti on 16 December 2015 - 05:40 AM

Sail boats have very limited acceleration, and when they lose speed, they drift downwind. Tacking (apart from roll-tacking a small racing dinghy) kills pretty much all your speed, so repeatedly 'zig-zagging' is rarely an efficient way to get anywhere, and would only be used when tacking up a narrow channel, or the like.

On the open ocean, it's not uncommon to hold the same tack for multiple *days*, before tacking back. Even sailing between closeby islands in the caribbean, we'd often take just two or theee tacks of several hours each.

Many people (including me) are used to seeing the excessive tacking of America's Cup and similar racing, where one needs to remain on course and close to the opponent and the boats are designed to lose little speed.


Your observation suggests that the best user interface for tacking might be the completely explicit one of changing course. AI assistance could still play a role in easy navigation to adjust the course depending on varying wind strength and direction.

#5265838 Sailing game: should players consider the wind?

Posted by LorenzoGatti on 11 December 2015 - 03:00 AM

You are already committed to a simplified but realistic physical model of the ship, with accurate accounting of weight, buoyancy and the vertical position of the center of gravity. Extending it to model wind forces (and keeling over if you make a tight turn) seems natural.


This doesn't necessarily mean tacking explicitly: an AI assistant can take care of easy sailing, letting the player specify goals (e.g. a nearby island) and sit back, with direct control only near obstacles (including entering a port) or in combat situations.

#5265011 Storyline in a 4X

Posted by LorenzoGatti on 05 December 2015 - 07:58 AM

In a game about the emperor, every "faithful" civil servant may lie to the emperor, lie about the emperor's will ,not obey orders, take initiatives, etc. There might be player incentives for letting characters cheat the emperor, for example not offering enough time to read everything he signs.

Shock the player with the realization that the Empire is not a machine that does exactly what they say; and that if it is a machine, the emperor is only a cog.

Procedurally instantiating plots of "conspiracy, treachery, usurpers to the throne, secret organization forming" seems unavoidable; with rich models of NPCs, choosing appropriate ones for each role (e.g. embezzler, foreign mole, blackmailer and blackmailed, etc.) should be straightforward.

#5264861 Alternatives to dynamic_cast

Posted by LorenzoGatti on 04 December 2015 - 06:32 AM

The performance penalty of RTTI is unavoidable, and unlikely to be lower than that of virtual function calls (which are a less general mechanism).

Virtual functions are also a much cleaner, safer and more principled way to "unmix" objects of different types that have been confused together (like your students and employees).

Of course, in many context the best solution for your example is maintaining separate lists of students and employees rather than a single list of people.

#5264211 How Is This Pixel Art So Detailed?

Posted by LorenzoGatti on 30 November 2015 - 05:29 AM

The pixel art in Hyper Light Drifter is NOT particularly detailed; on the contrary, it belongs to the contemporary "retro" style of low resolution for the sake of blockiness and flat colour without trying to shade well.

The coherent stylized look and the good animation timing demonstrate skill, but as pixel art it's very simple and cheap.

Technically, I think a lot of what you see is artfully shaded 3D scenery, with some hand-drawn sprites (the character, some cutscene elements, the flickering flames, etc.) on top.


Off the top of my head, I suggest Dodonpachi, Metal Slug (whole series) and Super Street Fighter 2 for a crash course in actually detailed pixel art.

#5264200 dealing with a multiplicity of AI states

Posted by LorenzoGatti on 30 November 2015 - 03:00 AM

The purpose of a planner is figuring out what to do when immediately executable actions don't achieve goals directly and therefore choosing an appropriate one isn't obvious.

For example, running directly away from the campfire ("flee from fire" goal) is an approximation of the best way to escape: it's optimal in completely open terrain, but it could lead the animal into a cul-de-sac with impassable obstacles; a planner that figures out an appropriate path to a good place far from the campfire and can issue a wider choice of orders (including going near the fire to reach an opening before going away) is a more robust controller.

#5263942 Preventing players leaving the play area where an obvious geographic obstacle...

Posted by LorenzoGatti on 28 November 2015 - 08:08 AM

I second the suggestion of hard and harmless fences (as opposed to venturing into the desert and dying). If players must explore the whole map, they expect it to be not only finite, but not diluted by large amount of useless empty space at the borders.

You just need appropriate warning messages; apart from the previous good suggestions, consider breaking the fourth wall with words (e.g. "Thank God, you have nothing to do in the Desert of Skulls. Maybe in a sequel.") or graphics (e.g. a thick red line on the ground, matching the position of an invisible wall).

#5263695 Randomize small maps for 2D-RPG? Rooms etc

Posted by LorenzoGatti on 26 November 2015 - 08:14 AM

Depending on the environment type, arranging pre-made objects of various sizes in a large empty environment might be simpler and/or more effective than matching edge types of Wang tiles (which are subject to combinatorial explosion, usually causing uncanny regular structures due to not supporting a large part of the plausible edge types). For example:

  • For a JRPG-style village, start with grass and place entrances around the border and prefab houses in the middle, then build pathways between houses, a fence around the whole village, trees or rocks outside the fence, etc.
  • For a city, place horizontal and vertical roads at random positions, then fill each rectangular space between them with a combination of buildings, alleys, empty space, etc. of the appropriate size.
    Irregular slack between buildings can be added to gardens and courtyards and fenced procedurally.
    Adjacent blocks could be merged, removing the intervening road segment, to add variety (very large buildings, parks, squares, etc.) or large blocks could be split into sub-blocks independently, even recursively one road at a time, for a more medieval look.

#5262726 Tower Defence game sans war element

Posted by LorenzoGatti on 19 November 2015 - 04:55 AM

The war theme in tower defense goes hand in hand with the basic TD game mechanic of towers doing something to enemies (mostly shooting them) until they cease to exist, and with the corresponding player feedback of seeing rapidly shrinking health bars and the like. Monitoring enemy health is a necessary performance measure that guides tactical estimates of whether the enemies are being hurt fast enough, tower construction and enhancement and use of special attacks.


Destroying enemies wholesale is the key element I'd try replacing, for example with simply stopping or delaying them (which allows player feedback to consist of enemy positions and status markers and timers, without health bars):

  • Perimeter defense against mosquitoes or flies in a summer evening. Towers that create soft forbidden zones (e.g. perfumed candles), directional air blowing to push insects back, lamps to attract them, various types of barriers, and of course many lethal options like spider nets, automated laser arrays, zapping or sucking traps, insect-eating birds and insects, etc.
  • A rather full-contact fantasy sport in which the offense team tries to have one of them go from A to B as fast as possible and the defense team tries to slow them down. Towers and attacks would hurt or daze or knock over enemies to disrupt movement, stop them into place, make them slide (into obstacles or off the road if possible), directly push or teleport them away, etc. Strategy would be about optimizing obstacles and making the enemy team pile up at choke points; a sub-game of attacking and repairing the towers would fit well with a team sport setting (the offense team fields specialists to support a few runners that are meant to reach the goal).

#5261883 Skill point curve

Posted by LorenzoGatti on 13 November 2015 - 05:56 AM

I recommend interpolation between design objectives: at certain points of the game, some reference character "builds" should be both equally strong (unless there's a good reason) and equally expensive. First balance how valuable the stats are; costs will follow. Using a computer allows unlimited complexity of the cost model, without the compromises of tabletop roleplaying games.

For example, suppose character stats are brutality, spellslinging, dexterity and toughness and expected character types are wizard (very high spellslinging, very low brutality), dumb fighter (high brutality and toughness, no spellslinging), technical fighter (high brutality and dexterity, low spellslinging) and ninja/sniper (very high dexterity, medium toughness, low spellslinging). The expected stats (B/S/D/T) of a starting character with 100 character points could be 2/12/4/4 for a wizard, 9/0/6/8 for a dumb fighter, 8/2/7/5 for a technical fighter, 5/2/12/5 for a ninja. Obviously, these values need to be validated by playtesting (including playtesting that weird character types are either as good as standard ones, or inferior for obvious reasons, e.g. insisting on average stats and getting neither a bonus melee attack for high brutality like a fighter or an extra spell package for high spellslinging like a wizard)..

After a while, the characters are supposed to have 600 character points and "normal" characters are expected to improve their stats: 4/18/6/6 for a wizard, 15/0/8/9 for a dumb fighter, 12/3/9/9 for a technical fighter, 7/4/16/7 for a ninja. If, like in this case, the sum of the stats of every character type is almost equal, the cost curve could apply to the total of a character's stats: the first 23 stat points cost 100 character points, the next 10 stat points cost 500 character points. (for example, assuming a quadratic curve, a*SP*SP+b*SP= CP, gives a linear system: a*529+b*23=100 and a*1089+b*33=600).

#5261095 Help with specs for laptop

Posted by LorenzoGatti on 09 November 2015 - 02:50 AM

The choice of 4,8 or 16 GB of memory is a straightforward budgeting problem: what do you plan to run simultaneously?

Real example:

  • 1.5 -2 GB various web browsers (including always open web mail)
  • 1 - 1.5 GB odds and ends
  • C# work:
    • 2-4 GB: one virtual machine with an old Windows version
    • negligible: assorted remote desktop sessions
  • OR Java work:
    • 3.5 GB Eclipse
    • 1 GB Websphere
    • 1 GB (transient) Maven

Clearly, my workload fits tightly in 8 GB. With 16 GB  I could allow Eclipse to use more memory, or run a second separate VM with a different C# development environment in case of need.

#5260483 Need advice on creating a tileset in Game Maker

Posted by LorenzoGatti on 04 November 2015 - 05:48 AM

Super Mario World offers a nice example of the sort of ramps Servant explained. Ripped graphics:




EDIT: Also, an in-depth guide on editing a tileset. http://wayofthepixel.net/index.php?action=profile;area=showposts;u=2826