Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 19 Aug 2002
Offline Last Active Today, 10:21 AM

#5315392 Stronger versions of enemies?

Posted by on 16 October 2016 - 12:54 AM

I don't expect game developers to make a unique monster for every stage of progression. Especially not unique art. That's a lot to ask.

And therein lies the inherent weakness of video vs table top games.   tabletop games don't require massive artwork.   so you don't have to compromise on the design because you don't have the artwork manpower to execute it.
By holding video games to a lower standard you encourage mediocrity.
"Its too much artwork" is not a legitimate excuse for lack of requisite variety in enemy types.

Mediocrity? Have you played the games I mentioned and examined how much work went into the enemies in them? Your responses seem separated by a few degrees from how I'm judging these games.

With enough thrust, even pigs can fly. But when the thrust inevitably runs out, those pigs fall to their death.

#5315272 Stronger versions of enemies?

Posted by on 14 October 2016 - 09:02 PM

I don't really mind scaled up enemies. If there's some kind of power progression in the game, the enemies scale up but either a) don't change their names (Witcher 3) or b) they change their names (Skyrim, Fallout 4).

I don't expect game developers to make a unique monster for every stage of progression. Especially not unique art. That's a lot to ask.

Borderlands 2 had the widest variety of enemies I've seen so far. Most of the time it would be a flood of common enemies, but occasionally you'd get a "Super Badass Loader" (which had unique art) or the appropriate equivalent (Psycho, Skag, Thresher, Constructor, etc) and were in for a good fight. Yet you'd still see the same enemies used later in the game, just with higher levels.

Diablo 3's rift bosses use recycled art from previous monsters in the game, but gives them completely new attack patterns by reusing existing code in different ways. That's the ideal case, IMO.

#5315260 An alternative to "namespaces"

Posted by on 14 October 2016 - 04:36 PM

Maybe the name "Node" itself isn't descriptive enough and should be refactored to be use-specific in each location?

I can't look at Scene3D::Node OR SceneNode and know what that means. What is a node in that context? Name it that.

Usually when you name things with good names, they won't collide even if everything's in the same namespace (except maybe when dealing with third party libraries).

#5315047 Why is visual studio giving me a bunch of false errors?

Posted by on 13 October 2016 - 02:52 PM

Can you post the gamestate.h and application.h files?

#5315039 Why is visual studio giving me a bunch of false errors?

Posted by on 13 October 2016 - 01:50 PM

C++ syntax errors tend to cause avalanches of errors to appear which aren't actually problems on their respective lines, but fallout of the first error. Switch to the output window and find the first error listed. Fix that and try building again, repeat if there are more errors. I saw at least one syntax error listed in your post.

(edit) Ninja'd

#5314757 Fast Approximation to memcpy()

Posted by on 11 October 2016 - 05:15 PM

Everyone knows that null values lead to access violations. So why not just prevent those pesky nulls from being copied in the first place?
void memcpy(void *dest, void *src, size_t size)
  strncpy((char*)dest, (const char*)src, size);

#5314194 astar: diagonal movement cost makes path end in loop not at goal

Posted by on 06 October 2016 - 07:35 PM

BTW, getting rid of remove from closed fixed everything!
But the question of why exactly still remains.
The most dangerous fix is the one where you don't exactly know why it worked - or exactly what was wrong in the first place.  Because then you don't really know if its fixed for sure or not.

I agree, it would be helpful to find out. I would put remove-from-closed back in and have a breakpoint on it, and examine what the various cost values are and double check that they're valid. It may reveal other issues.

#5314189 Getting more curious and curious

Posted by on 06 October 2016 - 05:50 PM

It's VERY good that you want to know how things work. This is where most of my motivation towards programming comes from.

It's OK for the interest to conflict, as long as you know which one you should prioritize. You can get a book and read a chapter a day while working on your main project most of the time, for example.

#5314036 My tool allocates more memory than Windows has available, how to warn user?

Posted by on 05 October 2016 - 01:57 PM

I would definitely suggest analyzing how and why you're using that much memory before thinking about adding special cases for limited RAM. Adding special cases will just make your app harder to maintain and potentially add even more things that can go wrong.

#5314019 astar: diagonal movement cost makes path end in loop not at goal

Posted by on 05 October 2016 - 11:32 AM

So THAT's where that implementation came from. I recently fixed an implementation at work that was written that way.

I write the inner portion of the loop like this instead:
if (neighbor.openClosedState == CLOSED) continue // all possibly cheaper ingress paths to this node have been evaluated already

newCost = generate cost

if (neighbor.openClosedState == OPEN and newCost >= neighbor.existingCost) continue // not better than existing path

// if no condition above has continued the neighbor loop yet, the new path is better

update neighbor cost and parent

if (neighbor.openClosedState == OPEN)
  Fix neighbor location in the priority queue (since the cost modification may have invalidated the heap ordering)
  put neighbor in priority_queue
  neighbor.openClosedState = OPEN
NOTE: I use a state member (enum { UNVISITED, OPEN, CLOSED }) on the nodes themselves instead of actual sets to eliminate set.contains operations. I can't evaluate multiple paths at the same time, but this game doesn't need to. I have to reset the states after each pathfinding operation though. It's gross, but very fast.

#5313918 astar: diagonal movement cost makes path end in loop not at goal

Posted by on 04 October 2016 - 03:03 PM

Regardless of any weird cost issues, you should never be able to have a node that goes back to any of its parents. The parents should be in the closed set by then, preventing neighbor checking from including them again... Neighbors should be either unvisited nodes or ones in the open set that you're approaching from a cheaper path.

Are you doing something nonstandard where the closed nodes can be reopened for some reason?

Even if you don't have a standard closed set, and you always check all neighbors, your (cost to move from the current node to its parent + est. cost from the parent to the goal) should always be > than (est. cost from the current node to the goal). If it's not then A* will not work.

#5313670 Generating all possible combinations of route in a graph?

Posted by on 03 October 2016 - 01:06 AM

Let's say I had waypoints A, B, C and D
I want to find the shortest path which must go thru each of them.

Do you mean the travelling salesman problem (find the sequence out of all permutations that has the shortest total path)?

Or just go to points A, B, C, D in that sequence, within a more complicated graph?

#5313417 Unity C# EditorSceneManager Issue

Posted by on 30 September 2016 - 02:23 PM

MenuItem examples: https://docs.unity3d.com/ScriptReference/MenuItem.html

Basically, just put a [MenuItem("Menu/ItemName")] attribute on a static function. This will create an entry on the Unity editor's main menu that you can click to run the function.

This will let you test your scene closing code. This should let you find out if it's a problem specific to switching from edit->play mode or not.

#5313410 Unity C# EditorSceneManager Issue

Posted by on 30 September 2016 - 01:24 PM

It might be an issue with trying to manipulate the scene during the edit->play transition. Does that code work if you run it from a MenuItem?

How do you define and initialize the sceneName variable? Try also Debug.Logging the sceneName variable to make sure it's still what you expect when that code runs.

Is there anything else happening when the game starts that could be instantly re-opening the scene?

#5312718 Visual studios 2010 debugger variable doesn't update

Posted by on 26 September 2016 - 02:04 PM

That thing that you accidentally clicked might have been something on the "project is out of date, do you want to compile it?" dialog. If that is set to 'never', you could be running an old version of your EXE which doesn't contain any of the new variables you've been adding.

I recommend finding the following setting and making sure it's set to Always Build. If you accidentally changed it to Never Build, then this could be causing some of your problems.

Tools -> Options -> Projects and Solutions -> Build and Run -> On Run, when projects are out of date: --> Always Build