Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 02 Oct 2013
Offline Last Active Sep 23 2016 09:52 AM

#5311920 Biome based map generation?

Posted by on 22 September 2016 - 09:08 AM

The advantage of using a heightmap/temp/moisture/etc method is that you won't end up with a polar region at the equator or a polar region and a dessert region directly next to each other.


I want a technique that can result in a mountain with a lake to the north, a forest to the west and a dessert to the right.



Lakes/rivers... pretty much any water related feature is generally (I think) not considered a biome and added "Ontop" of any biome already in place. I am going to assume you mean to say that mountains, forests and desserts can be adjacent rather than specifically in a north/west/east orientation... do you want to enable polar regions to be next to desserts? or rainforests at the poles? 



For my implementation I am using the Heightmap method for placing a base biome,but then I plan on giving each base biome a random chance to morph into a specific sub biome of that base type... for example, the height map method may produce a region that is polar... I will then give it say a 20% chance of becoming one of either a Frozen Forest, Ice caves,hot springs, yeti country, or... I don't know... blue dragon graveyard or something. This way any area that implies it should be cold will be on a location on the planet where it makes sense to be cold but there will still be variety.

#5310445 Mines here and there

Posted by on 12 September 2016 - 08:11 AM

You can make it such that stepping on a mine doesn't necessitate stetting it off.

First, there might be an 80 or 90% chance of setting off the mine by stepping on it unaware, but if the mine is marked the chance of setting it off could be reduced to 10% or something... then you could have enemy units that are able to have a chance of detecting a mine and marking it for other units...


Another choice that could be used to get through mine infested areas if for the enemy to send a mine resistant unit in the front.



You could also mark areas as dangerous when a mine goes off to trigger units to weigh the use of roads in that area less heavily...


If you set it up such that mines that explode nearby mines you could reduce the effectiveness of  clustering large amounts of mines.



I don't know how Dwarf fortress implements it internally, but some units have a tag that allows them to dodge traps and I think most units are able to safely bypass known traps...

maybe you could look into how that system works. 

#5309010 Ship hull types (armor) names

Posted by on 01 September 2016 - 09:13 AM

I used a codex of a bunch of metal names i found online and generated some random metal names

























#5303659 Where To Place External Libraries

Posted by on 02 August 2016 - 09:16 AM

I think it depends a bit on what environment you are working in... 

I am using C#, with sfml.net... which is a bit of an edge case with dlls b/c it has two types of library requirements...

There are the naitive c/c++ assemblies that I can't reference from managed c# and have to be dynamically linked by the sfml.net libiraries 

and there are the .net CLR assemblies which do need to be referenced directly and can be linked statically...


Also, b/c I am using Visual Studio the base FileStruct looks like










I added a Resources directory just below the root, and within that directory I added a directory for extLibs (the c/c++ naitive asseblies) and a directory for libs (CLR .net assemblies)...

So... that's where I store them... I figure that for a given project, I select the version of the lib at the start of coding and don't plan on updating that ver for the lifespan of the project b/c in the general case, you can't expect to replace xyz_v1.dll w/ xyz_v2.dll and assume backwards compatibility... so changing lib versions is a manual process BY DESIGN so I know exactly which version is being used and am reminded to test for backwards compatibility and refactor code when changing versions.

#5298713 Does adding Delegates/Function pointers to an entity break ECS ideology?

Posted by on 01 July 2016 - 11:52 AM

If I don't use function pointers what is the alternative? Subclassess of components?

#5278726 how can i fix this quest?

Posted by on 29 February 2016 - 11:38 AM

Maybe when you choose the random treasure you also choose some random obstacle. Some massively valuable treasure for which the location is somewhat well known would not last long enough to become a legend, there would have to be something challenging about retrieving the treasure to allow it to sit forgotten long enough for rumors and legends to start being circulated. Unfortunately this interpretation also means that it should take awhile for legends and rumors to die even after the treasure is retrieved... so some, if not many of the treasures would be empty b/c someone else had already heard the story and gotten there first.

