Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 25 Nov 2005
Offline Last Active Today, 01:19 AM

#5144042 Looping a sound with reverb causes a "pop" at loop

Posted by LorenzoGatti on 03 April 2014 - 02:25 AM

If you have the melody w/o the reverb, make a loop of it 3 times, run it through the reverb, cut the middle one and use that. It will have the end of the reverb of the first melody, which should be enough.

Even better, play the original clip once before repeating the variant with added reverb: the beginning of the music shouldn't have a reverb tail out of nowhere.


Also, verify that reverb tails are shorter than your music clip; you might need more than one repeat to reach a steady state that allows looping.

In the editing technique suggested by TheChubu, the second and third repeat in the output should be identical; alternatively, if you process with reverb one copy of the music followed by silence you can directly measure how long does the reverberated output take to decay to silence.

#5143407 Thesis Advice: Narrative Game with Imported OTHER Player Character

Posted by LorenzoGatti on 31 March 2014 - 01:34 AM

You need a suitable premise and character relationship structure in which:

  • An arbitrary number of characters can be added without great consequences (up to the expected number of "new game plus" iterations, but degrading gracefully beyond that).
  • The additional characters are substantially similar to the player character. More precisely, the player character of the previous iteration: if players can choose between different playable characters there could be different classes of "reincarnated" characters.
  • The additional characters have a "personality" that the player can perceive and understand. This probably requires the cast of fixed characters to be based on similarly complex emotional/cognitive models. What important and meaningful actions can such characters use to express their personality?
  • Character personalities can be inferred from player actions. You need to guarantee that the player performs enough measurable actions to gather the necessary data over the course of a game (including short and/or unsuccessful playthroughs).

I suggest a setting with a socially uniform large mass of somewhat varied characters, from which the player character and the "ghosts" are selected: the fraction of important characters with a role in the story can increase (but remains small) in successive playthroughs without actually adding people.

For example, recruits in military training, pupils at a boarding school, construction workers on a half-finished space station, convicts in a prison, etc.

#5142536 90´s Platformer Collisions

Posted by LorenzoGatti on 27 March 2014 - 05:41 AM

Regarding the specific questions:

Should SAT be overkill for this?

It might or might not be a good choice of clever algorithm for "phase 2".

Should I represent the characters as circles, and check if they hit a line segment?

