Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

2 Neutral

About Mk_

  • Rank

Personal Information

  • Role
  • Interests
  1. Mk_

    Fastest detection algorithm?

    Can you link to a youtube video that show's the kind of thing you are trying to achieve?
  2. It could also be incorrect chipset drivers - try the latest drivers from the manufacturers website.
  3. Mk_

    Fastest detection algorithm?

    I'm not really familiar with this type of game, so take this with a healthy pinch of salt... But why do you need to have pointers to each individual unit? Surely you only need to keep track of the number of units of a given type (infantry, cavalry, artillery men, medics etc.) within the cell - it's not like each soldier has a name and personality you need to take into account. You could handle health by just keeping track of the average health of each type within a cell, rather than individually. If the player moves some troops out of the cell, just subtract the numbers from the original cell, and add them to a new one. This would massively reduce the number of checks you need to do, and combined with a quad tree for your cells would reduce it even further.
  4. Check the definition of _mouseX & Y. Windows desktop uses SIGNED 16 bit values for the mouse, but maybe they're being converted to int by whatever library you're using. If you go the 64bit router use __int64.
  5. The mouse (in Windows) is given as a 16 bit signed value, so just use <<16, >>16, and 0xFFFF. Also, a long int is a 32 bit value, not 64.
  6. Thinking about it, it could also just be caused by floating point rounding errors - does the error virtually disappear near the origin? Personally I would resize the heightmap to 16385*16385 and divided it into 16 4097*4097 (or smaller) chunks and cull/render each individually. Powers of two are much easier to work with, especially when it comes to LODs.
  7. I don't know how you're deriving the height at a given point on the CPU, but off the top of my head your heightmap size is wrong - it should be 64*173+1 = 11073^2. To use an example given by somebody else - if you want to erect 4 fence panels you need 5 fence posts - i.e. 1 more post than panel. Likewise, if you want to render 64*173 (11072) quads you need 64*173+1 heightmap points. What you're doing is sampling between the actual height points, which probably accounts for the offset you're seeing.
  8. Thanks for your reply! My idea is to have a single function to resolve all DLL entry points (say for each quest in the metafile an OnStartup, OnGameTick, OnShutdown, for example) and another function to release them, allowing real time (ish) editing. For example, F11 could trigger game->pause/UnloadDLLs and F12 could trigger LoadDLLs/game->resume. This seems to provide all the benefits of a traditional scripting language with the performance of a compiled DLL. By having multiple DLLs each may only contain a few hundred lines of code meaning recompilation would be very fast.
  9. Hi! I'm toying with different ideas about how to script game logic. I'm well aware of different scripting languages, and note that most games use these to define game logic. But what about using C/C++ in DLLs to script a game? For simplicities sake, lets assume I'm just writing quest logic. Why not just create a metafile that lists all quests. The main .exe loads this list (and creates a bunch of function pointers) and then programmatically queries a bunch of DLLs for the game logic. My idea is to create a bunch of DLLs (for example DLL1.dll, DLL2.dll, DLL3.dll etc.) and resolve the function pointers from last to first (DLL3.dll to DLL1.dll), which allows code in higher numbered DLLs to supersede existing code in lower numbered DLLs. New code would be entered into higher numbered empty/nearly empty DLLs until finalised, and then be moved into DLL1.dll. This allows for very short compilation times, with the advantage of fully compiled logic. This seems so simple I'm sure I must be overlooking something! Does anyone have any views on my approach, especially it's short fallings?
  10. Let the user decide? Why force a resolution that the user doesn't want? Default to the desktop resolution, and let the user (optionally) choose a lower res; be that windowed or full screen.
  11. If you're trying to use the GPU to circumvent your stack overflow problem, the solution would be to allocate heap memory using new/malloc. If you're trying to speed up an algorithm, you could simply bounce data between image buffers - 300000 is less than a 600*600 buffer - depending on what you define as a 'cell'. Without more information it's hard to understand what it is you're trying to achieve.
  12. Why not just use a simple height map and render your terrain with a regular grid patch, like below? If you need holes in the terrain just create a normal mesh based on the same grid structure and drop it in where you have modifications. Edge connectivity is guaranteed.
  13. Try using a different triangulation method: It may not be what you're after, but it's an improvement. For what it's worth, your current triangle strip style rendering is the worst for terrain (with the above being better, and equilateral triangles being best, but a pain to work with).
  14. Looks perfect. Thanks for your help!
  15. Hey everyone! First post!!! I need to record some speech, and increase the pitch to mimic to 'helium balloon' effect, and possible add some basic effects to the result. I don't need anything at all fancy as this is more of a proof of concept rather than production quality. Does anyone have any free Windows software suggestions that would suit my needs? Thanks!
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!