#5183974 Making a shot harder to pull off.

Posted by on 29 September 2014 - 11:32 PM

You mention stories about amazing feats people accomplish while mortally wounded. There are stories (true or not) of say, mothers lifting cars off of children after accidents... this is the exception, not the normal "Realistic" result.  The same applies to everything else, the stories you mention are so incredible because they are so unusual. Also, I never said every gun shot was deadly either, I said it makes things much more complicated. Walking/moving on a leg that just got shot is similiar to attempting to walk on a leg that just got broken. Attempting to fire with an arm with a gun shot is definitey going to effect your aim, these disadvantages are what get you killed, I was under the impression that you wanted gun fights to be more survivable, it wasn't particularly clear that you simply wanted to make the player take longer to die. It's possible, but your not going to be doing jumping jacks or sprinting to cover. Getting hit in the chest while wearing a vest will still knock you down, take your wind and possibly break some ribs. Also, if you got hit, you must not have been in good enough cover... who ever is shooting at you now has a much easier target.  




The problem I am having is that a shot through the heart, note that the game only counts the ventricles as heart shots and doesn't count shots to the atrium because they're totally different, while not an instant kill most of the time, is unsurvivable even with medical attention due to extremely heavy DOT that lasts an impossibly long time and a special constant damage effect (if large enough) that never goes away. This is realistic, being shot through the heart in any situation you'd find in game would be an absolute death sentence. (The circumstances in which you could actually survive such a wound are squarely in the "not goanna happen" category anyway, and they're impossible to replicate in-game.) The problem is, the heart is not an especially hard target to hit and such a rapid death is a big deal in a game where it's normally rare for a single gunshot wound to kill you and dying from anything tends to take rather a long time.


    Here, you explicitly state that you think a hit in the heart is the problem EVEN THOUGH it doesn't always kill you instantly... indicating that any other fatal shot that has similiar results (i.e death) would be an issue.  You say in your game it should be "rare for a single gunshot wound to kill you", but without the right kind of attention it is not "rare" for a single round to the chest to kill a person.  

 A statistic from www.trama.org:

"For penetrating thoracic injury the survival rate is fairly uniform at 18-33%, with stab wounds having a far greater chance of survival than gunshot wounds."   http://www.trauma.org/archive/thoracic/EDTrationale.html


The fact that you would prefer a gun shot wound to take a long time to kill you, would generally lead someone to believe that you would attempt to give the player options they could take to avoid getting killed after being shot... not many game designers look for ways to make more of the time players are playing their game have no "winning moves". 


You then say "many enemies in the game also use guns"...enemies that use guns tend to be humanoid... and if guns are common it generally leads one to believe that gun fights will be common. If gun fights are to be common then the player seems to be expected to be able to survive gun fights commonly. In order to answer this game "realistically" as you seem to have wanted we can only fall upon knowledge of other instances where there are many enemies often carrying guns in real life... which oddly enough is a pretty good description of a war.



 I did actually realize that my first post, while I had hoped to be helpful didn't actually address the issue concerning the difficulties of aiming... which is precisely why I added the second post which dealt exclusively with the many variables that affect accuracy. I do actually have experience with weapons, I was combat ops in Iraq for two separate years. I have been trained on the maintenance and use of an array weapons... granted I was a General Issue Joe and not the super star spec ops... I still feel the super human abilities your ascribing to the spec ops guys sounds more like holly wood fantasy then the "do what works" reality. 


You should try to control your temper. It's rude to treat people trying to help you the way you do. 

#5183883 Planetary defences, ground forces, fleets

Posted by on 29 September 2014 - 02:57 PM

The map can be broken into three "layers" the universe layer, the system layer and the planet layer.


U-class ships have the range to move from universe node to universe node, but are too large/impractical to maneuver within a system. 

There are two types of U Class ships...Carriers and battle ships.

