Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 19 Nov 2013
Offline Last Active Dec 20 2014 01:07 PM

#5198354 UAC local app data methods in c#

Posted by ferrous on 15 December 2014 - 11:25 AM

I believe File.Exists is only for files, so that will always fail?  I think you want Directory.Exists?  (Unless you just snipped some code out that was altering path to be to a file)


Other than that, are you wondering if that will work with a Modern/Metro/Windows Store App?  I think it will, but the best thing to do would be to just whip up a quick template store app with that code.  If you are asking if that will work on a standard win8 desktop app, then I think that will work just fine.

#5195909 Chatbot in 18 lines of code (Python) help.

Posted by ferrous on 02 December 2014 - 12:17 PM

I'm not a python expert, but wouldn't you need to have the random.choice bits of code in the while bit?

#5195780 Should I keep a dev/programming journal?

Posted by ferrous on 01 December 2014 - 02:24 PM

Yup, I find it helpful for myself, even if I might only get less than a handful views, and maybe a single post.  It is sort of like the rubber duck effect, just getting your thoughts down into words, and being able to write about your progress can help.

#5195623 Is there algorithm for boxcasting or thickray casting?

Posted by ferrous on 30 November 2014 - 10:28 PM

Ah, thanks for the second picture. and longer explanation.  Bresenham will only really miss the diagonal case, Wu's will get it, if that's the kind of granularity you need, and then you just need to modify the width.

Something like http://freespace.virgin.net/hugo.elias/graphics/x_wuline.htm


Just ignore intensity/alpha for your purposes, and consider it to be 'full intensity' or as a square that has been hit by the sweep.

#5195568 Best way to follow a moving object

Posted by ferrous on 30 November 2014 - 04:18 PM

You could modify it to check whether the new square of the player is close to the previous destination.  If it's close, just pathfind from current destination to new destination.  If it's not, redo the whole path.

#5192514 Free running physics

Posted by ferrous on 12 November 2014 - 03:46 PM

Hmm, this might help you:  http://www.gdcvault.com/play/1020583/Animation-Bootcamp-An-Indie-Approach


It's a talk from the guy who wrote Overgrowth, which has some similar elements with footplacement being dynamic.  It's not going to be quite that great at explaining everything.  I recall another talk on the free running in assassin's creed, it wasn't huge on technical details: http://www.gamasutra.com/view/news/193015/Video_Improving_AI_in_Assassins_Creed_III_XCOM_Warframe.php

#5192504 Why are new game updates unable to view old RTS game replays?

Posted by ferrous on 12 November 2014 - 03:09 PM

The Uberentertainment guys have a slightly different than usual model: http://forrestthewoods.com/the-tech-of-planetary-annihilation-chronocam/


They had the goal of allowing replays from different versions, but I'm not sure if they have actually implemented it in the final product.

#5188965 movement as in Steam Birds

Posted by ferrous on 24 October 2014 - 01:34 PM

Oh, I've done this.  Here is a unity prototype of a version that had pathing.


Here's an decent guide to what it is you're asking for:  Dubin's Curves.



EDIT:  And to be a bit more specific, basically each plane has a turn radius.  I forget whether the game has a sliding turn radius, where the faster you want the plane to go, the larger the turn radius is.  Anyway, think of it as two circles to the left and right of the plane, and the line/path the player wants to go cannot pass through those circles, but must move along them before heading off in a straight line tangent to the circle.

#5186950 Path for a boomerang

Posted by ferrous on 14 October 2014 - 10:05 AM

Usually modifying the acceleration of something tends to make it look a little smoother, you might also try tweaking how much acceleration/velocity can be changed on an axis.  For example, the Y axis could be 'stiffer', and have a smaller maximum change amount.


Another idea is to cheat, use an ease-in-out equation to interpret between the start/destination -- though I'm not sure how well that will work with a moving player.  Another thread, I mentioned a catmull-rom, but I think it might be overkill for your case.


Finally, you could keep your current method, but then put a timer on it, if the time to return is too great, then cheat and just do a linear interpolation to return it to the player.  For cases where the boomerang went really far, it shouldn't matter, as the return would look linear anyway, and it will stop any constant orbiting.


