• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

1129 Excellent

About TheUnnamable

  • Rank
  1. I'd suggest looking into Milkshape3D. It has a free version, and support for a huge amount of formats, but maybe you could have some luck with the other formats you can download your assets in.
  2. Code vs. drag and drop in Game Maker

    Firstly, how experienced are you with Game Maker? The tutorials hopefully tell you what each piece of code is doing, so you can recreate it with dnd. After googling around a bit, I've found an excellent reference. Unfortunately, this converts dnd to code, not the other way around, that would be a tremendous amount of work. However, if you skim the pdf, it should be manageable. My search query was "game maker drag and drop to gml", in case you'd like to find more. As for functionality, most 2D games without too much logic going on can be done with dnd. Think of platformers, schmups, racing games, top-down shooters, etc. In theory, even more advanced games can be done, like RTSes, but the dnd would be too verbose for that I think. Try to stay away from complex AI and algorithms, and you should be fine.
  3. -Are your matrices correctly set? ( world, view, and most importantly, projection)   Edit: Also, if I'm unsure if things are working, I usually change the clear color from frame to frame. That way I know that the window and the context is working, and the draw calls are actually happening. This can also show that buffers are swapped if necessary.
  4. Criticism of C++

    Here's one.
  5. If those sprites are two different objects, just set their depths. The lower the value, the "higher up" the sprite will be. 
  6. Glut & opengl only for 2D [Question]

    Hi! To use OpenGL, you need a window to draw to. This means you'll always need some kind of window manager. Either use the OS's native one, or a cross-platform one, like SDL. The benefit of the latter is that it abstracts away a lot of platform-specific details you won't have to bother with, and a lot of work is already done for you. If simply not using SDL or any other "library", you could do fine with using a native window handler ( WinAPI for example ). Technically that's another library, but I think that's okay, you can't really go lower-level from there.   Now, I'm not entirely sure about this one, but technically you could do "without a window" on some Linux distros when no GUI is present. Then again, you still need to request a surface, which is pretty close to using a window manager. I could be wrong on this one, and I don't advise going this route.   On the other hand, if SDL seems like an overkill, try GLFW. It handles windows and input to some limited extent. You'll have to do anything else by yourself.
  7. Yes, the quickest and dirty-ish solution would be to use a conditional branch. Something like this:  void Grid::calculateActualCosts() { unsigned last_i = 0; unsigned last_j = 0; if(readingFromFile()) { last_i = getLastI(); last_j = getLastJ(); } unsigned i = 0; unsigned j = 0; for (auto& walkable : m_walkables) { j = 0; if(i++ < last_i) continue; for (auto& walkables : m_walkables) { if(j++ < last_j) continue; AStarNode* fromNode = acquireNode(...); AStarNode* toNode = acquireNode(...); AStarNodePair pair(fromNode, toNode); /// astar(fromNode, toNode, totalCost); actualCosts.insert(std::make_pair(pair, totalCost)); } } } Or, you could keep an std::set<std::pair<walkable, walkable>>. If a pair of any two walkables is in the set, it has been processed already and you can just do a continue, like this:  for (auto& walkables : m_walkables) { if(progressSet.count({walkable, walkables})) continue; AStarNode* fromNode = acquireNode(...); AStarNode* toNode = acquireNode(...); AStarNodePair pair(fromNode, toNode); /// astar(fromNode, toNode, totalCost); actualCosts.insert(std::make_pair(pair, totalCost));         progressSet.insert({walkable, walkables}); } At the beginning of the function you'd start with an empty set, and if you are continuing, read the set from a file.    Your update2 also sounds valid, if it is practical to sort your data.  At first, a VM sounds like an overkill, but if it's something you only run on your dev computer ( I assume so ), it is the fastest way to having a solution. 
  8. Steps for multi-platform?

    So, your game logic would be in in C++ and everything else also in C++. Then you write tedious wrappers so you can use these from Java. 
  9. "What variables do I need to save for next time commencing?" This highly depends on your algorithm and code   "What strategy is good for this kind of data dumping?" I assume that your algorithm has some kind of state. For example, you are converting a heightmap to a normal map. Your input is the heightmap, your output is the normal map, and your state is your position in the heightmap. For example, you have a 65536x65536 sized heightmap and you are at [17, 8192] and want to continue tomorrow. So you save the normals you have calculated so far - aka. flush the offline data - and somewhere else - possibly a cache file - you write your position.  We can probably help you further if you tell us more about your code/algorithm.    EDIT: Also, one more thing to look out for. You want to be able to incrementally save your output. Here, an obvious solution would be to have your grid of normals. The ones you haven't calculated yet would be assumed to be zero, and the ones you've already calculated have their values. Here, your default value doesn't matter as you can easily decide if you have already calculated a value because you have the state I mentioned earlier.  When you flush your data again, the only difference would be that you have less default values in your output. 
  10. Your code generation article is really interesting, although got me wondering.  The last time I did code generation, I used PHP. The syntax is generally really easy, it is a general-purpose language, so you can do mostly whatever you want, and it is high-level and productive. Also, it is really easy to use it for generating text because you can freely mix raw text and code ( instead of long print("..."); lines ).  The example you show ( index the template xml itself ) could also be done, although would need some preprocessing.  So, I'm curious as to why implement template-specific languages, instead of get download a php and type away. What are the pros and cons? 
  11. Do you mean deleting by value instead of index? So, something like std::vector<float> values = {1.41f, 3.14f, 42.0f}; //Initialize vector with some values values.erase(1.41f); for(float v : values) std::cout << v << std::endl; And it would say 3.14f and 42.0f?   For that, you could just run through the vector and delete the value: for(auto it = values.begin(); it != values.end(); it++) if(*it == 1.41f) { values.erase(it); break; } Or, include <algorithm> and do this: values.erase(std::find(values.begin(), values.end(), 1.41f); std::find returns the iterator to the first item in the range ( values.begin(), values.end() ) that compares equal to the value (1.41f) that you provide.   Please note that in the example, I use floats, so it is hard to confuse the value with an index. However, comparing floats simply with the == operator is usually not optimal. That is an entirely different topic, I advise you to look it up.
  12. Curved and sloped 3D tiles

    You could even apply some kind of transformation afterwards. Look at Warcraft3's system, for example. The terrain is certainly composed of tiles ( mostly flat tiles, cliffs at certain places ). However, you can also apply height to them. Basically, you have a mesh composed of tiles, and then offset the vertices' z values by a heightmap.  Sorry, I can't provide an image right now, but if you search a bit, you will definitely find some.    Also, it's worth noting that you can do any sort of transformation you wish. Just provide the editor with some way to control that transform, and preview it. ( Assuming you have some kind of level editor ) 
  13. As for the visuals, I feel like most of the specular is unnecessary. It makes the whole thing feel artificial and unsettling. At least, I don't like looking at this kind of artificial for too long.
  14. Default Keyboard Controls

    G is really awkward to reach when your fingers are on WASD. I'd suggest moving it to F, or using Q and E for your frequent actions ( like reload and grenades )
  15. Finding Camera Front

    Assume Y+ points forward and Z+ points upwards, and you have your rotations in radians ( I see you already convert them, so that won't be an issue ). In this scenario, rx would mean the pitch, rz would mean the yaw, and ry would mean the roll. Now, to get the vector (vx,vy,vz) facing in the camera's direction: vx = cos(rz) * sin(rx); vy = -sin(rz) * sin(rx); vz = cos(rx); vy is negated so increasing rz would rotate counter-clockwise. You could just not-negate it if that's not the desired behaviour. As you can see, ry ( the roll ) is not included - a vector is just a direction, but not a full transformation, so it doesn't include it.
  • Advertisement