S-Class ships don't have the range to move through the universe on their own, but can be carried from system to system by U-class carriers.

Once a U-Class carrier enters a system it can deploy it's S-class ships, enemy S-Class ships treat these carrier ships as planets for purposes of attacking and such.


S-Class ships are Fighters/bombers and transports.


A planet has a set of nodes, each node can be Defensive/offensive/military/agricultural/civilian/economic...etc. The planet nodes start undeveloped but can be upgraded to the various types, each type doing... something.


For purposes of battles a planet is considered a ship with it's weapons and defenses defined by the quantity/type of offensive defenseive nodes. Bombers are the only type of ship that can engage a planet. 


Once the planet has be defeated by the bombers S-Class transports can drop planet side units onto the planet. 

Now the planet side units battle for the planet the way S class ships battle for  a system as U class ships battle in the universe map.

#5183843 Making a shot harder to pull off.

Posted by on 29 September 2014 - 12:55 PM

CoD Tried to make aiming more realistic... and in theory I think the idea is sound... but in their implementation i don't think it really works. When not looking down the scope they have a small circle, and this represents how "off center" your shot ends up.... when you look down the scope the circle gets smaller until it's a pin point. Shooting or moving widens the circle again. The ability to 'no-scope' sniper head shots is pretty decent proof that they must have gotten it very,  very wrong (or the players must be cheating).


 It requires knowing how the circle actually relates to the shot though to determine how well this actually models realistic aiming. In any case, the way i would do it is something like..


 Instead of a circle, it would be more of a cone... of course the cone can be represented by a circle (who knows, perhaps this is what they are doing).

 Choose a distance the circle will represent. When a player fires their weapon, choose a random point on the circle, favoring the out side of the circle the smaller the distance. the vector the round will follow will originate from the end of the weapons barrel and pass through this point. So the random point chosen represents the angle offset of the rounds vector rather than the end point offset of the rounds impact. (I.E if the aiming circle represents a 25' cone and you are firing at something 40' away you likely won't even hit anything within the circle). If they player is not in a stable position (Prone for rifles, firmly planted in place for handguns) the circle will move erratically (even in a stable position the circle will move in predictable patterns due to breathing, muscle control, etc). If the trigger isn't pulled directly back, the circle will move upward slightly before the round can even exit the barrel (this could be represented by a characters familiarity with the weapon... you will only be able to pull the trigger directly back if you know the weapon well enough to know how much pressure it takes to release the hammer) Then, when the hammer hits it will push the circle back down (unless you are familiar enough with the weapon to compensate). Being unfamiliar with the weapon and over compensating either action will cause the circle to move in the opposite direction slightly. Also, right handed shooters tend to pull the barrel to the right and left-handed to the left. 


 In addition, the round will start dropping noticeably even within a weapons "maximum effective range" and you don't need to be firing at a target half a mile away with a sniper rifle for a cross wind to be the difference between a hit and a miss... even an shooter firing an assault rifle at a target 200 meters out may find they need to adjust for wind. For example, if you are trying to pass your marksmen test with an m4 with a wind blowing left to right you want to aim near the left shoulder to make sure you hit somewhere in the torso area. 


If you watch a marksmen competition they will take their own good time to aim... at 15-30 seconds min... and after ever trigger pull you have to start over... if you are just pulling the trigger as fast as you can you might as well be firing from the hip. Plus, the "circle" doesn't gradually decrease in circumfrence... you start aiming, it all snaps together and you pull the trigger... if you miss that window things tend to go blurry and you have to start over, its tough to keep your eye that focused and your muscles that still for much longer than an instant.


All that being said, I've never been a particularly good shot myself... I just know everything people kept telling me every time I missed smile.png


Oh, and I know i can't stop talking... but generally the larger the caliber of round, the less important the accuracy of the sights... rifles being the weapon where the sights are most likely to be accurate, as generally each person zeroes their own sights... and the quality of the weapon/sights determines how much wear a weapon can take before the sights start getting out of whack and need to be zeroed at a range again... and here familiarity with the weapon helps a shooter maintain accuracy as the sights start needing adjusting.

#5183776 Making a shot harder to pull off.

Posted by on 29 September 2014 - 09:49 AM

You can't make your weapons that realistically damaging and expect to have the same exciting, run-and-gun fights you see in a lot of FPS games.

Most gun fights are either extremely one sided (and over in a matter of seconds), or extremely long and drawn out, with both sides behind cover waiting for the other guys to run out of ammo, or for the artillery to come down, or for reinforcements to flank them... etc.


I'd say that if you want to keep that level of detail in how weapons work, you need to re-evalutate the pace of the game and the quantity of the enemies to a point where getting shot (pretty much at all) is expected to end the game. 


If you are keeping the DOT that makes you bleed out from getting shot in the heart, are you also making it so that getting shot in the leg makes it so hard to concentrate that you pretty much entirely lose all your accuracy? Getting hit in the body armor your wearing stuns you b/c you've had the wind knocked out of you and without someone to drag you off behind cover makes you easy pickings? 


Also, it seems that accuracy in your game is not realistic enough if it is that easy to hit the heart every time. A good marksmen might be able to reliably hit a target the size of the heart at a reasonable distance (changes depending on type of gun) from a stable position on a stationary target, but that will only be true for say... the first shot against a sleeping target or something.


 So, to it seems to me that this is an issue where one mechanic has a level or realism that is out of place with the rest of the mechanics.

#5180729 ASCII-graphic: using Console vs. API

Posted by on 16 September 2014 - 09:50 AM

You may need to use WriteConsoleOutputW function for unicode output. IIRC WriteConsoleOutput maps to WriteConsoleOutputA by default which is the Ascii w/o Unicode ver.

#5178391 Breaking the frame

Posted by on 05 September 2014 - 02:20 PM

Usually this is because you ended up on the wrong side of the world geometry.


Models/Textures are drawn with textures on one side (The other side is never supposed to be seen and therefore doesn't need a texture).


What happens is you view the geometry from the side without a texture, therefore it become "Invisible". 

Sometimes you get stuck because the collision detection doesn't allow passage in either direction.

Sometimes you don't get stuck because the collision detection only worries about collisions from the textured side.


The outline of the world geometry is still visible sometimes because you are viewing them at an angle where at least some of your sight line hits the textured side.

#5160322 Incentive or penalty ?

Posted by on 13 June 2014 - 10:16 AM

I think it really depends on how the tactics are implemented. Take the cross-fire for example, if you put your units in the cross-fire formation without using the hint card can the game recognize the formation and provide a bonus.. or is using the hint card required to "trigger" a buff/debuff? If the hint card is required as a trigger then obviously it needs to provide a bonus, else there would be no reason to use it or the crossfire formation at all.


In either case, the hint card shouldn't really be a consumable... find it once and you can use it whenever you want, it represents knowledge, not a resource.

#5147232 Trouble developping data heavy modifiers

Posted by on 15 April 2014 - 06:09 PM

If its single player then don't worry about it. If its multiplayer don't store it locally.

#5146969 So this is how APIs get so messy?

Posted by on 14 April 2014 - 02:04 PM

Any documentation is better than none. That being said there are a couple things I hate when reading documentation.

The only time documentation is worse then no documentation is when you simply run an auto document tool that gives no more information then intellisense would give, It's incredibly useless and wastes everyone's time.


That being said, I prefer documentation that details the API in a way that shows the user the way it was designed to be used. A list of namespaces/classes is useful only if you already know which class/namespace you are supposed to be looking into.. this is a good way to start your documentation (all the relevant information will exist), but then if you really want to create happy users, make a second pass explaining how to utilize your API with minimal set-up requirements with links on customizing behavior where appropriate.


Just remember that there are two types or people reading your documentation, the person that has never used your api before and the people who are trying to push the limits of your api.