Oh and lastly, you might want to make the boomerang 'smart', and have it try to reach where it thinks the player will be, by looking at the players velocity.  Though that might look funny.

#5186019 How to make finding objects fun for a kid in my game?

Posted by ferrous on 09 October 2014 - 10:43 AM

I suggest doing a ton of research on successful kids games.  Pajama Sam comes to mind, as well as pretty much everything that company made.


#5185871 I need to fill about 6MB of memory per frame, fast algor needed

Posted by ferrous on 08 October 2014 - 04:54 PM


std::vector of what?


And where does the data come from which you are filling it with? Is it calculated? A constant value? Copying it? Is it some transformation of existing data?


a vector of booleans

Actually, I am working on a cooperative pathfinding stuff, In every frame, because I am using a dual map approach, one map to astar and one for cooperative pathfinding, when astar finishes, it starts in fill in this pixelated cooperative pathfinding map (a vector of booleans), if the path is reserved this way, all the pixels that the bounding box of the object casting on, will be reserved.

So say an agent is 30x30 - 40x40 pixels wide, I need to preserve 255 steps in advance and I have about 20 agents, so that's about

30x30x255x20 = 5MB




I'm a little confused, are you doing per pixel pathfinding?  Is each agent actually taking up 30x30 grid squares in your pathfinding grid?  That seems like a insanely high amount of grid resolution.

#5185554 How to implement curved boomerang ?

Posted by ferrous on 07 October 2014 - 09:49 AM

Most games, off the top of my head, seem to cheat and just use some sort of gravity/force/acceleration on the boomerang that is towards the player, and don't use a planned path.  So the toss/throw gives it some initial velocity in a direction, and then every physics update it gets a small acceleration towards the player.  Furthermore, they tend to either cheat and have it go through walls/obstacles, or if it does collide with something solid, it stops, and the player has to go pick it up.


EDIT:  After watching a video of rolling cutter in action, the bezier is probably the way to go.  As usual, I will point to catmull-rom, since it's a curve that goes through all it's control points, and if I recall correctly, is nice and local, ie changing control point 6 will not change the path of control point 3, so should probably be one of the easiest to implement.  All you really have to do is continually update the very last control point to be that of the player.

#5184426 Balance (early game difficulty) [strategy]

Posted by ferrous on 01 October 2014 - 04:07 PM

I think it would probably be best served to have the player start in a more barren part of the universe.  At least on easier difficulties =)  You might try using distance from the player in your algorithm to populate and place the other races. The closer they are to the player, the more likely they have a crappy tech level.   This has a nice effect of giving the player time to expand before headbutting into a stronger race.

#5184355 How to implement a procedural loading system?

Posted by ferrous on 01 October 2014 - 10:11 AM

I see! Well, it sounds practical enough, but, would it be needed for a finite 2D map? I mean, surely it is important for 3D worlds, where each objects has such a level of detail that can drain the memory pretty fast, but i am uncertain about a 2D game. I wouldn't want to develop a mechanic which will do more harm than good.

Depends on the game, the map, and depends on the load times.  If you do not like your current load times and you want a 'seamless' feel to the game, then it may be worth investigating.  If the load times are sufficiently short, or can be entirely front loaded, like Space Pirates and Zombies, which loads all its assets up front once, and then has no load times while the game is running, then it may not be an issue to just load levels discretely.

#5183779 Making a shot harder to pull off.

Posted by ferrous on 29 September 2014 - 09:59 AM

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.

This pretty much echos my opinion.  If you're making heart shots death shots, and if they are easy to hit, then you probably have an accuracy issue.  FPS can get away with simplified hitscan weapons that are crazy accurate, I suspect your game would not.  But then again, this could be all worrying over nothing, I think this may be a case of premature optimization, at least for enemies being hit by heart shots.  For the player, you may end up wanting a completely different damage model, as it's hard to say without knowing your game, but I suspect that being sometimes instantly killed by enemies and sometimes not will probably not end up being very much fun.