A convex polygon or (if the character isn't convex) a simple polygon is going to be much more suitable for a character than an ellipse; rounded corners can cause the character to stand in a wrong position, something quite unacceptable in a platformer. Ellipses are popular collision shapes for bullets, which are actually round and tolerate some approximation because they explode on contact.

#5142512 90´s Platformer Collisions

Posted by LorenzoGatti on 27 March 2014 - 02:40 AM

I suggest starting from the rules, and optimizing geometric acceleration structures later.

You can implement a generic query (e.g. what platform segments, at what time, and from which side intersect this object if it moves between these two positions) in a simple, inefficient and obviously correct way, use it as the foundation of a complete collision detection system that does what you want (e.g. one-sided barriers, sliding on slippery surfaces, etc.), and when you have refined your requirements try optimized, more complex and less general algorithms.

#5141643 There got to be a better way to manage animations.

Posted by LorenzoGatti on 24 March 2014 - 02:20 AM

Your animation management appears to be a finite state machine, which doesn't need to be hardcoded with constants and ifs and enums.

Instead, you should define a data structure to represent animation definitions, loaded from external files and processed by a generic animation manager. Your current ManageAnimation method is in class IActor, but it isn't generic: it assumes a number of states and events exist.

#5140040 Assets for tech demos

Posted by LorenzoGatti on 18 March 2014 - 09:59 AM

On https://graphics.stanford.edu/data/3Dscanrep/ there are several very large and mostly untextured models that are used in many scientific papers. The "Stanford Bunny" and the "Armadillo" should be particularly suitable for a demo.

#5138909 Controlling difficulty in a randomly generated game.

Posted by LorenzoGatti on 14 March 2014 - 05:18 AM

In demo 17, the player's speed is ridiculously slow.

Inertia adds severe difficulty to any shoot'em up: get rid of it, nobody wants to drift into a bullet because he dodged another.

Variable player speed is just asking for trouble; most players will try to play without adequate speed boosts and will be disgusted.


Firepower should be proportional to enemy amount, typically requiring powerups or a constant number and toughness of enemies. Otherwise even the best player cannot shoot down enough enemies to stay afloat.


There's no reason to restrict movement to 1 dimension, unless you are doing something similar to Space Invaders (i.e. keeping the player in the appropriate place behind shields) or the ship moves on explicit rails.

Dodging bullets and hitting targets is much more difficult in one dimension; Space Invaders compensates the problem with extremely predictable enemy and bullet movement..


#5138872 (mingw/winapi) growing exe size when linking to psapi

Posted by LorenzoGatti on 14 March 2014 - 02:04 AM

Increasing the total linked size by over twice the size of the added library is completely abnormal. I guess there must be some other source of code, such as

  • C++ template instantiations that you use to call the new functions
  • potentially large pieces of whatever libraries this "psapi" depends on


There are plenty of tools to list the content of an executable file: they should allow you to see which sections grow and which sections remain the same between the two versions of the program.

#5138405 Pokeclone mechanic opinions...

Posted by LorenzoGatti on 12 March 2014 - 08:16 AM

There's a serious balance problem: bias towards getting stronger monster than their parents causes grinding, bias towards weaker monsters makes breeding useless.

I would separate power level (starting low and fixed because it's a junior monster, and increased by training, special treatments etc.) and statistics/features (scaling up as monster power increases).
The "genes" could contain weights for stats, proportional to "baseline" stat values (excluding the increases that contribute to a trained monster's actual values); inheritance could give the offspring the average between the weights of each parent, plus some random noise, with initial stat values obtained by normalizing weights and multiplying for some constant. This way one could breed, for example, two monsters with high strength to get offspring with high strength, possibly even higher than either parent, but at the expense of other stats, making all offspring equally good (and as good as the parents).
Players would breed (and train appropriately) monsters with particularly unusual stats for their race in order to adapt to specific opponents or to support specific strategies (e.g. enough stamina to do a certain powerful attack one more time per fight), not to get more powerful monsters (which should involve training, experience and new monster acquisition).

#5137753 Best projects to learn OpenGL from scratch?

Posted by LorenzoGatti on 10 March 2014 - 03:34 AM

An even more basic exercise: setting up windows and contexts, with proper error handling and without stupid assumptions. Extra credits for multiple windows.


If you learn to tread carefully and check for errors, you will be ready when you have something serious to debug.

#5137749 Pricing a side-scroller game!

Posted by LorenzoGatti on 10 March 2014 - 03:28 AM

It depends on the market. A honest comparison with other games of similar type and quality will provide reference prices. 

#5136519 How to design spaceship missile combat?

Posted by LorenzoGatti on 05 March 2014 - 08:32 AM

Another angle on using cards: use them to represent resource or move allocation.

Assuming a reasonably small number of active nuclear missiles, fighters, bombers etc. for each immobile capital ship (like the engagements in Battlestar Galactica), each can be a token in a "battlefield" area and players can put face down cards next to them to represent their actions and interactions.

For example, there can be two decks per player, with different backs to sort them apart, one deck containing appropriate proportions of fighter or drone maneuvers like "quick dodge" (good against lasers), "evasive maneuver" (good against guided AA missiles and ramming), "ram enemy" (suicidal) and one deck containing attacks like "nothing", "shoot guided AA missiles", "shoot laser", "launch missile", "launch fighter", "recover fighter".

The players would draw cards depending on their assets, e.g. 1 maneuver per missile, 1 attack per AA battery of the main ship, 1 of each per fighter, and place maneuvers next to the unit that performs them and attacks next to the target.

Combat resolution can count cards to find the number of successful attacks: for example, after a missile receives 2x "quick dodge" from its owner and 1x "AA missiles"  and 3 "laser" from the enemy, the missiles and 1 laser shot hit.


This sort of system can be enhanced with a slightly structured battlefield: for example successive zones that fighters and missiles can occupy between the capital ships (allowing enough time to deal with missiles and making maneuvers like "go forward" and "go back" meaningful) and/or aiming missiles at different parts of the capital ship (allowing some prioritization for the defender and "switch missile target" maneuvers for the attacker).

#5133896 data compression

Posted by LorenzoGatti on 23 February 2014 - 11:58 AM

Data compression means finding an alternate, smaller representation of data.

"abcabcabc" --> "3|abc"

This is all there is to explain about the principle of data compression: if you have strings of lowercase letters you can write out repeated substrings longhand (not compressed) or write them once with a repeat count (compressed). Of course you need to know whether Aphton encoding is being used and have an implementation available; the cost is usually amortized over the savings of compressing a lot of data.

#5129254 fractal result by accident

Posted by LorenzoGatti on 06 February 2014 - 02:46 AM



...probably/maybe has some name.

It does: Moiré


this is not this thing, as i said the thing is a result of normal colorizing the surface with a stable preducted palette, no 'border' artifacts or interferency things


As befits an encyclopedia, the linked Wikipedia article takes a narrow and precise view of what a Moiré pattern is, However, it's common to refer to most interference patterns as Moiré patterns, because they are essentially similar patterns regardless of the type of interference.

And aliasing is an interference pattern, between the sampling points and the features of the continuous signal.

In this case you are sampling (at pixel location) a wildly wobbling and discontinuous signal: the quantization error obtained by converting the eye-sphere distances to integers.

#5128698 Is a font the same as a glyph.

Posted by LorenzoGatti on 04 February 2014 - 05:38 AM

A font, combined with some mechanisms that don't vary from font to font (such as Unicode normalization and low-level drawing), is in its general form a program that produces a raster image from a string (i.e. a sequence of codepoints representing characters), given parameters like point size and choice of variant glyphs.

Sometimes this general operation is simplified, most commonly by rendering individual characters (giving up kerning, ligatures, contextual alternates etc.), caching results (giving up random glyph variations and contextual influences), producing vector outlines (giving up hinting).

The simplest types of fonts and font rendering systems, such as those for fixed-width terminals, directly map individual code points to constant bitmap glyphs, but it's only a degenerate form of a more complex process.