• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

698 Good

About DishSoap

  • Rank
  1. Reducing Collision Checks

    Since a triangle can be represented as a composition of smaller triangles you could use an approach similar to a quad tree.    Create a tree data structure where each parent represents a triangle and its children represent the four smaller triangles that make up their parent. To traverse the tree you'd use a point_in_triangle function and traverse down it similar to how you'd traverse a quad tree.    I am making some assumptions here based on your screenshot. Namely that your triangles are the same size. If your scene was contained within some arbitrary polygon your data structure would be a bit more complex but still similar. 
  2. It is also common to have technical designers on a team. These are designers who may implement some design in whatever scripting language the game engine supports. Therefore, if you are familiar with programming you'd open a larger set of jobs you are qualified for.    Otherwise, It is good to be comfortable with technology. It is often the case that tools will be built in house that you will need to use. Some examples include achievement editors, item editors, etc. These tools might spit out to an intermediate file format, be it json, xml or even insert into a database. It is not unusual to have to merge these files with other designers changes or even edit them manually. You will also need to be comfortable using version control which can be intimidating at first.
  3. Turn this part: troll = new Troll; troll->setPosition(std::rand() % 600 + 1, std::rand() % 600 + 1); enemyVector.push_back(troll); Into this: for (int i = 0; i < 10; ++i) { troll = new Troll; troll->setPosition(std::rand() % 600 + 1, std::rand() % 600 + 1); enemyVector.push_back(troll); }
  4. What is z-plane?

    It is safe to imagine the Complex plane as a Cartesian one, yes. The quote you referenced is explaining how you can extract the x and y components of a Cartesian plane from an equation with complex numbers. For example, if you had the equations:   z1 = 1 + 2i z2 = 3 + 6i z3 = 7 + 8i   Where i represents imaginary numbers.   You'd be able to extract the points (1, 2), (3, 6) and (7, 8) and plot them on an x-y plane. 
  5. Camera movement too fast

    Could you make time length a function of the distance? I'm not sure what you are doing for units on both variables. But if you calculate the distance to a point multiply it by how long you'd like to take per unit distance.
  6. Starting Game-Dev

    I would honestly recommend Unity if you hadn't said not Unity. The amount of documentation and tutorials littered across the Unity website and the internet is vast and has all you need to build such a project. In fact, there is a template you can download off the unity store that is a small 3D platformer prototype.    Now that I've suggested exactly what you don't want to use I will try to address your question better:    I don't think Unreal is too much for such a project. They also have a platformer as a template: https://docs.unrealengine.com/latest/INT/Resources/SampleGames/PlatformerGame/   Otherwise you can use a 3D library such as Ogre3D or Irrlicht. Here is a good list of engines if you want to stick with C++, with a list of pros: http://gamedev.stackexchange.com/questions/21/easy-to-use-cross-platform-3d-engines-for-c-game-development.   Remember, when building games for academic purposes it is often not extremely important what engine or toolset you use. You will get a lot of the same knowledge no matter what you choose, so don't stress too much about which one to use. Grab one that looks good to you and have at it, you will learn a lot!
  7. Starting Game-Dev

    Hi Axxooss! Welcome to the forums.   I have a couple questions if that's ok! It will help answer your question a little better, I think.   How much programming experience do you have?   Have you made a game before(2D, text-based, or anything)?   What types of applications have you developed in the past?   Sorry, I think it's hard to give accurate advice on where to start without a little more information. Also, as more of a personal question, why not Unity? I'm curious why Game Maker but not Unity.
  8. Looking into fix my time step

    Time delta is usually a small number, anywhere from 1/30 to 1/60, for example. So if we look at it with random numbers and assume the simple case of just position and velocity:   position = <5, 5> velocity = <3, 0>  deltaTime = 1/30   And your options are to use delta time or not:   w/delta time:   position = position + velocity * deltaTime position = <5, 5> + <3, 0> * 1/30 position = <5.1, 5>   without delta time:   position = position + velocity position = <5, 5> + <3, 0> position = <8, 5>   So assuming this delta time 1/30(30 fps) the object being integrated/simulated without delta time would appear to move faster.   So if you weren't using a delta time before you have to rethink your scalar values and what they mean for objects in motion before. As in, you need to raise your velocity, lower your mass or increase the acceleration.
  9. You could do a breadth first search for all available nodes to depth N, just make sure you remove diagonal tiles from the adjacency lists. For example: ArrayOfNeighbors getNeighbors(int x, int y) { return Array(Coord(x + 1, y), Coord(x - 1, y), Coord(x, y + 1), Coord(x, y - 1)); } ArrayOfCoordinates findCoords(int centerX, int centerY, int radius) { ArrayOfCoordinates arr; QueueOfCoordinates frontier; frontier.add(coord(centerX, centerY)); int i = 0; while (!frontier.empty() && i++ < radius) { Coord coord= frontier.dequeue(); if (cord not in arr) arr.add(coord); foreach (adjacentNode to coord) // Use getNeighbors or getUniqueNeighbors(ones not seen in arr) frontier.enqueue(adjacentNode); } return arr; } I'm sure the above is wrong, syntactically, in some way. But I hope it's a clear example, do a bfs up until depth radius. You'd likely want to use a set or something for what you have seen and use a variant of getNeighbors like getUniqueNeighbors to find all neighbors that aren't in your array.
  10. Looking into fix my time step

    Hi!     Looking at your code:  integrate( state, t, dt ); It looks like you are moving your simulation forward in fixed delta times. The accumulator acts as a way of collecting time up until the point where you start the simulation. At that point you want to either catch up or don't do your integration. So for example if you wanted to do your integration 30 times a second and your rendering 60 times a second the first time you got to that while loop the accumulator would have the value 1/60. The second time it would have the value 1/30, so do your integration step once. On the other hand, if you were on a slower machine the first time you got to that while loop you could have a value of 1/15 in the accumulator(rendering at 15fps), in this case you would need to to do two steps of simulation to "catch up" to your rendering. It just looks like a way to keep your simulations consistent. 
  11. Hello!   I think for a turn based game a queue for actions is the correct solution. It would be good to extend it even further to every character in the game even. Something similar to the example below: // Have each of your characters inherit, or have, something that can be en queued in here Queue characterQueue; List waitList; TurnQueue(priority) { // You could base priority on some stat or anything characterQueue = new Queue(priority); } Update() { character = characterQueue.Pop(); // Insert character into wait list (before or after update) waitList.Insert(character); // Start and update the characters simulation character.Start(); character.Update(); // If the queue is empty all characters back into it if (characterQueue.Empty()) AddListToQueue(waitList); } In regards to the frequency of the Update call. You can call it as often as you like and check if a character is currently in the middle of their move and if so return, otherwise continue and let the next character go or you can explicitly call it when a character has ended their turn.   I like this strategy because it can make solutions for some turn-based features a little easier. You can, for example, make the priority for the queue be some sort of 'agility' stat so the character with the highest agility will come first in the queue. You can also keep track of how often the queue empties and this can give you a number representing how many turns have elapsed since the start of battle. You can use that number for any status effects that might need to last for a certain number of turns.   As for your desire to represent things your AI is doing visually, it seems like a normal use case for whatever rendering strategies you are using. If you had a regular character moving around and needed to draw its path you'd probably construct a list of nodes that represented its path and send that to the renderer/gpu/fooBarDrawingThing for visual representation. You don't need to make it complicated by introducing a separate planning thread, I think. Maybe I am misunderstanding, do you want to display, visually, what the AI could do in the future? 
  12. OOP design question

    Hi there!   So I don't dislike the inheritance scheme or necessarily have anything against that design. For me, and what I've seen in the past is to treat a projectile just like a chunk of data and have a separate modules handle the simulation of projectiles. I guess something like below is how i'd do it: struct Projectile { unsigned int id; unsigned int type; // <- maybe? float speed; float size; // ... Plenty of other things ... // bool flags; }; In some sort of simulation module or class. for (auto proj : projectiles) {   if (proj.flags & LINEAR)     applyLinearSimulation(proj);   // Do specific simulation things here   if (proj.flags & PROJ_HOMING)     applyHomingSimulation(proj);   // etc ...   // etc ... }   You can achieve the same exact thing by giving the projectile knowledge on how to simulate itself via an update function and have it inherit from some sort of base class. I guess what's nice about above is you can easily mix and match different behaviors and to create a new projectile often doesn't take any new code but rather different data.    As an example. Say you had a rocket projectile class that had its inheritance scheme and also had an acid spray projectile, or something. Now you want to create a new rocket acid spray projectile shot. Well it's possible in the inheritance scheme but you'd probably make a new sub class for it. If you treat the projectile like data you could just create a projectile and set the flags for both rocket and acid spray. Obviously, in practice, it may not always be so simple but that's the idea.   As for selecting items. I'd just give projectiles an ID or type and check on that for knowing what you have selected.    I'm sure there's lot of right designs for this problem. This is how I'd approach it though.
  13. Unity Unity or C++?

    Hi there!   If you would like to make a 2D game using C++ I would recommend SDL, https://www.libsdl.org/index.php or SFML http://www.sfml-dev.org/. I have not used them in a while but I believe the biggest difference between choosing one of the two is the style of the API. SDL has a C api so it does not use C++ features you might be used to like classes. SFML on the other hand has a nice class based abstraction.   If you want to make a 2D game in Unity it's completely possible as well. I think it comes down to preference, really. Unity is a great engine for building games and you will learn a ton no matter which route you go down.   As for job opportunities. In my experience, in interviews for game companies you will likely be tested on lower level knowledge. Often ideas independent of languages(the graphics pipeline, graphics theory, math, algorithms and data structures). These are things you will learn bits and pieces of no matter what tools you use. It's just a consequence of making a game. Having said that, most game companies I have seen would like you to have experience with C++, whether they use Unity or not. So I think it would be a greater benefit to know C++, if your primary goal right now is to get a job.    In my opinion, if you are new to game creation, you shouldn't worry about it. Just worry about making games whichever way makes the most sense to you and the job will come in time.
  14. Lineup of Books For Beginner

    I have read bits and pieces of Real Time Rendering, for me it has been more of a reference when I am implementing my own collision detection than reading it from start to finish. It is a really great book from what I've seen though so I don't want to deter you from reading it start to finish, just my two cents.   I'd add a 3D mathematics book to that list. I was pleasantly surprised on the value I got from diving into some mathematics when doing things like matrix transformations, vector math and lighting, what not. The book I have read on the subject is: Mathematics for 3D Game Programming and Computer Graphics, Third Edition by Eric Lengyel.    I'd agree with braindigitalis in that the best thing you can do is just build a game or something involving graphics in parallel with the books. It's important to practice the concepts on your own. In a book I have been reading, Computer Graphics Principles and Practice the author encourages a "3 step approach" to learning a subject, that is application-theory-application, or something similar. So try something before you seek a more theoretical understanding of it and then apply it again. It will give you a better understanding of the subject that way I think. So implement some game or some bits and knobs to an engine in your mind, go read about it and do it again.
  15.   This is good stuff! I was actually thinking of doing the key, value pair config files. I was kind of drawing out how I would implement that with a map or something similar. This is almost exactly what I had in mind, it would be a great source to compare my resultant work to. Thanks a lot!
  • Advertisement