Jump to content
  • Advertisement
    1. Past hour
    2. jackeabton

      Creating a Business Plan

      Drittens gibt es niemanden, der für Sie übergibt, wie wir erfahren, wenn Sie sie verwenden. Schuhe Adidas Tubular Invader Strap kaufen Ein fantastischer Indikator für Laufschuhe, bei dem Sie die richtige Wahl treffen, können einige Turnschuhe sein, die sich in den Qualifikationen verflüssigen, sobald diese Leute hereinkommen.
    3. Adrian HS

      Doom Challenge, Doomed Attempt.

      Im in the same situation like you, i work when i could, even i make a log, and my time wasnt enough, i will continue developing my game with the code i make but in other genre. I felt bad because Doom is my favorite game and in this game i was planning to out my baby daughter as the main character...
    4. I'm interested - I'm a 3d modeler you can view my game design portfolio on my webpage www.djicecuddi.wixsite.com/djicecuddi just look in the game design portfolio section there and then private message me if you want to talk about it.
    5. Today
    6. Cacks

      OpenGL ViewPort Matrix

      @_Silence_ I want to convert my selected game object world position to screen position I then want to add my mouse movement coords to that position Project the updated screen position into the world Then make a ray
    7. phil67rpg

      plane game

      I will brush up on my oop I am also researching glutTimerFunc function.
    8. Yesterday
    9. Frostbite2927

      New to game design

      I am new to using these kind of sites and not sure how to go about doing things. I would like to know more about game design besides what my school is teaching me. I have always been interested in the field of making game but have been to scared to reach out and learn until now
    10. _Silence_

      OpenGL ViewPort Matrix

      There is no such matrix available in the API. However all OpenGL implementation must follow the same equations that are depicted here for example. To OP, what exactly are you trying to achieve ?
    11. bzt

      Optimized SLERP

      Hi, I was looking for a way to effectively interpolate between skeletons represented by list of bones with position vector + orientation quaternion pairs. To my surprise, I couldn't find any good solution, not to my taste that is. I can't use NLERP because I need a general solution, and NLERP is only good for small distance interpolations. SLERP would be perfect, but I couldn't find a decent implementation, only slow ones, so I spent a lot of time looking at game engines and quaternion libraries and reading academic articles on the topic. Finally, I decided to collect my findings and write my own optimized version of SLERP, which focuses on performance over precision, and which I now would like to share with you. Optimized cross-platform SLERP I've started from the well known formula, as implemented by most C++ libraries, and used all the tricks I could find on the net. Then I took it to the next level, and made some more adjustments on my own speeding up a little bit more. Finally I ended up with two solutions: 1. one that is cross-platfrom, ANSI C solution that is easily embeddable in C++ and compatible with any C / C++ quaternion class (provided their data can be seen as 4 floats), very simple, very minimal. Use it freely if you want, MIT licensed 2. a SIMD version, which I had to leave half-ready, because my compiler and Intel disagree on what intrinsics should be provided for SSE, moreover the compiler does not work the way its documentation say it should :-( Shit happens. I would only recommend this for experimental purposes, also MIT licensed Both versions are simpler and much faster than any implementations I could find, designed to be called in a loop several times. The only dependency they have is lib math (acosf, sinf). The SIMD version is half-ready, but even in this form it's almost 1.5 as fast as the other one, especially if you call it in a loop with memory prefetch on the quaternions. If I made any mistake, miscalculated or mistyped something, let me know. If anybody has an idea how to overcome that intrinsics blockade I have, that would be appreciated very much, because I can clearly see the path how to make the code several times faster, only if I could get rid of the library calls. I also plan to create an ARM NEON port once I have that. Cheers, bzt
    12. Euthyphro

      plane game

      After you make the changes I mentioned above, you should make a third class called Explosion then create an instance of Explosion at any location of impact. Explosions should be destroyed after playing their animation, so essentially, think of an explosion as just another object like a plane or bullet.
    13. frob

      Bare bones AAA team

      There's no one-size-fits-all, but it is something you can estimate: Look at similar projects and use them as a guide. These days a AAA game costs on the order of $500M to create, with about $200M spent on development costs. Full-sized big games (that aren't quite AAA) cost on the order of $50M-$100M in development costs. If you want to say "a game like ${A} or ${B} or ${C}" you can get closer, go do some research on those titles. If you can't find firm numbers, look at the size of development teams and multiply by salaries, look at published operating budgets for publicly traded companies, look at financial statements you may find online, look up estimates from aggregators like VGChartz. If all three are similar to what you want to make and they cost $75M, $45M, and $60M each, then you can use that for your own estimates. Don't forget that a startup has additional costs since they don't have a large library of resources to rely on nor existing piles of hardware, nor a history of working together in productive ways. Each of those has more costs. Game credits can be quite revealing.
    14. PocketRoguesLead

      Reality Incognita

      Hello, everyone. Our new game has been released and we need a little feedback:) Reality Incognita is a first person adventure game, done in a style of old adventure games: with static screens and basic animation, it has both horror and comedy elements, full voiceover, and many comic style cutscenes. Peri Res has woken up unexpectedly in a place that resembles anything but her daily routine. Upon closer inspection she discovers it’s an eerie space vessel bound for the unknown. Finding out why her current predicament is happening sets out to be our protagonist primary goal. The quest to determine and discover forthcoming events is unfortunately riddled with suspense and many dangers wait. To make matters worse the ship is constantly being sabotaged and her efforts are proving ever more difficult. Time is not on her side as she races to find out why she has been brought to this strange and vast spacefaring vessel. Our story will dabble in humor at times, with many twists and turns that are sure to keep even the most demanding adventures satisfied. Be prepared for a thrilling experience that is sure to keep you guessing with an engaging narrative and tons of surprises. You are going to be on the edge of your seat from start to finish. Steam Page Trailer
    15. Cheers guys. Do you have a link to a pixel shader that does the processing?
    16. There are an enormous number of websites and there are some book references, but as you point out, every game is different and has different needs.Further, networking technology is constantly evolving. Practices that were ideal in the era of dialup were replaced as broadband became more common. Practices common as broadband started were replaced again as networks evolved. And different game styles lead to different networking models; a slow turn-based game where a single event crosses the wire every few seconds is radically different from a Battle Royale style game with a hundred players and potentially thousands of objects where visibility, distance, cheating potential, and other rules all come into play for what gets transmitted and what stays put. These days games tend to rely heavily on existing libraries rather than writing raw socket code themselves, so brush up on those. If you're using an engine like Unreal or Unity or tools like GameMaker:Studio or GameSalad or similar, they all have networking components built in you should learn about. You might need to learn the underlying technologies as well if you're involved in network programming long term, but in the short term learning how your current game engine does things is generally enough.
    17. Tape_Worm

      Gorgon Update #9

      This is a small update that contains a few more fixes and additions. As always, to get the latest version, go to the Github Releases page and download version As always, there is a commit log on the release stating what changes were made. View the full article
    18. frob

      Github and Viruses

      The classic rule is 3-2-1 for data backups. At least 3 copies that are true backups. At least 2 media. At least 1 off site.
    19. frob

      Delayed shots Concept

      Requiring you to lead your shots has been a staple of game design since the 1970s. Entering into the early 1980s games like Missile Command were entirely based around the mechanic. Some games use it quite effectively. If you're on the defensive, the lead time can allow you a moment to escape unharmed. If you're on the offensive, the lead time can let you block predicted escape routes. For non-gameplay purposes, the delay can help mask network latency or data loading delays. It isn't always fun, so you must try it out and see how it helps or hurts your specific game.
    20. Find the mechanics that make your game fun and stick with it. Is your game about strategy, about skilled decision making? If so, stick with that. Is your game about rapid twitch response or precise aiming? if so, stick with that. A few years ago games tried to mix gameplay with some "skill and action", resulting in QTEs. Several games had QTE-or-die events that proved HUGELY unpopular. Instead of adding an element of skill, they forced players to memorize a series of button mashing that served no gameplay purpose at all. Several games that were accessible to players with limited mobility were otherwise wonderful, except the limited mobility players would always fail the QTE. Thankfully these days games have mostly abandoned them, as designers (as well as players and journalists) are returning to the fact that games should stick with their core mechanics.
    21. DerTroll

      A Dev Team Needed

      click me I think you have to provide a little bit more information if you want to find people. Which engine/programming language are you using? What is already there? Is your code on GitHub? etc.
    22. I believe this is the rite place for this question but I could be wrong so please forgive me if I am. So I managed to stop my objects from falling through the floor but now instead of colliding they just pass through each other, any ideas how to fix this solution?
    23. Okay,thanks! Then i will continue here if necessary. @Zakwayda Thanks man! Second time you helped me out succesfully! Couldnt have done it alone. Also thanks to @alvaro. Great postprocessing algorithm! Still amazed how it does its job with crappy data out of thin air! Thanks for your effort and time!
    24. turanszkij

      Biletaral Downsampler

      I haven't tried, but if it works for you, that's great and thanks!
    25. There's a handy Visual Studio compiler flag called /d2cgsummary which can help diagnose where the compile time is going: https://aras-p.info/blog/2017/10/23/Best-unknown-MSVC-flag-d2cgsummary/
    26. I think only the mods can answer that question. I'd think any continuation of this discussion would belong here (I'd imagine future readers would appreciate having all the information and discussion in one place), but that's just my guess as a user of the forums.
    27. That's correct, there's no hardware resolve support for UINT formats: https://docs.microsoft.com/en-us/windows/win32/direct3ddxgi/format-support-for-direct3d-11-0-feature-level-hardware You also can't create a multisampled texture with STAGING usage, so there's no direct way to read back the data on the CPU. Instead you should write a compute shader or pixel shader that can read the raw subsample data from the MSAA render target, and then output it to a larger 2D texture or buffer.
    28. TheAGamer39

      A Dev Team Needed

      Hi, I'm currently working on this game by myself and was wondering if anyone wanted to help I'm looking for programmers, illustrators, pixel artists, sound designers and developers. I'm a young teen and I prefer to program, I have a basic idea for the game but need help creating it and giving it some more uniqueness. Basically the game is a 2D, could be 3D if someone can teach me how to code games in 3D, and a large world adventure game were you have to fight monsters to level up and collect increasingly powerful items . There is also going to be a mysterious part of the game where you have to find certain artefacts and decode messages to get the best gear. I really hope people are interested please join my discord server: https://discord.gg/c5Ce9Q4 or contact me via email; theagamer39@hotmail.com if you want to help. Hope you have a nice day!
    29. Like 0 to 100mph in 3 seconds. That would be one value but still linear. I dont get your idea... but, never mind. Let's stop here for now. I have to read it again and many times more to grasp it. But i will try to get it! (I was able to grasp the Chaikin algorithm by the way... hehe! ^^) Okay. Thanks a lot. I think its a very interesting problem as well. I will now include the pen pressure and if this wont work out -> back to drawing board. But i really really hope this wont be the case... although the idea of straight lines might destroy my hopes... Because making a straight line, the timing might go through... but the pressure... we will see. I'll post back asap. Thanks to everybody involved. @Zakwayda @alvaro One last question... Would i open a new thread here or would i continue this thread?
    30. Tom Sloper

      Delayed shots Concept

      Well, just trust your own design instincts. Don't worry about whether your choices are good or not - try them, playtest them.
    31. Great - I hope that conditional evaluates to true The resolution in the 3rd dimension would be the same as that of the original curve - that is, one value per point. Currently you do have data for each point - the absolute and delta times. What we'd need though for each point is information about the change in speed between the segment preceding the point and the segment following it (this is all assuming my idea makes sense and would actually work). In my previous post I included some ideas about how this value could be computed. In any case, I think it's an interesting problem, and if you decide you want to pursue this idea, I can try to elaborate on what I mean. But, if you're reasonably happy with the results you have now, it may be that there'd be little point in pursuing more complex solutions. As we've established, the current solution generally only loses timing information along relatively straight parts of the path, which may not be something the user is likely to be concerned about or even notice.
    32. I made it yes. But isnt that exactly what i have at the moment? Dont we need more resolution on the 3rd dimension to preserve the timing data? How would you store this information in one value?? Yes sir! It seems to be solved for now if (pressuredata == LooksGoodAsWell){return true;} 😀
    33. Did you just make that? If so, nice. If in that example the red points lie in a plane and the blue part is perpendicular to that plane, then yeah, that's close to what I mean. The only difference is that in my example the time information is reduced to a single value for each point, so the blue part would be angular rather than curved and would only have vertices where there are red points. (Also, it wouldn't be 'time spent' exactly but rather information about changes in speed.) RDP would then be run on the vertices of the blue part, which, theoretically at least, would account for both the curve geometry, and changes in speed. That said: If that's the case, it sounds like maybe your problem is essentially solved and the extra complexity may not be needed
    34. You mean like this? @Zakwayda Thanks for your positive feedback. I also think that its sufficient. And even if its a straight line... it doesent really matter. One could just have drawn the straight line in one wipe. As long as the overall look does not look robotic iam okay with it!
    35. AlienplayGames

      Falling Ball

    36. AlienplayGames

      Spin! has been released!

      Hey everyone! Spin! has been released and you can try it out! It's available here: https://www.kongregate.com/games/Alienplay/spin https://www.newgrounds.com/portal/view/740043 https://alienplay.itch.io/spin https://gamejolt.com/games/falling-ball/438641 Can't wait to hear what you think about it! Any feedback is greatly appreciated!
    37. It certainly looks just fine, and very natural. It you were to put the original and the 'replay' side by side instead of in sequence one might be able to spot inaccuracies with respect to speed, but shown in succession there certainly don't seem to be any problems. Of course as long as the path is sufficiently 'curvy', your algorithms are probably going to do fine with the timing. A problem case would be more like the one I described earlier, where the user draws a more or less straight line, but with varying speed. As for your video though, seems good to me 🙂
    38. I have estimated that I will not be able to finish this challenge in time. I have started it too late and without a clear direction from the beginning. I managed to finish the necromancer character, the AI and most of the map. But I had some problems with projectiles going through walls and sometimes going in weird directions without any kind of apparent reason why. I have decided not to release the game as it is because it has some broken gameplay mechanics and I'd rather not release the game like this. I might continue working on it when I have more time and not be busy with other things as well. Well, it was fun anyway and congrats to the community members who succeeded in this challenge! Cheers.
    39. @Zakwayda I'am trough now with the "evenly distribute" function as well. So actually iam done with all steps now. Iam very well aware of the RDP functions epsilon / reduction strenght feature. i set it to 3.0 myself. I really do need this feature! I want, in the final software, to be able to choose the strenght of the smoothing with a slider. Just like in Illustrator. This helps A LOT to smoothen out shaky hand drawings my it be from a shaky hand or from a crappy graphics tablet jitter. Haha! I was not looking for a way to escape the "calc time through smoothing steps", programming effort lol. I just noticed the fact so i pointed it out. Thanks for pointing out a new possible solution to the RDP reduction "problem". Before i look into that i would like to get an honest opinion from you or anybody interested about the natural look of the playback. I made a new video HERE . So i would be curious about others opinions if the playback looks natural like the input. For me it looks better than expected. 😄 Exactly the same thought crossed my mind as well. I wouldnt be too concerned about the playback but more about the pen pressure side.
    40. Loosearmy

      Delayed shots Concept

      The view we're thinking are top down so you'll be able to see what's ahead of you alittle bit. So there will be strategy involved trying to guess where this projectile will hit once it is fired and how you will have to move accordingly. On the note of enemies. We're still trying to figure that out ourselves but at this time the enemies will not unless we have a multiplayer mode in which case everyone will have the delayed-fire. Let me know if there are any more questions I'll be more than happy to answer
    41. Adam Weesner

      Need Feedback on Portfolio?

      I do appreciate the advice from the art perspective. Taking great care in how a website looks to an employer it great for first impressions and professionalism. I'll try to follow your critique as best I can, thanks.
    42. Kylotan

      Need Feedback on Portfolio?

      I don't think any of that is relevant if he's trying to get employed as a game programmer.
    43. phil67rpg

      plane game

      thanks Euthyphro I will work on my game some more. however I am still stuck on how to draw a collision sprite when the bullet hits the plane, I know this is a small problem.
    44. Dawoodoz

      Need Feedback on Portfolio?

      Portfolio * The header is annoying because it has no reason to follow the reader on such a short page. Just feels like my screen became smaller, which is especially bad when zooming in on an image using a phone. The black fade below the top is too long, making it hard to focus on the content. * Dawn unto dusk has the right color theme on the background with a single hue, but the text has a red letter causing a bad 120 degree color combination between red and green. Hue should be matched in angles of 90 or 180 degrees if you use multiple colors. The title also doesn't follow the rule of thirds, making it look misplaced. * The clouds behind randomly colored text makes it look like you haven't taken courses in neither Design nor Human Computer Interaction. * The CrossWorld cover has under-sampled pixels, border overlaps without edges and non-matching colors. Cartoon styles shouldn't let different colors collide without a black border unless they match. * The crown in Island Wars break the hard black and white theme and looks like unrelated clip art with the drop shadows. * Let's go putt putt, has a noisy background with a clearly visible texture seam. There's no theme explaining red and yellow opaque diamonds on the field. Contributions It's good to show that you can work with other people, but show something you made alone. Just some concept art, game assets in context or a small but good looking game you made yourself. Career If your goal is to get hired for anything above hobby projects in Unity, you shouldn't be making a portfolio right now. Study the design rules, take some art classes, reach your full potential, find your own style, practice copying styles, make new artwork, create a clean site from scratch without the clutter. The competition is insane, so count on being one of 800 applicants with little chance of someone reading your CV. In the worst case, you'll be churned and replaced. In the best case, you'll have fun with friends in a small company barely paying rent.
    45. GildedOctopusStudios

      Coffee Tasting

      Sometimes my life is pretty cool. Monday I went to a coffee tasting class by myself. I tried to talk a friend into going with but she wasn’t feeling well. So coffee is grown in South America, Africa, and it’s starting to be grown in China. The reason why quality coffee is so expensive is that Asia(China and Japan mainly) has kinda discovered how awesome coffee is in the last 10 years or so. There is a higher demand than there is supply because of this. It’s why China is starting to try and grow their own coffee. The class was held at a little coffee shop near me called Drachenfutter which is a German word meaning to feed your dragon. It’s a colloquialism which refers to getting your significant other food when they are angry at you. German has so many cool words. I found out about the class on FB. So I walk in and the place is deserted other than staff and one other gal. I’m only a couple minutes early. The place is a classic coffee shop with couches and a fireplace and board games. I’m of course like “Hi, I’m here for the coffee tasting class?” The owner comes over and is like I’m so excited you’re here. I’m just kinda sitting there watching them get set up. They’re bringing out pots of hot water. The guy teaching the class is setting out 8 tiny bowls with coffee grounds in them. He looks like a normal guy come to find out he has a 2.6 million dollar insurance policy on his tongue! He’s the owner of the company that the coffee shop buys their coffee from. It’s like his second business. He started out in printing and had a really successful company but got super burnt out, just dreaded going to work. Every morning though he’d see these people who were happy to be going to work…at the coffee shop across from his company. So he sold his company and started a coffee roasting company. Every morning the guy and some of his employees taste the coffee that’s been roasted. It’s kind of a quality control thing. Coffee tasting is actually called cupping. The process is kinda like how you taste whisky more so than wine. You start by smelling the grounds. Then you add some hot water and smell it again. Then you take a spoon very similar to a soup spoon and kinda pass it through the coffee and smell the back of it, rinsing it off in hot water between cups. Then you scoop up some of the coffee in the spoon and you slurp it. Yes slurp it. Me, one other girl, and the coffee shop’s employees are all just standing around a table slurping coffee out of soup spoons;) It was kinda hilarious. There were 4 different coffees, one from china, one from Africa, and I think two from South America. What’s interesting is that coffee has different flavors depending on where it is grown due to the different soils. So one of the coffees had a lovely earthy dark chocolate taste, two were kinda acidic and fruity, and the last one was just kinda mild. An interesting fact men 18-34ish tend to prefer more acidic coffees while after that they tend to like less acidic. Women 18-35ish tend to prefer earthier darker coffees. I learned so much about coffee and all the steps that go into getting to the point of coffee grounds. It was a lot of fun and I’m definitely considering going to the next one which is about paring foods and coffee. The post Coffee Tasting appeared first on Gilded Octopus. View the full article
    46. That should probably be g_Tex [ i ] ...Not related to issue though, but hey.. Rename SV_Position in your VertexPosSize struct to something else (maybe call PosH/W POSITIONH/W) - you should only output SV_Position from your geometry shader, not the vertex shader! Here's an example: struct VS_OUTPUT { float3 Position : POSITION; float Height : HEIGHT; }; struct GS_INPUT { float3 Position : POSITION; float Height : HEIGHT; }; struct GS_OUTPUT { float4 Position : SV_POSITION; float2 UV : TEXCOORD0; uint TextureIndex : TEXINDEX; };
    47. I thought a little more about the problem of losing relevant data with RDP. I'll discuss the speed issue here, but I think the same concept can be applied to other parameters, like pressure. The following is speculative and off the top of my head, and there may be errors (conceptual or otherwise). Each segment in the original curve has a speed, which can be computed as (p0 and p1 are the endpoints of the segment): distance(p0, p1) / (p1.absolute_time - p0.absolute_time) Every point but the first and last can then be given a 'speed delta' value that is the absolute value of the difference between the speeds for the segments preceding and following the point. The greater this value, the more 'important' this point is (irrespective of other factors) in terms of capturing information about the original drawing speed. Here's a concrete example: speed delta = abs(5-5) = 0 | v *------------*------------* speed=5 speed=5 In this case you could remove the middle point without losing any information regarding speed. However, in this case: speed delta = abs(9-1) = 8 | v *------------*------------* speed=1 speed=9 Losing the middle point would lose valuable information, turning a period of slow movement followed by a period of quick movement into a single, uniform average speed. This seems to be the problem you're describing, where your RDP implementation is losing this kind of information. What I'm wondering is if the dimension in which the RDP algorithm is run could be expanded to include other parameters. So that we don't have to think beyond 3-d, let's just stick to one extra parameter, speed. Imagine the geometric curve lying in the xy plane. Now, map the speed deltas to the z axis in 3-d, so you have a 3-d curve. If RDP is then run in 3-d, incorporating this new information, the speed deltas can help prevent points that represent important speed information from being lost. One factor here is scale. If the speed deltas are much smaller or larger in general than the geometric deltas, that could throw things off, giving the speed deltas too little or too much weight. A possible solution would be to include a scaling/weighting factor for the speed deltas (and any other additional parameters you wish to include) so that the contribution is appropriately proportional. In summary, although I'm not sure I've worked out all the details here, I think it still may be possible to get the results you want by modifying the smoothing algorithm(s) (and given the possible expense of post-processing, that may be the only practical option).
    48. In PixelCast 7, Jeremy hangs out at Pixels = Pints + Bytes for the latest PixelFest Devs meetup and chats with two local indies about their studios. Joshua Jané demos 'Bouncy Bear' and explains what makes 'Just Bare Games' tick, including the fact that all their games contain bears! Meanwhile, Joseph Musso of Sunset Studios let's us in on the game he's been pondering for 10 years ('Santa's Sleigh Ride Sacrilegious Arcade Action'... say it three times fast), which is now playable after coming out to a PixelFest Devs meetup back in August.
    49. dimi309


      This is a doom-style game, for the fall 2019 gamedev challenge. It runs on Windows, MacOS and Linux. It is nothing spectacular and not well optimised, since it was put together over the course of a couple of weeks. Part of what makes it interesting is that it was built using the small3d framework which, admittedly, was initially developed for far more modest purposes. To build the game, the Vulkan edition of the small3d framework is required. Precompiled binaries are provided for Windows and MacOS though. On MacOS, execute the gloom.sh script from the command line, from within the binary directory, otherwise it might not work. Gloom has been developed in C++. The 3D models have been created using Blender. There is a note in the sounds directory giving credit to the creators of the sound file.
    50. So I've spent my spare time the last couple of months finalising small3d framework's migration to Vulkan and also making sure the framework runs on iOS and Android. I got my "Avoid the Bug" game running on my mobile phone and my iPad (in addition to the desktop OSes where it has already been working for a long time). I thought that I wouldn't have any time left for the fall 2019 challenge. Nonetheless, I managed to put a little something together. The game is called Gloom. It must be the ugliest game I have ever made, but hey, it runs on Vulkan and it has taken my little small3d framework to where it has never been before. I have a player moving through a map (which is read from a text file) while eliminating enemies. All of this runs on the standard small3d version 1.8 with no modification of the framework itself whatsoever. So anyway, I am not saying I hope you like the game (you probably won't) but I do hope it is good enough to fulfill the challenge requirements :)
    51. Zakwayda

      Capsule-Capsule Detection

      Sorry, '< or <=' was probably a little confusing. What I meant is that you can use either < or <=, as you prefer. In other words, it's your choice which to use. Conceptually, whether you choose < or <= depends on whether you want to count 'just touching' as an intersection (<= will count 'just touching', < won't). Both in theory and in practice, the 'just touching' case is probably unlikely to occur (except in contrived cases), so which comparison you use may not matter much. As for squared distance, in this context comparing squared distances is equivalent to comparing distances, so you can save some math (in particular a square root) by comparing squared distances instead. Untested pseudocode, but here's how you might perform the test once you've computed the pair of closest points: return squaredDistance(closestPoint0, closestPoint1) <= square(2 * radius)
  • 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!