Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

2682 Excellent

About Nanoha

  • Rank

Personal Information

  • Interests

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I haven't tried this myself but right now you have a navigation graph. Each cell is a node and you find a route through those nodes. Instead of having nodes, you could form a navigation mesh as in this image: This will depend on your heuristic, is a shortest path the fewest nodes or is it the shortest distance travelled? Given your regular structure you could dynamically alter and merge cells as new buildings/blockages are added which should result in more direct movement as you want and also make future path queries faster too. Those huge open areas could be merged together into few large polygons instead of many small squares. In the image you have you could merge all of that into just 5 polygons with an algorithm.
  2. Nanoha

    Windows 10 update worries

    I've just spent the better part of 6 hours trying to get my computer working after this update... (2 hours of that was sleeping while a thing spun around on a black screen in vain). I had my windows dongle out trying to repair unsuccessfully, then I tried to create a new one from another PC, I'd been trying all sorts and it didn't help that all I saw was a black screen so I had no idea if I was turning my computer off in the middle of it doing something which no doubt made matters worse. In the end I believe windows had decided to send my display to some port that wasn't connected so all I ever saw was black after restarting but even plugging monitors into the other connections didn't help (I could often see the bios/boot screen but only black instead of windows). It took a fair bit of removing my GFX card, using the on-board to change something, then putting my GFX card back in and trying it, then removing etc etc..
  3. A few general statements (that I have no sources to back up). If you have 2 equally skilled developers (one c++, one c#) then the c# one will probably get the job done a bit faster. The c++ one will probably have an easier time supporting multiple platforms and will be able to offer the most performance but that will still take a lot of time.   For simple, personal projects I am always more tempted to use c# but I like to use c++ otherwise more from preference than for any particular need. Almost definitely c++ when you need performance (many games) but there are plenty of games that just din't need crazy performance and you'd be better off using a language/tools that are easier and faster to develop with.
  4. Nanoha

    This coworker I know...

    I wouldn't be at all surprised if he genuinely is unaware. I can think of several similar situations with people in my own life and I think "How on earth can they not notice?" I have no doubt that they really don't notice and until someone says something they will continue their life blissfully unaware. Isn't this a law, an object in motion...   What to do about it is very difficult because it depends largely on how they will react to what you do. Avoid being hostile "Cover your flipping face!" because that may work but chances are it'll just piss him off and then he may well do it out of spite (people are funny creatures). Personally I'd exaggerate wiping my face (or really wipe my face if needs be..) and say "Yeah, thanks for that, any chance you can keep your mucus to yourself next time?" It's not hostile, it's not an order and it explains why you'd like him to cover his face. Who knows, next time he decides to crazy sneeze he might have a thought about covering his mouth/nose before hand. One thing's for sure though, if you do nothing, nothing will change. Just avoid being hostile and avoid TELLING him what to do.
  5. Nanoha

    C++: Merging PNGs and GIFs

    I found libpng fairly easy to work with. Not sure about gifs however.
  6. %width for sizes is a good place to start but for Android there is the concept of display-independent pixels (and similar on Apple Devices I assume but I have no experience there). They will be the same real size no matter the screen size or resolution. I say they are better as they stop you ending up with huge buttons when you  run your app/game on tablets compared to phones. Personally I set min/max values that things can be using display-independent pixels and allow my ui to scale between those values. You will still have other issues such as differing aspect ratios. 
  7. A screen shot will help a lot. I am curious what your models look like and how they are when displayed as spheres. It will certainly help people to help you if they can see it. It sounds to me like you are drawing the sphere each time but with a different texture so I would start by checking your other models are actually being drawn and not just a sphere over and over. Check they are loaded correctly and so on.   Do these models use different shaders? Are you doing any vertex manipulation in your shaders?   Put glGetError thrgouhout your code and investigate any errors it tells you about.   It is unlikely (though certainly not impossible) that OpenGL is turning your models to spheres.
  8. You mentioned the objects are moving across the screen. Show the code where you do this (or does GDX do this for you?). This should be fairly trivial to solve if you are the one responsible for moving the objects. It will also be helpful to see the section of code that runs when the user clicks on an object.   Could you give more details of why you are doing this? What is supposed to happen when the user clicks on the object (from a gameplay point of view rather than a logical view).
  9. I would consider something like Ogre3D to be just a graphics engine. If you were to make a game with it you would need something to deal with your windows (actually I think Orge3D does create a window for you), input, physics, network and so on but the graphics part would be taken care of by Ogre3D (which itself then uses DirectX, OpenGl etc). You'd still have a lot of plumbing to do to get everything working together which you wouldn't have with a more general game engine (Unity, Unreal, CryEngine etc).
  10. Nanoha

    Rendering Text for GUI

    You know FreeType gives you the information right?  You init the face type, create the new face (font) and from there the face has face->glyph->advance.x, bearing is in face->glyph->bitmap_left and _top for offsets. The first tutorial I found as I did it a while ago: http://lazyfoo.net/tutorials/OpenGL/23_freetype_fonts/index.php   Yeah I am aware. I was referencing to you then having to use those values to move your quads into the right position. I found that part the most challenging aspect even with the documentation.
  11. Nanoha

    Rendering Text for GUI

    Fonts are a nightmare. I used FreeFype in my app as Vstrakh recommends. It was quite a lot of work compared to other methods I have used in the past but the results are wonderful. One thing I really like about it is that it allows me to have fonts in very high resolutions for devices with higher resolutions and lower resolution fonts for lower devices. The basic idea is you create a texture with all the glyphs on and then draw lots of quads each with a different glyph (letter etc) on. There is a lot involved though because even simple things such as some letters being smaller than others means you need to space each out differently etc. I didn't find FreeType overly helpful in this regard, it took me a lot of trial and error to figure it all out even with examples and a tutorial of sorts. I will say though it is powerful, flexible and produces appealing results at a good speed when using it as a texture atlas. I can't say for certain if it supports Japanese characters but it does support vertical layouts and mentions Japanese as one of the examples of something that could use a verital layout.
  12. Nanoha

    Just for Fun

    I can't help but feel this is a trick question somehow. Can you even lose solitaire (been a long time since I played it)? Assuming it's not then I would say he now needs to win the next 291 games in a row since (6+291)/(9+291) = 0.99.   That seemed a bit easy though and since you chose 2/3rds of wins maybe you are doing something funny with the recurring numbers and maybe you meant 99.99(recurring)%. In which case it's now impossible for him to ever do it since 0.9999999 recurring is 1 and since he's already lost 3 he can never get 100%.
  13. I ran into this same problem (also mobile) and essentially I have the same solution as you do. I don't know how inefficient it is (it's only checking a flag after all) but I don't see a great way to avoid that performance-wise. I abstracted much of my rendering away so I have vertex array object objects (a class). From my code I treat it just as if it was a vertex array object but it hides all this away. If the device has VAO support then it uses it, if not then it uses the older style but it all looks the same to the calling code. Because it looks the same to the calling code the code can be written as if it is just using vertex array objects even if it isn't and that simplifies things greatly, I don't have if VAO_supported/else scattered everywhere in my code for rendering, only in this one class.   To get that to work though required abstracting everything else too which was a lot of work. I had to hide almost all of the OpenGL stuff too.
  14. Nanoha

    3D vector rotations around an axis.

    That explains your problem a lot better but it's still a little confusing. Are you hoping to tile that planet with pentagons? Should all the red arrows point out from the centre of the planet?   I hesitate to say more in case I am totally off about your problem but maybe this will help somehow. To get a normal that points directly out from the planet at any point is just: normal = normalize(vertexPosition - planetCentre). Now you want another vector at right angle to that points around the planet (longitudinal - around it's axis of rotation if I have that correct, I get them mixed up). To do that you just need to cross your new surface normal with the vector which represents your planets axis (which is presumable just global 'up'). I'm going to call this the tangent tangent = CrossProduct(planetAxis, normal); // the order of those two vectors might need to be flipped. Finally you need one more vector which points up/down the planet's surface (latitudinal direction if I recall), we'll call this the binormal binormal = CrossProduct(tangent, normal). I often get mixed up about which vector should go first in cross products so they may need to be flipped around until they look correct. You should now have 3 basis vectors, one points out from the planet's surface, one points right at a tangent along the planet's surface and the other points up at a tangent along the planet's surface. This should work and be consistent around your planet and can be used to orient those pentagons correctly. As with all this though there is one exception and that is at the poles because the normal and the planet's axis there will be parallel.   That probably isn't what your actual problem is but it sounds similar. For other similar problems you could look up normal mapping as this sorta things is needed there. I haven't read this but a quick search gave this and the images look promising: http://www.opengl-tutorial.org/intermediate-tutorials/tutorial-13-normal-mapping/
  15. Nanoha

    3D vector rotations around an axis.

    My understanding was similar to what Haegarr described (which might not actually be the problem). Every time I rotate it would be about some line (an axis) that goes through the origin so it makes perfect sense to me that that's what your rotations do. If that isn't what you want then you need to do as Haegarr suggestions. It might help if you post a little code where you actually use your rotations, that might better show the limitations of your current solution.   What language are you using, what do you use for your visuals etc? There are a few very solid libraries out there that might be worth checking out. 
  • 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!