Jump to content
  • Advertisement
  • Features

    1. Past hour
    2. Prototype

      SLD with VSCode on mac

      Great! I'm not sure how your makefile looks right now but if you use variables they must be on a separate line. However, a makefile can be as simple as just 'g++ something.cpp', it's really nothing more than a fancy way to dress up a command line with arguments and flags. You can easily test your makefile by running 'make' in the same directory. If the result is a working executable and no errors, you're good
    3. Today
    4. Hey man. Nice pictures. I think the graphical content is nicely presented on the site. The reel has a lot of stuff that's on the busy side. I think it could benefit from having some simpler material that showcases a delicate realistic VI implementation. Also, the sound libraries are holding you back. I don't say this to be mean or critical, but those string libraries are really lacking realism. The absence of divisi voicings, and not having extended articulations like glides, portamentos, pizzicatos, tremolo, or using round robin sampling are all small things that add up to a composition sounding 'digital'. But the trick is not to show them off for the sake of demonstrating you are capable of using these. Its to be subtle and tasteful in how you integrate them into relatively simplistic composition. I would suggest creating 2 different reels for film vs video game composition. Also a lot of those mixes has a harshness at 1-2K and 4500-6000hz that makes them seem a bit brittle. Dial these back, or control them with a good multi-band compressors on your group busses to add smoothness and warmth. Also a lot of those mixes has a harshness at 1-2K and 4500-6000hz that makes them seem a bit brittle. Dial these back, or control them with a good multi-band compressors on your group busses to add smoothness and warmth.
    5. jkuehlin

      Organ sound, how to make it?

      Sounds like a manually performed arpeggio using an a preset in a modeling synth. This is not a manipulated sample of a real organ. You can tell by the slight glide modulation from note to note, which is not a sonic feature a real organ is capable of producing. Start by browsing through presets in synthesizer VI's.
    6. Neryss

      SLD with VSCode on mac

      Alright so quick update : It definitely worked ! I did a simple printf to test if it works (while including SDL) ! Thank you so much for your help ! Just another quick question ; my makefile stand on one line while yours is several lines long, is it because I did something wrong ?
    7. I'm thinking on developing my own breeding game. Should be easy enougth to create the basic game mechanics and mostly the planning phase is done. I'll use "NimbleBit"s "Pocket Frogs" (https://en.wikipedia.org/wiki/Pocket_Frogs and https://play.google.com/store/apps/details?id=com.nimblebit.pocketfrogs&hl=de) as example, because my idea is in some ways quite similar. Android is the first platform I want to target, with optional expanding later to IOS and perhaps Windows. First Problem: I'm quite not sure about what language or engine I should use. I know this question is mainly based on opinion, but based on what I plan to do, is there an engine to prefer and why, or should I build it from scratch and wich language should I use then? At the moment my best bet would be on unity or python. Any suggestions here? Second (and most significant) Problem: I want to create a large amount of - let's call it - monsters, that differs in color, pattern, color of the pattern and partly shape, but I don't get the trick behind it. So the question here is: How to create reusable monsters that differ in the above mentioned characteristics, with the lowest possible number of graphics. My thoughts and attempts on that topic: I looked at Pocket Frogs, and except shape they do exact the same with their frogs what I want to do. But I really don't get how they created over 38.000 (!!!) individual frogs, and the game still doesn't use that much space. I first tried to extract the graphics from the games files to puzzle together what they did. But I could not find them. However I think I figured out some parts of this secret just by looking at the frogs ingame: I think they used a basic frog model. 16 to be exact, to create 16 background frogs in all the colors. On top of them they just displayed the different patterns. But - and thats the mystery - the patterns are in different colors too and I still dont believe they made 16*104=1664 different pattern graphics. So what trick am I missing here? Some kind of mask? Can I use the same technique to create different additional shapes for my monsters? And how did they made the feet moving. If the pattern on the feet are extra graphics, that would be another 1664 graphics. Any idea on how I can make this work, or on how did they make this work will be very appreciated! Thx
    8. ricvalerio

      Spells + Spell Editor, part 2

      There has been a lot of work on the spells system and editor, and I would like to share with you the progress of these last weeks regarding spells. On the previous video, I could show a few simple spells, like a fireball, charge, heal. But it didn't have targeting rules, so all spells required a target. Also, I could not choose what sounds to use for the spells, which is essential for feedback and player experience: I press a spell and immediately I hear sounds and see the animation going off. I can now also choose rules for target. It can require a target, or a location, it can be on units or items, friendly or enemy, party, raid, and a lot more. This makes the spell system really flexible, and the job of creating and managing spells is a lot simpler. So here is the video, let me know what you think. And in case you missed it, here is the first part: See you on the next blog post. Cheers
    9. I doubt a Biz Dev person would spend all day every day reviewing submissions. Seeking acquisition targets is a more important activity that takes up more time. And there are other duties as well - licensing in, licensing out, and other types of partnerships. I doubt that the submissions process is unmanageable. And a Biz Dev person could hire an assistant if it was unmanageable solo. More likely, most of the submission process is either replying "thanks but we don't accept submissions" or "don't call us, we'll call you."
    10. In episode 12, Jeremy chats with Nathan Jester and Derek Hampton at Brown Chicken Brown Cow in downtown Hampton. Nathan and Derek are local indie developers and long-time PixelFest participants. Nathan recently built a shoe-box arcade controller amongst a variety of gaming projects. Meanwhile, Derek talks Bouncy Bear and personal skill development.
    11. I guess so, I just find it hard to believe that any 'director' will be busy all day handling all that. I'll bet these large HTML5 publishers receive lots of submissions every day. I assumed someone more lower on the corporate ladder would take care of that. Unless these companies only have a small, handfull of employees.
    12. Hmm. New member. Only posted in a thread they created discussing their new business. Started as a new member on a forum for mechanical engineers with an identical first post on the same day. Looks like a product of Hormel Foods to me.
    13. Any ideas how to approach adding permanent / semi-permanent item augmentations? I'm trying to workout how exactly I'm going to tackle adding "consumable" and removable attachments to items and have it update the stats within the item tooltip as well. Updating the players stats is easy enough and I can spawn an emitter after the fact and attach it to the players actor at the appropriate socket. In order to attach to an actor (the item being augmented) I'd need a reference to that actor object and it appears I cannot add it as a variable and set it from the class defaults of even the base item that all the games items are children (clones) of.
    14. The second developer diary in our four part series is about how we created the environments of We Were Here Together and brought them to life. The game is about exploration, so it's vital to design and build spaces which have character, that players want to spend time with. Watch it below!
    15. romanz.r

      Gsgb model

      there is a model inside this is a file packer
    16. Uhm, excuse me, but what? I was talking about vector multiplication by a scalar value. The OP's question was: provided T,P,A known, how to get C? I answered that question and gave a few pointers on how to rotate a bitmap arrow. Neither of those require matrix operations. That was all. I've answered how I would do it with the given configuration, now the rest is up to the OP. Cheers, bzt
    17. Hey, Atm I'm converting the engine to have multiple backends(GL and vulkan atm) but I will follow your advice when I get to re-implementing this. Thanks.
    18. Same mindset, cool I think, I'll approach it with my usual naive way, and experiment.
    19. https://www.youtube.com/watch?v=iL1TFjlw4AY https://www.youtube.com/watch?v=YUrJ96OcRaQ
    20. https://www.youtube.com/watch?v=iL1TFjlw4AY https://www.youtube.com/watch?v=YUrJ96OcRaQ
    21. ArcanaDragon

      New Hero Added 11-21-2019

      New hero added: Heat Seeking Missile Click here to play Hero Land for free in your browser
    22. New hero added: Heat Seeking Missile
    23. To my understanding, clip space is -1.0,1.0 range, take for example orthogonal projection matrix as opposed to perspective matrix where no w division happens, it generates correct values for 24bit z buffer, otherwise it'd clip everything in front of you nearly. As I see it, you are outputing the clip space z to target without any acomodative encoding, that generates random clamped values when sampled back from channel of a texture.
    24. Oh, sorry for my acusation. Maybe you could switch to a standard syntax? https://stackoverflow.com/questions/16098177/replacing-multiple-placeholders-in-a-string Or adapt using string.Replace ? JavaScript has built in almost the same syntax: https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/template_strings Ah, okay I see the problem. A great advancement in computer science was to use labels instead of memory adresses. Some people forgot about that and created functions with looooong parameter lists. Luckily now we have got named parameters in C#. But then comes along this stupid template string syntax in C#. Javascript and razor (for C#) are better suited. You are not -- by chance -- writing a WebApp? I mean I once inherited code which used String.split() for everything. You should start with split, look at the result and then trim (not really the "trim" function, but substring) the strings. It is simpler to debug than working with cursors/index into a looong string.
    25. Yeah, less drag means less downforce ( there is less air to work the cars body ), and that means the car will understeer off the track if you don't account for it. It can be particularly tricky if the corner is after a long straight, like turn 1 in Snetterton. Because you're slipstreaming, you reach a significantly higher speed by the corner, so you have to adjust your braking point, and then get through the corner, fighting understeering the whole way through, all the while trying to stay close to the car before you, because you want to get past it asap. Sidenote: https://youtu.be/xIp7wi5mfiM?t=370 In really simplified terms this describes how the leading car can benefit from someone closely slipstreaming them, what you also mentioned originally. The particle idea can work here too, you just attach a fixed particle to the back of the car that adds drag to that car if unoccupied. Now the question is what is the proper math behind this.
    26. In my experience, this interpolation is the (relatively) easy part. The problems I found were: (a) there is almost always an error (because simple linear interpolation doesn't handle forces/acceleration/deceleration well - presumably some calculus here would reduce the error) and (b) performing the necessary correction is non-trivial unless you have granular enough control over the physics to be able to efficiently rewind and replay only the relevant entities, and only to the point that you want to render now (rather than some arbitrary time +/- half a frame, for example). Not sure if this is the case in the OP's engine, but it would be interesting to know.
    27. Kylotan

      3D Help with graphics card (and monitor) purchase

      Moved to Lounge as this is not a development question.
    28. Sorry but i’m not asking to do a homework because it is not a homework. i’m trying to create a dialogue system where when i have the string string s = “hello [Tag] how are you? I’m fine anda you ms,[tag]?” I have to replace the tag with corresponding words i have already a methods to do that i’m looking for a way to get off the string only the tag replace that word then rebuild the entire string.
    29. I guess this is a minimal example, but are there any more conditions that you didn't mention? Will there be roadblocks in the grid, do you want multiple different paths, will the grid change shape somehow? Because, if you only need a single path that covers an empty grid, the "simple and stupid" solution is to just hardcode one that works, like this one: Are there any reasons why you can't do that?
    30. I tried to give you some ideas. I am not doing your homework. I do not know why you think you should do something "char by char". In the real world I would expect programmers in C# to almost never do such bare metal things.
    31. Hi! I like the following track much and want to have a similar organ sound in my track, maybe someone of you know how it was created? Organ sound from 3:08
    32. I once entertained the idea of creating a similar platform for my website but after watching a couple of Troy Hunt courses I began to have security nightmares and ditched the idea. Just saying as a heads up...
    33. yes sorre, would be C#, well i'm getting totally confused at this point, i should take out the word contained between the two "[ ]" replace that tag then append it to a list of string, i think i should process it char by char..
    34. since you did not mention a language. In Java or C# : string.split('[') should work. In javaScript there is something like substring(-1) to cut of the last ']'. Otherwise use substring(length-1) or so. Also there is regex.Match("[\[%\]]"). Hah, I need regex only once a year. Sorry something along these lines. var lastOccurance=-1 for(var i=0;i<length;i++){ if (string=="[") lastOccurance=i }
    35. Jan Satcitananda


      This framework is an ambitious attempt to create a responsible, robust, and versatile environment for resource-demanding programs, mainly for games, both 2D and 3D. Featuring extensible modular architecture with minimum external dependencies, NipSys64 is both fast and memory-efficient for a wide range of tasks. NipSys64 is being written in C++ for Win64 platform. The engine uses its own formats to store assets. https://www.indiedb.com/company/nip-labs
    36. i'm looking for a way to split a string of multiple tag into a separate string to process it one by one for example when a string og tag "[{M}sometag] [sometag] [{F}sometag]" is coming is should separate firstly from the "[" then leave just {M}sometagand process one by one.... any idea? i know that i should use a for loop to loop through the string char but i can't figure out the algortihm
    37. Yes, moving away from Invision. New, custom platform intended to provide a better foundation for what GDNet is intended to provide for a gamedev community. It's not the first time GDNet has gone through a platform change in its 20 years, and this one certainly has its own risks, but to most members it will look like a theme upgrade until they start digging in further. There will be a couple smaller utility things missing initially, and of course I'm sure there will be some bugs here and there, but the new platform in testing is working well so it's time to go live. Some members (and mods+staff) have had preview access to developer builds, so I'm sure they can share their thoughts on it if they're inclined. Hoping to have a blog post or two with more details in the coming days.
    38. Shaarigan


      Have someone explaining the basics is never a bad decision because most of the time you have simple questions that can be awnsered in a few seconds. I personally dislike video tutorials because I want my infos now and propably can skip topics in an article to what is of interest, this is my opinion on that topic. I learned coding by doing rather than reading about it in theory, copying a piece of explained code from a book or an online tutorial and then trying to change behavior and see what happens. You might be another kind of student, have a look what you think to be most confident with and then start asking questions. And if there isn't someone awnsering your questions and google dosen't help too, feel free to ask in this forum, someone (at least me, probably) will point you into the correct direction
    39. A platform change (for the worse) mostly killed CGSociety. I hope this one fairs better. Are you moving away from Invision? BTW, I didn't know about the "touchy subject of BBCode" (quoted from their site) with Invision until I searched it just now.
    40. Zakwayda

      Tube extrusion along spline path

      @Alessandro: I didn't watch the whole video (it's long, so I just skimmed through it), but be aware that the method he describes starting around the 23-minute mark makes some assumptions about the input curve. That may fit your use case, but an advantage of the parallel transport frame is that it can handle arbitrary curves (more or less) with no particular constraints. (It's possible the presenter discussed that elsewhere and I missed it.) This could fail if two sequential direction vectors are coincident or nearly coincident, whereas the parallel transport frame will handle this case transparently. (Assuming at least that you're using quaternions, as the quaternion version of the 'rotate vector to vector' function - sometimes called 'shortest arc' - is robust with respect to coincident or nearly coincident input vectors.)
    41. khawk

      Any good beginner guides to 2D game art ?

      This one: https://www.gamedev.net/articles/visual-arts/the-total-beginner’s-guide-to-better-2d-game-art-r2959/
    42. Hi, I'm learning game development and I am using Unity. I have some coding experience but I am not an artist and though I realise I won't be able to produce good looking art anytime soon, I would like to learn and at least get something that looks presentable. Any good guides, free software or tips you can provide... I would appreciate. Thanks !
    43. Last week, I wrote a post to show you how your unity scene hierarchy is reducing the performance of your game. That post arose awareness across many of you developers. And so, many of you asked great questions that I'll answer in today's entry. [The original post can be found here] Yes... I confess. The examples I often show you in my blog posts are not real-life projects. This is one of the points you have been commenting on. Ruben, this is an artificial scenario. Ruben, this doesn't happen in games. You see, I understand. It's easy to doubt the information I provide you when the only cases you see are extreme. I'd even rub some salt in the wound on the Reddit threads if the author wasn't me (see how I got owned). But here's the thing: all the information I give you is based on the pain and gains of real-life projects I worked on. I do my research before I write here too. Doing research is great. But that takes time. A lot. So I won't set up a new game for every weekly post that I publish. What I do instead is to create a small project to make a point... ...A very real point that I experienced in production games. You're never going to come across the exact dummy project in your games. But you're likely to suffer from the issues these points reveal. And that's what matters. So I took some of the feedback you provided for today's post. I'll elaborate on some of the problematic hierarchy patterns you'll commonly see in production games. We will address unity scene hierarchy bottlenecks based on the tools I gave you in the last article: The FAP Hierarchy Tool The DetachGameObject simple performance boostingg component Quick Navigation (opens in a new tab) The golden rules for an efficient scene hierarchy The Gamedev Guru's Golden Rules of a Clean Unity Scene Hierarchy Flattening a unity scene hierarchy: an artificial case-study The hierarchy structure Profiling the unoptimized scene Flattening our scene hierarchy So what? The golden rules for an efficient scene hierarchy In the previous post we established a guideline for diagnosing and optimizing unity scene hierarchies. Let's quickly recap The Gamedev Guru's golden rules for an efficient hierarchy: These apply especially to hierarchy trees that have dynamic objects. And by dynamic I mean, game objects whose transforms are altered. It can be a position, a rotation, a scale or any of the attributes you find in a RectTransform. If an entire tree is static, i.e. no periodical transform changes, then don't worry about that tree. You see, propagating these transform changes takes time. And it takes more time when you have more game objects in the same tree. But it's not the total CPU time that concerns me the most. The issue that I see is that it is pretty hard for Unity to do these transform operations in parallel when they happen to be in the same hierarchy tree. So changes in complex trees take a higher CPU time for two main reasons: The absolute CPU time required to do the math increases These calculations cannot be spread across different threads Flattening a unity scene hierarchy: an artificial case-study I'm a pragmatic and practical professional developer. So let's see all this theory in action. The hierarchy structure What I have here for you is a scene full of props, particle systems and characters. This is how the unity scene hierarchy looks like: Unity Scene Hierarchy: Original Structure That's it. No magic. 4-5 levels of depth, plus all the bones required for the characters. Nothing too crazy apart from the 300 simple characters, which probably accounts for all the missing pieces that a real game has. Have a look at World. It's a single root game object containing way too many children. This fact violates the first golden rule of an efficient unity scene hierarchy. Is that bad? I don't know. The way to find out is by measuring its relative cost. I'm using free assets I found in the asset store. That means, I can't upload this project to GitHub or I'll risk ending up in jail. Yeah, thanks for that restrictive license, Unity. Profiling the unoptimized scene And so I start the scene. Not much happening, just a slight amount of movement. I cannot say this is the funniest game I ever played. Sample project "gameplay" Well, I'm not an artist or designer. I'm excused for the looks but not for the performance. Point which brings me to using the profiler now. I captured a 300-frame profile and here's what I got: Unity Scene Hierarchy: Pre-Optimization Was that useful? Nah, don't even bother to look at the image. We don't know whether that's good or bad, because we don't have a reference point. But we can compare... We can compare against an equivalent, flattened hierarchy. Let's try that out. Flattening our scene hierarchy Analyzing the previous hierarchy, we can notice something of interest. Most of the introduced game objects are there for organization purposes in this setup. That means, some added hierarchy levels are useful for developers to structure content around them. We incorporate these objects to make development easier. Game objects such as World, City, Props don't serve any other purpose than organizing. Our characters, particles, UI and props do not really depend on those to accomplish their goals. I see a potential gain here. But on the other side, we don't want to break the only organizational tool we have. I don't want to deal with a flat hierarchy during development. That sucks. We want to keep things structured on the editor and yet we want our game to be performant on run-time. Ehmm... Is this possible? You bet it is. That we can do by making use of the script you downloaded in the first part of the blog series: DetachGameObject. This script will let you maintain the original hierarchy when you develop your game but will unparent the gameobject of your choice to squeeze all its performance juice on run-time. So I'll add right now our DetachGameObject component to the Character prefab, to all particle systems and to the dynamic canvas we have in place. I'll ask our component to unparent the game object after a delay of 15 seconds so I can take two profiles: one before detaching and another after it. Below you find the DetachGameObject asset applied to an example particle effect. DetachGameObject Performance Booster Now that I have set up all DetachGameObject components, there's only one thing remaining. That's right, press the play button! So I run the game and after 15 seconds... Scene Hierarchy: Flatter Optimized Version Boom. All my characters, particles and UI have been detached. Now the hierarchy is much flatter. So I wonder... How do both profiles compare? Let's use the neat profile analyzer to get some fresh numbers. *drums* Profile Comparison: Deeper vs. Boosted Flatter CPU Performance I'll translate for you what this chart means... This comparison says that there're significant differences between the deeper and flatter hierarchies. The flatter hierarchy improves performance significantly over the deeper one. Yes, you might not have 300 characters, but you will surely have many over 100 times more complexity in real gameplay elements, scripts, networking and such. So what? The conclusion is simple: there's a performance penalty you're paying if you don't have a flat hierarchy. Can you afford it? That's a question only you can answer. And you better answer that with data and metrics. My metrics in my previous games always reach the same conclusion: I don't want to pay that expensive bill. I let instead DetachGameObject pay it for me. That's my advice to you. Measure your game through the profiler and FAP Hierarchy Tool. Both tools will immensely help you finding scene hierarchy bottlenecks in your Unity game. Always remember... Flattening your hierarchy will improve your Unity CPU performance. What were your scores before and after flattening your hierarchy? Share below.
    44. I've just completed a 3700x build and looking to purchase a monitor and graphics card.I'm currently torn between 5700xt + free sync or saving a little and getting G-sync + 2070 Super. I'm a bit confused with free sync as a lot of the monitors only allow free sync in the 35-90hz zone? Could someone explain to me the differences, the pro's and cons and help me match a monitor and card. When it comes to Nvidia cards, I'm unsure what brand to go for, MSI Trio is over £150 cheaper than the ASUS equivalent and Gigabyte GeForce RTX 2070 Super Gaming OC 3x 8G is almost £200 cheaper that the ASUS. My preference is 27" non-curved 1440p VA or IPS panel. I'm not interested in TN.
    45. Hello. According to this article efficient gaussian blur with linear sampling it is better to reduce the number of cycles in the gaussian blur fragment shader by using bilinear interpolation. I did some experiments and it is indeed better but only if framebuffer texture format is not wide. I have big performance improvement(about 25%) if i use GL_RGB16F texture format with such approach. But when i use GL_RGB32F than performance drops to about same 25%. Could someone comment on that? I experiment on nvidia p1000 video card. BTW i use apitrace to see performance difference of specific shader program.
    46. Not possible right now. The forum isn't run on bbcode formatting, so bbcode isn't really an option. Source editing has been considered, but that introduces security risks. There's a big platform changing coming though (within days), with an editor change that allows for WYSIWYG markdown editing. It won't be perfect, but we'll have a better baseline for a better editor and allow the option for pure text editing (markdown, perhaps) for those who don't want the WYSIWYG style editor.
    47. intenscia

      Mods on mobile

      It wasn't long ago that user-generated content was a feature only the biggest PC games supported. Back then, mods were generally total conversions that gave rise to classics like Counter-Strike (Half-Life), DotA/LoL (Warcraft 3), PUGB/Fortnite (ArmA 3) and many others. Mods in more places Fast forward a few years and modding is emerging in more places than ever. Platforms like Steam Workshop and our own mod.io that make modding accessible to more players via in-game interfaces means even the smallest games can support healthy communities of creators. A shift towards cosmetic and item-like mods has helped this trend, and plays well with the persistent service-based style modern games try to adopt. Cross-platform play and first party games like Super Mario Maker, Minecraft and Dreams has opened up the door to mods appearing on consoles, with a handful of studios like Paradox Interactive and Bethesda leading the charge. All in all the future is bright for gamers who like to create, or want more content for their favorite games. Mobile the next frontier Today is another big day in the history of modding with Supercell launching Make, their content creation platform. What's interesting about this, is for the longest time UGC hasn't really happened on mobile because creating content on the device is severely limited by the form factor and tools available, and mobile platforms are still quite closed when it comes to custom content. We've never really considered the first point a barrier to entry, because passionate modders will always find a way to personalize and mod their favorite games. Clearly Supercell doesn't consider this a barrier to entry either, because in order to make content for Brawl Stars they recommend you use traditional PC 3D modelling tools. However, whether it is deliberate or by design, or the fact that mobile is still quite a closed platform, it appears that in order for your content to make it into the game, you need to win a submission process and be picked by the Supercell team + community. Despite this limitation, this is an incredible first step for UGC on mobile from such an influential company in the space, and we look forward to seeing others follow in their footsteps. What's next for modding Despite the fact that modding has been around for 20+ years now, the next few years are going to get really interesting. Content is such a powerful and user-friendly way of retaining players and building goodwill. With competition for attention fiercer than ever, games that are serious about engaging players long-term, opening up to support UGC feels like the perfect way to do it. Your players will thank you with their loyalty, and that will in-time open up new business models and ways to succeed that haven't been considered yet. Talk to us about modding in your game If you like what Supercell are doing and want to explore new ways to succeed with UGC in your game on mobile or elsewhere, we'd love to chat to you. We are big believers in the future of UGC, and have built a cross-platform mod API @ mod.io that includes all the features Supercell have, and are ready to power your users creativity in bold new ways.
    48. How can I turn off the partial WYSIWYG functionality in the new/edit post input box? It's the worst. Sometimes you can't remove extra lines. Editing the quotes is a nightmare. I just want to get down to text level and make changes to the BBCode. I'm sure there is a way to do this but I can't find it.
    49. fleabay

      Tube extrusion along spline path

      Here's a good video on the subject. Not just for Unity. A coder's guide to spline-based procedural geometry https://www.youtube.com/watch?v=o9RK6O2kOKo Also, don't be afraid of Bezier curves. (if you think they are complex as I once did) They are simple to understand and implement and there are optimized predefined functions available.
    50. TeaTreeTim

      Tube extrusion along spline path

      You're overthinking it. A series of cylinders that connect need to watch for vertice position over trying to utilise some fancy term. Two cylinders can connect along a plane that has a normal average between the two cylinder vectors. Aligning vertices could simply be a matter of keeping track of the last set along the edge. Otherwise, if you want a world space reference, do a cross between the two cylinder direction vectors.
    51. Zakwayda

      Tube extrusion along spline path

      I didn't look at the code you linked to too closely, so I'm not sure what method it uses. But, I'd recommend searching for the term 'parallel transport frame'. I don't know how well GDNet search works these days, but I'm pretty sure there are old threads here on the topic. Meanwhile, here's a brief overview: - Create a transform positioned at the beginning of the (generalized) cylinder, with one axis (typically z) pointing along the cylinder direction vector at that point. The 'spin' angle (orientation of the x and y axes with respect to the z axis) doesn't matter (generally speaking), and can be arbitrary. There are a couple different ways to robustly create this initial transform (ask if you need more info on that part). - Repeat the following steps to the end of the cylinder: - Advance along the cylinder by some amount and compute a new position. Compute the cylinder direction at that position (using whatever method is appropriate for the type of curve you're working with). Use a 'rotate vector to vector' algorithm to compute a rotation that rotates the current frame so that its forward vector aligns with the new direction vector. Apply this rotation to the frame, and move the frame to the new position. At this point you may want to normalize everything (where 'normalize' refers to whatever is appropriate for the representations you're using) to prevent drift. You can do this with (perhaps among other things) matrices or quaternions. Some steps are a little easier with one, some easier with the other. There's a nice 'rotate vector to vector' algorithm for quaternions that may make them a good choice here. That's only a rough overview, and it's been a while since I implemented this, so no guarantees I got everything right. Again, if you search for the term, you may be able to find more detailed discussion in the forum archives.
  • 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!