Jump to content

  • Log In with Google      Sign In   
  • Create Account

Codeka

Member Since 19 Oct 2008
Offline Last Active Mar 05 2016 04:07 AM

Posts I've Made

In Topic: Pathfinding and Databases

18 January 2016 - 10:04 PM

Are we talking pathfinding within rooms, or between rooms? I'm guessing between rooms, because pathfinding in a 3x3 grid is pretty trivial and you could basically brute-force it, try all permutations, and still perform pretty well.

 

I think the problem you're having is that the way you store your room layout (in a database) isn't really conducive to most path-finding algorithms, which assume that it's easy to load and traverse every node in the graph, right?

 

You've probably got a couple of options here:

  1. Limit the number of rooms you search, which limits how many rooms you're going to have to load. You're going to have a bunch of rooms in memory already to display them to the user, as a first pass you could just limit your path finding to whatever you've already got loaded. The downside here is that you might not find a path which twists through rooms that are not loaded.
  2. Pre-calculate some fraction of possible paths when you generate the level. This could potentially mean you have a whole lot more data to store.
  3. Some other data structure/storage mechanism for your level (e.g. a quadtree). This could be a lot of work...

As always, there's never a perfect solution.


In Topic: [Win32 C++] Waaay out win32 functions NOT recognised

16 November 2010 - 09:21 PM

Quote:
Original post by gretty
Do I need to link to the absolute path of comdef.h, for example, #import <c://windows/...../comdef.h> ?? Do I need to define a specific version of windows before importing windows.h, for example, #define _WIN32_WINNT 0x0502 (although I have tried this already with no success). I am using Windows 7 64 bit.
Sounds like you're using Visual Studio express and you don't have the Windows SDK installed.

Also, ITaskService is for accessing the Task Scheduler, not Task Manager (Task Manager is the program that lists running applications and processes, etc)

In Topic: [.net] Creating Context Menus

11 March 2010 - 11:12 AM

Quote:
Original post by Sambori
I guess the answer is no? :)
Why would guess that? Because nobody responded with the answer in 20 seconds?

In the Toolbox, there'll be an entrt for "ContextMenuStrip" underneath the "Menus & Toolbars" entry. Just drag that onto your form and design away.

In Topic: Query Interface: Static Casting Rule

09 March 2010 - 10:25 PM

You can implement it using dynamic_cast if you like. The rule isn't about static_cast vs. dynamic_cast, it simply says you can't "add" or "remove" interfaces from a running object.

This is required because of DCOM. The proxy object will cache the result of QueryInterface so that it doesn't have to do a network round-trip every time you call QueryInterface.

In Topic: Unmanaged DX in C#. Possible?

09 March 2010 - 03:47 PM

Quote:
Original post by FenixRoA
SlimDX doesn't work for me
I think this is the problem you should be solving, rather than trying to write your own wrapper (after all, SlimDX is just a wrapper around native DirectX as well). Why doesn't it work?

PARTNERS