# LorenzoGatti

Members

1936

4437 Excellent

## Recent Profile Visitors

19011 profile views

1. ## Card Game - Play Mat Space

I suggest simplifying drastically the small version of the card images: no text, larger illustration and larger title. Words, icons and numbers should be as large, or almost as large, as their counterparts in the full-size card, which is presumably readable enough, or omitted completely. As important as card text might be, players can easily read it by hovering the mouse on a card miniature. Privileging the elements (name and picture) that make cards recognizable reduces player frustration, reduces mistakes, and allows familiarity with cards to gradually reduce lookups of the full card text.
2. ## Pathfinding Eikonal vs Grass Fire Algorithm

No, the eikonal equation defines what is a shortest path. "Traversing the areas" is what algorithms that compute solutions of the eikonal equation, i.e. shortest paths, need to do somehow. In the case of chapter 23 of Game AI Pro: Maintaining a list of active wavefront cells looks definitely like a "brushfire" algorithm. Are you confusing this basic building block of multiple source/single destination grid-based pathfinding with the full pathfinding solution described in the book (tile-based architecture, portals, caching, LOS special case, specific flags and data structures, etc.)?
3. ## C++ Problem with enum and binary or operator

Just separate rigorously an enum type for the parts of your bitfield and some unsigned integer type for the values. Only the latter type has operations. typedef uint8_t videoFlagsValue; enum class videoFlag:uint8_t{ useWindow=1<<0, useOpenGL=1<<1 } public bool isset(const videoFlagsValue v, const videoFlag f){ return v && static_cast<uint8_t>(f) } public void set( videoFlagsValue & v, const videoFlag f){ v=v || static_cast<uint8_t>(f) } public void unset( videoFlagsValue & v, const videoFlag f){ v=v && (! static_cast<uint8_t>(f)) } static void openGlWindowFix(videoFlagsValue & initFlags) { if (isset(initFlags ,videoFlag::useOpenGL)) { set(initFlags,videoFlag::useWindow); } } int main(int argc, char **args) { videoFlagsValue initFlags=0; set(initFlags,videoFlag::useOpenGL); openGlWindowFix(initFlags); .... return 0; } It can be improved with a class to tie everything together (maybe a template that can be used as a base class) and a constructor from a std::initializer_list<videoFlag>.
4. ## Backing up GitHub Repos

Your local git repository and the git repository you host on GitHub act as a backup of each other by design. If GitHub closes down, is hacked etc. clone your local repository on some other hosting service; if your computer passes away, check out the GitHub repository on any number of replacement computers. No commands fancier than clone, checkout, push and pull are involved. For further redundancy you need three or more copies of your repository (in addition to your own local one and the GitHub one), which could be a traditional backup of your computer (including your local repository directory, and if possible the whole working directory for completeness and convenience); restore by simply overwriting files other contributors, each refreshing their working copy on their respective computers from the same "central" repository other hosting services, with you and other contributors pushing the same changes to each shared repository For greater reliability you need automation. For example, a periodic task running on a internet facing server with its own git repository can pull changes from the GitHub repository and possibly push them to another public git hosting service.
5. ## C++ 32bit to 64bit conversion of file fixup code

What's important, from a design point of view, is making the whole system (file format, writer, reader) oblivious to pointer size. You shouldn't have the 32 bit version and the 64 bit version, but a single implementation that compiles correctly and behaves identically on all platforms. Offsets are measured in bytes and represented as 32 bits in the file because the file is limited to 2 or 4 GB and file content is unaligned (two assumptions that in some cases could be changed to allow smaller offsets), not because pointers are 32 bits. Pointer arithmetic in code needs to convert a 32 bit integer, (i.e. int32_t) to a ptrdiff_t and vice versa, at worst using type traits from the standard library (numeric_limits<ptrdiff_t> from <limits>) to check for overflow.
6. ## Font weights and thickness classification (in Freetype)

Narrow and Condensed are widths, not weights: they are traditional adjectives for variant font families that have a smaller character width than the normal font and a similar design. Wider designs are usually called Expanded, Extended or Wide For example typical Windows fonts include Arial (main design) and Arial Narrow, and Arial Narrow has the same set of weights as Arial, e.g. Arial Narrow Bold that looks like a narrower Arial Bold. If you use FreeType, why do you bother with matching a different API? What use do you have for descriptions of the font weight, except to report in some debug log or end-user report interesting details, found in the font file, of the fonts you are using? None of this data has any relevance to using the font to render characters. In case you are letting the users select fonts interactively, you can conservatively group them by name heuristics, without trying to guess and sort weights and widths.
7. ## Space emperor (the player) and noble houses (AI)

A space empire lends itself very naturally to a feudal hierarchy: central government, star systems (almost isolated from each other), planets and asteroids in a star system, separate colonies or nations on the same planet. As Polama suggests, federal bureaucracies are the natural "enemy" of feudal power, and they are supposed to be on the emperor's side; however, they might be defeated or intimidated or subverted. To avoid civil war, the feudal powers could be purposefully crushed by difficult tasks (e.g. defend your piece of the frontier from aliens) and competing for limited resources rather than directly conflicting with each other. Also, the purpose of the emperor should be to remain in power and make the empire prosper, not necessarily to replace an explicit and healthy feudal organization with secret influences and plots to control bureaucratic organizations. Depending on how the empire forms, the "nobles" might be: recently appointed by the emperor, and possibly temporary (e.g. a military governor) leaders (or more impersonal governments) of politically united planets or systems that join a federation and retain autonomy, also, leaders of megacorps, crime syndicates, political parties etc. various organizations that have (or once had) the resources to have a space fleet and "own" the particular planets they explored/conquered/colonized (maybe recently, maybe a long time ago) inflated from small-scale origins (e.g. the brother-in-law of the first emperor became viceroy of an important planet, and centuries later his family is wealthier than many alien empires; two or three Earth nations, the only ones with space colonization programs, have expanded to fill tens of planets each while the others merely provide exotic foreign tourists)
8. ## Browser game - Flash vs Js, questions

The Flash browser plugin is usually updated to fix bugs that can be exploited by merely accessing hostile objects; it's an outstanding security risk, far worse than more properly sandboxed Javascript. PHP, on the other hand, helps putting your servers at risk: assuming hackers will attack you with malicious HTTP requests in any case, the bad design choices and the plentiful bugs in PHP and many accompanying libraries make their attempts more likely to find something useful. Avoid PHP. Not a real question. Iavascript with WebGL is more likely than Flash to be efficiently rendered and to make good use of hardware acceleration, but look out for bad surprises (particularly with libraries that offer Flash-like entities and scene graphs).
9. ## Version Control Preparedness

Visual Studio 2015 or 2017 should be supported enough. Git support in Eclipse would be another well-supported option. The "command line" git tool actually includes git gui and gitk, two simple and serviceable GUI tools. The Magit plug-in for Emacs has many fans, but I've been unable to install it on Windows due to its assumptions about paths; it should work fine on Linux and OSX.
10. ## Souls-Like itemization question

If you reread your question, you'll realize that it doesn't explain enough. What is this "Souls" game you are imitating? What are you copying, and what do you intend to do differently? What's the role of sets of normally singular items like weapons and armor? Are the "too much" and "too little" you are worried about a concern about excessively good or bad equipment making the character overpowered or frustratingly weak, like in most games with roleplaying elements, or about more unusual aspects like the number of items found in the game, the number of item types, the cardinality of item sets, etc.?