Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

969 Good

About ikarth

  • Rank
  1. If you really want to use relative coordinates in a continious world, you could look at how Dungeon Siege did it in the early 2000's:    http:/gamedevs.org/uploads/the-continuous-world-of-dungeon-siege.pdf http://scottbilas.com/files/2003/gdc_san_jose/continuous_world_paper.pdf     But that's kind of an unusual situation. Most multiplayer games with big maps get by just fine by dividing the world into regions and handling boundary issues. (One way: do the calculations based on the coordinates of the originating object's region. If the regions are small enough to fit two into the valid space, and no effect can cross more than a region-width distance, it'll work just fine.)   Or, if you really want to include both small rocks and massive stars in the same coordinate system, you can go 64-bit, like braindigitalis suggested. Elite: Dangerous switched to 64-bit only when they added planet landing, as an example.   I think, though, that you might be under the misperception that everything in a video game needs to be simulated at full fidelity all the time. Especially when it comes to graphics, that's seldom attempted. For example, you'll probably never need to use more precision on the GPU for distance, because once you get past a certain distance it's probably cheaper to just render a sky sphere. Elite: Dangerous does this with its galaxy: the backgrounds are created from a model of the galaxy in a different coordinate system. This is pretty standard in FPS engines, too. 
  2. If you're actually looking for examples of how to do this in a game, look up Event[0], which has a text interface to an AI.    Also, if you're parsing an English sentence, you don't want to read it from left to write, you want to evaluate the syntactic dependencies or phrase structure grammar. The most basic form of this is working out the verb and the subject and object. Which is why the earliest text adventure parsers worked with two-word commands: an action, an object to perform the action on. (The subject was implied: You wanted to do the thing.)   NLTK, SpaCy, OpenNLP, or the equivalent libraries for your programming environment have already implemented solutions for this that handle more complex sentences. As have the open-source chatbot platforms.They can even work without punctuation, if that's what you really want. (Or, going the other way, there's word-classification networks trained on Twitter and Reddit that recognize emoji.)   And as has been said above, remembering what happened last session just needs serialization: save what you've got in memory to disk, load it from disk next time.
  3. Natural language processing is an entire field of research. There's a lot to look up if you want to go down that route.   I suspect that limiting the input to just alphanumeric characters will actually make the problem harder: the more context you can get, the better your results will be, generally speaking. You might want to consider targeting a subset of language, such as the symbolic approach used by Siboot, but that will still require some careful design.   Your best bet for an off-the-shelf solution might just be to hook a chatbot up to your NPCs. There's several open-source chatbots, and you could probably create an AIML bot specification that meets your needs.
  4. ikarth

    Make this small algorithm branchless ?

    Meta-approach: run a profiler on it. I'm a bit dubious this is worth optimizing unless you're doing it millions of times per frame, but if that's actually a concern you should be profiling and testing to see the actual effects in conjunction with the compiler optimizations.   For the algorithm itself: while (position < position + X) { position += std::clamp(X, -1.0, 1.0); // ...do your other computation } or min(max(X, 1.0), -1.0).
  5. ikarth

    collision detection in maze issue

    Does the blue box fit in any of vertical corridors? Also, double-check where your collision points are: they might be one pixel too far outside.   This is one of those cases where the literal simulation of the physics may not be what you want. Shrinking your collision box a bit will work, or putting the collision detection points in the middle of the sides of the box instead of the corners (and maybe changing the wall collision boxes too).    These links might give you some ideas for other ways to implement this: http://gamedev.stackexchange.com/questions/8336/how-did-loz-a-link-to-the-past-handle-sub-tile-collisions http://home.comcast.net/~jpittman2/pacman/pacmandossier.html#CH2_Cornering http://troygilbert.com/deconstructing-zelda/movement-mechanics/
  6. ikarth

    Random Math Questions

    Trigonometry is pretty useful when doing vector math. For starters, it's intrinsically related to moving in circles, and thus rotation. Want to point a turret at a target? Use trigonometry to find the angle of the direction vector. Want to move your point along the circumference of a circle? Trigonometry.   Sine waves get used all over the place: in audio, in procedural generation, in easing curves.   By point picking, I assume you mean when you click on a point on the screen and translate it to a point in the game world? For a 2D game, one way to handle that is to translate it from the screen coordinates to the world coordinates via a camera function that keeps track of where the in-game camera is and translates that to an in-world coordinate, which is basically just addition and subtraction.   Then you check which sprite is at that world location. Either go through the list of sprites comparing bounding boxes or alpha masks, draw an interface frame that paints the sprites by z-order, or whatever else works.   For a more complex 2D world or a fully 3D world this may not be sufficient, but the general idea is the same: translate screen coordinates to a ray, figure out what that ray intersects. Trigonometry by itself may not be the most efficient way to do this: you'll probably end up using translation matrixes.   Now, you don't need to be an expert in trig (or matrixes) to make a game. You can get a lot done with just addition and subtraction. But if you're trying to code anything that has rotation, it's probably going to come up.
  7. I don't have time right now to write up a detailed suggestion, but these links may help: http://www-cs-students.stanford.edu/~amitp/game-programming/polygon-map-generation/ http://blog.kaelan.org/hexagon-world-map-generation/ http://forum.unity3d.com/threads/open-source-procedural-hexagon-terrain.233296/ http://www.voidinspace.com/2014/07/project-twa-part-1-generating-a-hexagonal-tile-and-its-triangular-grid/ https://experilous.com/1/blog/post/procedural-planet-generation
  8. ikarth

    Old-School 3D Wireframe Modelling Tool

    The way they did it back in the really, really old days was to code it by hand on graph paper. Elite, for example. Though even then it was a separate data file created via custom-written BASIC programs or entered directly into a hex editor!   If you really want to do it by hand, you can speed the process along by modeling in blender and then grabbing the list of vertex positions: http://blenderscripting.blogspot.com/2011/05/blender-25-python-printing-vertex.html
  9. There's no one answer: a lot depends on what kind of scroller/platformer you're making. But here are some links about getting the right feel: http://blog.brendanvance.com/2012/04/22/the-quest-for-good-platformer-mechanics/ http://higherorderfun.com/blog/2012/05/20/the-guide-to-implementing-2d-platformers/ http://info.sonicretro.org/Sonic_Physics_Guide
  10. ikarth

    RTS/Management game miniproject

    There are no books I'm aware of about game development with Haskell. You might want to look up simulations with Haskell, since there is some overlap there.   I assume you've already done a web search for "game development with Haskell"? You might want to consider also searching for some other functional languages and see how game development works in those. 
  11. Well, Unity does have LoadLevelAdditiveAsyc which is a foundation for streaming levels continuously (plus some of the Pro features to help with this are now free in 5). Unreal has level streaming. It's not that there's no support. It's that the real question is what kind of data loading does a particular game actually need.
  12. ikarth

    My First Game Project

    I think you're still misunderstanding a bit here. Whether you said where they were from or you didn't doesn't matter. It's still not cool to rip off commercial sprites. An artist worked hard on those; stealing them even for your prototype is going to upset every artist who hopes to be compensated for their work.   There's plenty of open-source or Creative Commons art available these days (check out http://opengameart.org/) and one of the major points about Ludum Dare is to demonstrate that you can make a game entirely from scratch in 48 hours, art and all. There's no excuse for ripping off commercial sprites.
  13. There aren't any engines that are really optimized for an open-world game. That said, it's probably going to be easier to use an existing engine rather than, for example, rewriting model-and-animation file loading code.   Every engine you've mentioned has been used for open world games in the past. What you might want to consider instead is exactly which features you're going to need to implement your open world. A Skyrim style game with static terrain is very different from a Minecraft fully-editable world which is in turn very different from an MMO-style regional map, which is in turn different from a more strategic game.   I'd guess you need to look at a way to handle dividing the content into sections, paging them in and out of the world as the player travels. What happens when the player isn't there? Is this the kind of game where you can simply freeze the enemies when you are far enough away, or do you have a Far-Cry-4-like animal migration system? Or do some things need to be remembered, while other things can just be despawned? How far is your draw distance?   Answering technical questions like these in terms of your design and engineering plan will tell you a lot more about what you need to be looking for in an engine, and what kind of features your team will need to implement yourselves.
  14. ikarth

    Procedural road system and L-system

    A L-System can work; there's a bunch of research on using them for cities. Here's one example.   You might also try using a delaunay triangulation, something inspired by Jared Tarbell's 'substrate', or a simulation of slime mold. Or look up urban planning theories and come up with your own method.
  15. ikarth

    Simulating the sun

    Which part are you having trouble with? The initial angle, the movement over time, or both?   The angle is just a matter of picking an angle. If you want something specific, there's information online for calculating the exact angle the sun will be at for various times and places.   How do you move objects in your game now? The sun light is really just another thing in the game, so updating its rotation like you'd update another rotating object should work. (You could optimize it and only check in on it at long intervals if it's moving very slowly, but sounds like you just want to get it to work to start off with.)   This is a very basic setup, and there are a ton of other things you can do for the lighting in your game.
  • 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!