September 2020 donation progress: $0.00/$400 (0%). Click to learn more...
close
Hello! Thank you for using yiff.party!

We hope you enjoy using it. yiff.party operates on a non-profit basis, and as such, all the server expenses are paid by our users. We don't want to run ads or infect you with crypto miners. We depend on users like you to keep the site running, and to preserve years and terabytes of amazing content—some of which is no longer available from its original creators!

Because of the nature of the site, many users are reluctant to donate. That's OK! yiff.party was created so everyone can enjoy the content we host without any restrictions or paywalls. But if you value the service we provide, and are able to, we—and our users—would be tremendously grateful if you considered making a donation.

Donation progress for September 2020

So far, approximately $0.00 has been raised out of our target of$400.00. We're about 0% of the way there! Please note: this tracker is updated manually—don't worry if your donation doesn't show up immediately!

yiff.party's server costs are due on the last day of each month. So, we need to meet this goal before 30 September!

How to donate?

At this time, yiff.party can only accept donations in numerous cryptocurrencies. Please select a currency below to display the relevant donation address.

Why can't I donate through other means (eg. PayPal)?

Due to the nature of sites like yiff.party, it is very difficult to find payment processors who will accept clients like us. If we were to accept donations via PayPal, it wouldn't take more than a day for someone to submit an abuse report and get our account frozen. Until a viable way of accepting monetary donations becomes available, cryptocurrency will remain the only option.

There are many resources available on how to purchase crypto. For Bitcoin, check out bitcoin.org's page on buying Bitcoin for a list of methods. For beginner Bitcoin users, yiff.party recommends using an escrow service such as LocalBitcoins.

Catlike Coding (catlikecoding)

Checking creator status...

Last checked

close
Enjoying catlikecoding's content?

Creators like catlikecoding work hard to produce the content you are viewing on yiff.party for free. If you like what you see, consider supporting catlikecoding on Patreon to encourage them to create more great content!

4 / 5

Rendering, part 1: Matricesmore_vert
2016-02-26T13:45:34+00:00
Post file flag
Rendering, part 1: Matrices 2016-02-26T13:45:34+00:00close
http://catlikecoding.com/unity/tutorials/rendering/part-1/

I announced a tutorial series about shaders, but it's actually more complex than that. Shaders are a big part of Unity's rendering pipeline, but there's more. So I'm doing a series about the whole rendering process.

Here is the first installment. It's about transformations. And those transformations are done with matrices. Now it turns out that many people shy away from matrices, not understanding how they work. This won't do, because you'll need them when writing shaders. This tutorial will introduce matrices as a convenient tool for manipulating space.

Embed data

Provider
Catlikecoding

Provider URL
Catlikecoding

Subject
Rendering 1, Matrices, a Unity C# Tutorial

Description
Matrices Create a cube grid. Support scaling, positioning, and rotating. Work with transformation matrices. Create simple camera projections. You already know what meshes are and how they can be positioned in a scene. But how does this positioning actually work? How does a shader know where to draw?

HTMLplay_arrow

http://catlikecoding.com/unity/tutorials/rendering/part-1/tutorial-image.png

Something I wanted to do for quite a while, is to produce more than one tutorial per month. This is going to happen!

I won't be covering surface shaders, which do lots of code generation for you. This is about learning how shaders work, which requires getting your hands dirty.

This series will run in parallel with Hex Map. In fact, Hex Map will refer to the Shaders series when we get to terrain materials.

flag
User #2340579 - 10 Feb 16 15:37
Looking forward to it! I've been doing some surface shaders lately but that's it, I really wanna learn how to make proper ones.
catlikecoding - 11 Feb 16 11:14
Surface shaders are convenient, but I consider them quite a messy hack by now. They stem from a time that Unity's shader capabilities weren't as advanced as they are today. As a result, they're only good for simple tweaks where performance isn't critical. That's why Unity's own Standard shaders aren't surface shaders either.
User #289908 - 10 Feb 16 14:00
User #289908 - 10 Feb 16 14:01
oh, you are "going to write"... Super! Will wait patiently.
catlikecoding - 10 Feb 16 15:25
Yes, it's something for later this month.
User #2511183 - 10 Feb 16 17:14
This is great! I've been trying to find good tutorials on shaders for months and everything is either too trivial to be useful or way over my head.
catlikecoding - 11 Feb 16 11:08
I'll try to hit the sweet spot.
User #111256 - 10 Feb 16 14:25
I'm excited about this: I do some primitive shader things in 'Counterpart' and I'm hindered by not really knowing what I'm doing :)
catlikecoding - 10 Feb 16 15:25
Time to fix that!
Hex Map 2more_vert
2016-02-07T18:57:18+00:00
Post file flag
Hex Map 2 2016-02-07T18:57:18+00:00close
http://catlikecoding.com/unity/tutorials/hex-map-2/

Here is the second tutorial of my Hex Map series. Cells will be connected to their neighbors, and colors will blend. And once that's done, we do it again, but better!

I released this tutorial early in the month. This leaves room for something else...

Embed data

Provider
Catlikecoding

Provider URL
Catlikecoding

Subject
Hex Map 1, a Unity C# Tutorial

Description
Blending Cell Colors Connect neighbors. Interpolate colors across triangles. Create blend regions. Simplify geometry. Before we can blend between cells colors, we need to know which cells are adjacent to each other. Each cells has six neighbors, which we can identify with a compass direction. The directions are northeast, east, southeast, southwest, west, and northwest.

HTMLplay_arrow

http://catlikecoding.com/unity/tutorials/hex-map-2/tutorial-image.png
User #6127789 - 12 May 17 17:51
Excellent series for the hex grid! Also, very good coding style, really glad to have both the code and the results pleasing my eyes. Keep it up with the good work!
User #2311443 - 4 Mar 16 03:45
Thanks Jasper, I love these tutorials! I was just in Amsterdam last week (1st time!) – keep it up ;)
catlikecoding - 4 Mar 16 10:38
I hope you enjoyed your stay!
Hex Map 1more_vert
2016-01-30T20:40:33+00:00
Post file flag
Hex Map 1 2016-01-30T20:40:33+00:00close
http://catlikecoding.com/unity/tutorials/hex-map-1/

The first part of the Hex Map series is now available!

Up until now I used Unity 5.0.1 to publish my tutorials. I have now moved on to Unity 5.3.1. I actually used the 5.4 beta to get some nice retina screenshots of the scene and game views.

Embed data

Provider
Catlikecoding

Provider URL
Catlikecoding

Subject
Hex Map 1, a Unity C# Tutorial

Description
Creating an Hexagonal Grid Turn squares into hexagons. Triangulate hexagons. Work with cube coordinates. Interact with grid cells. Make an in-game editor. This tutorial is the first part of a series about hexagon maps. Many games use hex grids, especially strategy games, including Age of Wonders 3, Civilization 5, and Endless Legend.

HTMLplay_arrow

http://catlikecoding.com/unity/tutorials/hex-map-1/tutorial-image.png
User #46358 - 1 Feb 16 18:12
Can't wait to play with this!
Up Next: Hexagons!more_vert
2016-01-20T19:29:22+00:00
Post file flag
Up Next: Hexagons! 2016-01-20T19:29:22+00:00close

I'm starting a new series of tutorials. The topic is hexagon maps. A lot of strategy games use them.

The image shows what the first part will cover. I got that figured out, now I have to make some pretty code and write the thing.

I got inspired to cover this subject while playing Endless Legend. I am quite fond of its stylish map design. The tutorials will aim for a similar look.

User #265510 - 24 Jan 16 09:02
Awesome! I've been wanting to do a strategy game on a hex map, but I can't use any of the asset store options. So this is perfect!
catlikecoding - 24 Jan 16 11:34
What is lacking from the asset store options?
User #265510 - 24 Jan 16 22:18
It's not about them lacking something, the club has a rule against asset not made by members.
Tutorial Main Page Update 2016-01-14T19:38:47+00:00

I finally got around to updating the layout of the tutorial index page. It now matches the style of the newer tutorials.

I'm also thinking about creating a kind-of still tree overview for the tutorials. But I have to meditate on that some more.

flag
Mesh Deformation Finished 2016-01-13T12:14:48+00:00

All the text and images that I still wanted to add are now included. The tutorial is officially completed. Have a look!

flag
Mesh Deformationmore_vert
2015-12-30T15:53:23+00:00
Post file flag
Mesh Deformation 2015-12-30T15:53:23+00:00close
http://catlikecoding.com/unity/tutorials/mesh-deformation/

Here is a simple introduction to mesh deformation. We turn a cube sphere into a stress ball and then poke at it with ray casts.

I'm releasing this tutorial while it is still a work in progress. The code, images, and animations are already in there. It is the text that is still mostly missing. So you can already get a good impression of the what, and how, but not yet the why.

You can also see that I have started to use subsections, in an effort to add more structure.

I will post an update notification when I have finished the writing.

Embed data

Provider
Catlikecoding

Provider URL
Catlikecoding

Subject
Mesh Deformation, a Unity C# Tutorial

Description
Making a Stress Ball This tutorial is an introduction to mesh deformation. We'll turn a mesh into bouncy mass and poke at it. This tutorial follows Cube Sphere. It is a continuation of the same kind of mesh manipulation and we'll use the cube sphere as our test model.

HTMLplay_arrow

http://catlikecoding.com/unity/tutorials/mesh-deformation/tutorial-image.jpg
User #6415719 - 5 Jun 17 08:55
Can not you wrap it all in one texture? It comes out only in checkered pattern. Thanks for the good posting.
catlikecoding - 5 Jun 17 10:05
Texturing a sphere is nontrivial. In this case, it's most straightforward to use a cubemap and sample it with the unperturbed normals. Those normals would have to be stored in a separate mesh channel as 3D texture coordinates. A lat-lon UV unwrap doesn't work with this mesh's topology.
User #6415719 - 20 Jun 17 05:05
The inverse square law or mesh deformation method used here is very interesting. Do you have any related papers using these methods?
catlikecoding - 20 Jun 17 10:48
I have no specific papers for you. The inverse-square law pops up everywhere you have an expanding front or surface.
User #2311443 - 1 Jan 16 06:50
Looking forward to it! Keep you the great work
More Delays 2015-11-29T11:42:21+00:00

During November some stuff came up which is a pretty big deal for me, personally. There's also something that will have future impact on my tutorials, no matter which way it'll go. It'll take some time to sort this out.

Rather than rush my current tutorial to meet the November deadline, I'll let it slip for the sake of quality. Thank you for your patience!

flag
User #169032 - 29 Nov 15 12:06
I appreciate all you've done for the C# unity community so far. I'm hopeful that your new thing is a book, which is easily a day one purchase for me. Look after yourself!
catlikecoding - 1 Dec 15 10:37
You'd really like a physical book? Or are you thinking about an e-book?
October Lull 2015-11-02T11:35:41+00:00

Last month had no tutorial; I did too many other things. Don't worry, I'll publish a new one this month.

flag
User #2467851 - 17 Nov 15 05:39
Agreed!
User #174781 - 14 Nov 15 11:25
Hey dude, no worries :). Looking forward to new tutorials when you find the time.
Object Poolsmore_vert
2015-09-25T16:45:06+00:00
Post file flag
Object Pools 2015-09-25T16:45:06+00:00close
http://catlikecoding.com/unity/tutorials/object-pools/

Object Pools. What are they, how do they work, and are they useful? I tried to answer these questions, using a fountain of stuff and a simple object pooling approach that is easy to use.

Embed data

Provider
Catlikecoding

Provider URL
Catlikecoding

Subject
Object Pools, a Unity C# Tutorial

Description
Keeping Things Alive Create a fountain of stuff with physics. Make objects poolable. Add functionality to prefabs. Generate pools on demand. Survive recompiles and scene transitions. This tutorial is about objects pools. What are they, how do they work, and are they useful? The tutorial follows Frames per Second.

HTMLplay_arrow

http://catlikecoding.com/unity/tutorials/object-pools/tutorial-image.jpg
User #2599430 - 4 Sep 16 13:27
Hi Jasper, for switching scene code in Object pools. If attach script directly in the button on-click It does't show the function . If I attach to gameObject and then its working fine. I am just curious how its working for you
catlikecoding - 6 Sep 16 09:19
The game object that you assign to the event must have the SceneSwitcher component on it. Then you can select the SwitchScene method. It doesn't matter whether you put the component on the button object, or use a separate object. But you have to assign the correct object to the event.
catlikecoding - 6 Sep 16 09:19
The game object that you assign to the event must have the SceneSwitcher component on it. Then you can select the SwitchScene method. It doesn't matter whether you put the component on the button object, or use a separate object. But you have to assign the correct object to the event.
User #2998159 - 20 Mar 16 01:41
Hi Jasper! Would you mind explaining why we use a struct in Part 2: Adding Variation and what they're useful for?
catlikecoding - 21 Mar 16 11:56
You mean FloatRange? It's both for convenience and grouping. Instead of adding two logically linked but separate float fields - timeBetweenSpawnsMin and timeBetweenSpawnsMax - you add one range field. It also contains the RandomInRange functionality. It's just like you use Vector3 everywhere, instead of storing separate X, Y, and Z floats, and then don't know where to put the vector manipulation methods.
catlikecoding - 21 Mar 16 11:56
You mean FloatRange? It's both for convenience and grouping. Instead of adding two logically linked but separate float fields - timeBetweenSpawnsMin and timeBetweenSpawnsMax - you add one range field. It also contains the RandomInRange functionality. It's just like you use Vector3 everywhere, instead of storing separate X, Y, and Z floats, and then don't know where to put the vector manipulation methods.
Frames Per Secondmore_vert
2015-08-31T10:19:17+00:00
Post file flag
Frames Per Second 2015-08-31T10:19:17+00:00close
http://catlikecoding.com/unity/tutorials/frames-per-second/

August was filled with lots of activities for me, but not much coding or writing. But I did manage to produce a tutorial at the end!

This tutorial takes a look at measuring the frame rate of your scene. Not a glamorous topic, but an important one. You have the game view statistics and the profiler, but neither gives a good indication of the actual frame rate that you are getting when running your app. So we end up creating our own counter and use Unity's UI to show the FPS in the corner of the game window. It might seem trivial, but there are a few interesting observations to make along the way.

User #2998159 - 17 Mar 16 10:30
Hey Jasper! My lowest FPS value in the display jitters around, instead of only updating when it registers a new lowest number. Is this intentional? It even happens when I replaced my scripts with yours.
catlikecoding - 17 Mar 16 10:45
You always have a jittery frame rate, unless you exceed the maximum. Averaging over multiple frames just smoothes it. The averaged values still get updated every frame, but because they won't jump so erratically you're actually able to read them. As you keep spawning more nucleons, your average and maximum frame rate will begin to fluctuate as well.
User #2998159 - 17 Mar 16 10:57
I understand how the smoothing makes it readable, but should the highest value ever drop? Shouldn't it remain at basically the number it jumps to when you hit play as that will be the least intensive moment in runtime? I think I probably don't understand how it's working, which is causing the confusion. Here's a nasty GIF of my counter in action: http://giphy.com/gifs/l2QZRnlQYVYAEzVMk
catlikecoding - 17 Mar 16 11:36
That is exactly how it should work. The buffer is a sliding window. The display is an overview of the last 60 frames, or whatever other range you choose. You get the max/average/min frame rate for that timespan, right now. History before that no longer matters. As you keep spawning objects, all three values keep decreasing. You just don't see the max and average drop until they fall below 99. The minimum drops below that almost immediately, because your multi-tasking computer will produce micro-stutters.
User #2998159 - 17 Mar 16 20:25
Thanks for clarifying, Jasper! I was expecting the lowest and highest would be stored outside of that iterator so it didn't get reset every 60 frames. Because I'm still very new to programming I don't always completely grasp what the code is doing just yet!
User #219273 - 12 Mar 16 18:18
Hi Jasper, I have a question. When we are building the array containing the two spheres, why are we declaring its type to be Nucleon[], as opposed to for example GameObject[] or anything else. I tried making a new "test" class and casting the array as it but it wouldn't allow me to populate the prefabs in it unless the had the "test" class as a component. I guess my question is how come casting as a component class allows you to populate it with the parent object along with all the other attached classes (rigidbody, renderer, etc). Thanks
catlikecoding - 12 Mar 16 19:53
We're using Nucleon because that what we're working with. This mandates that our objects have a nucleon component attached, which is what we want.
catlikecoding - 4 Sep 15 08:45
Forgot to put in the PDF link. It's there now!
A Bunch of Objectsmore_vert
2015-07-27T20:46:47+00:00
Post file flag
A Bunch of Objects 2015-07-27T20:46:47+00:00close

I want to write something about object pooling. That requires a bunch of objects. Does this look interesting enough?

User #238968 - 28 Jul 15 00:31
Definitely sounds useful :D
User #414002 - 1 Aug 15 20:51
Looks very interesting, would love a tutorial.
User #586703 - 27 Jul 15 20:57
yes. Also : In one sentence. Why are RTS Titles considered really complicated ?
catlikecoding - 28 Jul 15 20:32
Those who tried to make an RTS either failed, flopped, or took a very long time.
User #289908 - 27 Jul 15 22:08
Yes, I love it. Looks like fun and useful technique to learn.
User #265510 - 29 Jul 15 05:51
The power of Imagination!
User #265510 - 27 Jul 15 21:50
Yeah, it looks like a Hungry Hippo Artillery game.
catlikecoding - 28 Jul 15 20:31
You're seeing hippos, man!
Squares and Circlesmore_vert
2015-07-15T14:44:23+00:00
Post file flag
Squares and Circles 2015-07-15T14:44:23+00:00close

In between squares and circles lies... math! We'll have some fun with formulas in the forthcoming tutorial.

Math! 2015-07-07T18:51:51+00:00

I am now using MathJax to visualize mathematical formulas in the tutorials. I've already activated it for Procedural Grid and Rounded Cube. While it's overkill for them, it is a nice test case. I think it will be a boon for more complex expressions.

flag
User #237665 - 8 Jul 15 09:27
I think that it is a good idea.
Cube Spheremore_vert
2015-07-20T11:02:18+00:00
Post file flag
Cube Sphere 2015-07-20T11:02:18+00:00close

You could already create spheres with the Rounded Cube component, but it makes sense to create a dedicated component for spheres. Once you have that, why not take a good look at how it is actually created? Maybe there is room for improvement.

http://catlikecoding.com/unity/tutorials/cube-sphere/

This tutorial is about mathematical reasoning. It is very useful, but unfortunately many people shy away from it. So I wanted to provide an example that dives in deep, while remaining approachable. I hope I pulled that off.

Embed data

Provider
Catlikecoding

Provider URL
Catlikecoding

Subject
None

Description
None

HTMLplay_arrow

http://catlikecoding.com/unity/tutorials/cube-sphere/tutorial-image.jpg
User #237665 - 31 Aug 15 10:50
I am studying math. This is the portion related to personal study. I think that it is not the contents of the consultation. Translation I believe going to tackle in as much soon as possible.Always we are looking forward to the tutorial. Thank you.
catlikecoding - 31 Aug 15 10:58
Sure!
User #237665 - 21 Jul 15 09:27
Thanks. Translating by specify the original link. After completion, it will contact the link after production.
User #237665 - 31 Aug 15 10:07
I'm sorry. Currently, I am while you are working on a mathematical problem for me. I was thinking that it is resolved in a short period of time. However, it does not solve its problems. Therefore, the translation has been delayed.I think it is not sorry while previously have gotten permission in kindness.
catlikecoding - 31 Aug 15 10:38
What problem are you talking about?
User #237665 - 21 Jul 15 01:23
I think this tutorial is very good. I have run a Japanese site related to mathematics and unity from the previous. Is it may be introduced in this tutorial was clearly the author catlikecoding translated to my Japanese site? Site for placing the article is here. http://unitylabo.s601.xrea.com/xoops/modules/xpwiki/
catlikecoding - 21 Jul 15 09:08
Yes, you can put a translation on your site. Just link back to the original.
Rounded Cubemore_vert
2015-06-24T10:25:57+00:00
Post file flag
Rounded Cube 2015-06-24T10:25:57+00:00close

Here's a new tutorial! It follows up on Procedural Grid, going for a rounded cube. It includes sub-meshes, shaders, and colliders.

I made separate syntax highlighting for the shader code, so it looks a lot better. This is preparation for more custom shader material that is yet to come.

There are a few rough edges I'd still like to polish and some asides I'd like to add, but the tutorial should be good enough for release. Let me know about any mistakes, omissions, questions, and such!

I wanted to release this one earlier, but stuff happened. Sorry for that!

http://catlikecoding.com/unity/tutorials/rounded-cube/

Embed data

Provider
Catlikecoding

Provider URL
Catlikecoding

Subject
None

Description
None

HTMLplay_arrow

http://catlikecoding.com/unity/tutorials/rounded-cube/tutorial-image.jpg
User #3051448 - 22 Mar 16 11:26
Wow! It is really an excellent tutorial! It is working good for me. I have doubts in how to calculate the tangents for this mesh, like it is done for procedural grid
catlikecoding - 22 Mar 16 11:47
As the whole cube is continuous, there isn't really a valid way to put tangents in there. You could generate them in the shader, based on the normal and which side you're on.
User #6958682 - 18 Jul 17 20:06
I posted a link to this tutorial on stack overflow, the asker loved it. https://stackoverflow.com/questions/25078224/unity3d-round-the-edges-of-a-box-cube?noredirect=1#comment75255564_25078224
catlikecoding - 19 Jul 17 17:34
Always good when the love is spreading!
Procedural Gridmore_vert
2015-05-31T13:45:26+00:00
Post file flag
Procedural Grid 2015-05-31T13:45:26+00:00close
http://catlikecoding.com/unity/tutorials/procedural-grid/

As the first of more focused tutorials, this one is all about the fundamentals of procedural mesh generation. As such it is not covering new ground, but gives the subject the dedicated tutorial that it deserves.

We'll get to the more interesting stuff that I've already shown previews of, spread out over multiple tutorials. No more waiting an entire month for new content!

Also new in this tutorial is the inclusion of videos. I decided to scrap my goal and just start using them, because I want to. I usegfycat to get the most efficient and seamless delivery. It's nothing dominating, just a tool to show something in motion.
Change of Approach 2015-05-30T13:19:09+00:00

Now that I've been on Patreon for over a year, I decided to shake things up a bit. I am going to publish more tutorials. Big tutorials are nice, but a month is a pretty long time to wait. They're also not that handy for cross-referencing, as they cover too much subjects at once. Instead, I'm going for more atomic tutorials. Basically, cutting the big stuff into smaller parts. For example, what I've been working on lately will be spread out over four to five individual tutorials. One about mesh basics, one about rounded cubes, one about mesh deformation. Then on to a game like geometry wars, I don't know yet in how many steps. I might publish something completely different in between as well, to keep things varied. I'm not yet sure how many tutorials I'll end up producing per month, but it should be more than one. I have no set goal, it will fluctuate as time allows.

flag
User #289908 - 30 May 15 13:27
I like your new approach! You could compile these tutorials into a book or video series at a later time. Try adding one or two short (20-sec) video clips at juicy parts of the tutorial.
catlikecoding - 30 May 15 15:19
I wasn't going to mention it just yet, but the upcoming tutorial has some video material in it. :)
User #289908 - 30 May 15 15:36
:) TY I just noticed that you have a milestone goal to add short videos. So, you are ahead on this one! I would suggest that this future (secret) video is an appropriate opportunity to kick us patrons ...in the rear for more funding. Doing a great job! There is so much power embedded in scripting Unity. Most think static objects with scripting used to just link events.
catlikecoding - 30 May 15 22:46
Yea I have it as a goal, but I just want to go ahead and do it. I'll probably get rid of the goals.
The Next One 2015-05-19T10:01:52+00:00

I'm going to work on my next tutorial soon. Any thoughts? Do you want a follow-up for Swirly Pipe, or something new?

flag
User #265510 - 19 May 15 22:27
How about a deep dive into ScriptableObject?
catlikecoding - 21 May 15 19:39
ScriptableObject by itself is not that interesting, really. Gotta think of something where custom dataset assets are useful.
User #354802 - 19 May 15 16:20
Mesh deformations +1. With lots bounciness or rubber like properties. Maybe 2d oriented first then 3d.
catlikecoding - 21 May 15 19:37
Ok I'll do meshes, and bouncy too!
User #382821 - 19 May 15 10:59
Maybe something dx11 related. Compute shaders and the like.
catlikecoding - 21 May 15 19:32
I don't use Windows, so don't hold your breath for dx11 stuff!
User #727827 - 21 May 15 17:27
Strange, my post vanished! Anyway, I would definitely sign up for a shader tutorial! What I would love to see is a shader that supports diffuse,normal and specular but allows you to programatically fade any channel from one texture to another...ie a wall could have a floral pattern one moment then fade into a diamond pattern, complete with bump and specular to match. Apparently it takes 3 minutes in ShaderForge but Shader forge makes no sense to me so a coding tutorial would rock!
catlikecoding - 21 May 15 19:28
I'll definitely touch shaders again. But the focus will always be on the C# side.
User #485124 - 19 May 15 23:17
User #810309 - 1 Jun 15 18:22
A bit late, but +1 for shaders. Personally I'd love to see use of shaders in 2D effects, like outline/glow filters.
User #377983 - 19 May 15 10:47
No matter how, as long as a tutorial relates to procedurally generated meshes is cool enough in my opinion. Apart of this general idea and if you don't mind to let you know, these following cases are troubling me lately: - Smooth translation from perspective to ortho camera view and vise versa. (I have been already applying a solution I found online, although I don't fully understand the background methodology to fully adjust it in my needs so far.) - Fade in and out near and far clipping camera's planes without using the fog rendering effect, programmatically changing the transparency of the objects' material or using special shaders on those materials (like reducing the mesh vertices alpha relative to the camera distance). Or if I had to go with the last way, which is quite elegant, how to add a pass that does this job in a random shader (e.g. an originally surface shader). - Combining different cameras for simultaneous rendering, although I haven't experimented with this task enough to have serious and specific troubles so far. Well, I'm not even sure if my concerns make much sense or are defined precisely enough, but I thought to share them anyway...:)
catlikecoding - 21 May 15 19:34
Someone's been playing with cameras? :) I'm going to do something with meshes again, so I think we're cool.
User #351463 - 19 May 15 20:05
I would vote for something new but still gameish, the latest tutorial was pretty nice, not an abstract series again please :)
catlikecoding - 21 May 15 19:32
Fear not, I plan to keep it gamey for at least a while. :)
A Whole Year! 2015-05-15T11:35:57+00:00

It's been a year now since I began this Patreon campaign. Thanks to your support, I was able to produce twelve tutorials so far. I am really grateful for this! And I hope to write many more.

flag
Swirly Pipemore_vert
2015-04-30T18:44:58+00:00
Post file flag
Swirly Pipe 2015-04-30T18:44:58+00:00close

It's a new game tutorial! Actually, it's a tutorial about creating a game prototype. It goes from concept to building for multiple distribution platforms. The tutorial isn't completely fleshed out yet. Past some point it's just an outline. I need a little break to keep the quality up. I hope to finish on Friday, otherwise during the weekend.

Embed data

Provider
catlikecoding.com

Provider URL
catlikecoding.com

Subject
Swirly Pipe, a Unity C# Tutorial

Description
Prototyping an Endless Racer Come up with a simple concept. Create a torus. Stitch endless random pipes together. Move the world around the player. Place obstacles inside pipes. Add a game menu and HUD. Deal with multiple target platforms. In this tutorial we will create a simple endless racing game prototype.

HTMLplay_arrow

User #289908 - 30 Apr 15 21:10
Thank you! Amazing what a few lines of C# will generate. And, the WebGL worked with Chrome (but not Firefox). Take you time finishing. This is a long beautiful tutorial. Richard
catlikecoding - 1 May 15 09:06
Thank you for your kind words! WebGL works for me in Firefox, on OS X. Any idea why it doesn't for you?
User #289908 - 5 May 15 17:06
I have noticed and stumbled over your suggestion at the beginning to go back and do/review previous tutorials to better understand the current one. On the surface, this is a helpful suggestion but... Several times I have gotten sidetracked doing/reviewing previous and then not returned to current! Or when I did, forgot why I did the previous! Maybe be specific about which steps in previous tutorials to review. And/or move this suggestion to specific places in the current tutorial. ...Hope this is constructive.
catlikecoding - 6 May 15 12:41
Thank you! I have adjusted my wording to make clear it's just about covering the basics. Getting sidetracked is a great way to learn, so I'm not too worried about that.
catlikecoding - 5 May 15 15:47
All right, the writing is done! Maybe I'll still add a diagram somewhere, and some asides.
Inside the Pipesmore_vert
2015-04-26T16:03:27+00:00
Post file flag
Inside the Pipes 2015-04-26T16:03:27+00:00close

Here's a look inside those pipes I showed before. We're going to race through them at high speed.

Torus doesn't look so goodmore_vert
2015-04-21T11:14:42+00:00
Post file flag
Torus doesn't look so good 2015-04-21T11:14:42+00:00close

This is what happens when you hold a donut too tight. That's right, it's a donut-squeezing game! Or maybe something else...

User #382821 - 21 Apr 15 13:27
Endless runner/racing game? ;)
catlikecoding - 21 Apr 15 14:01
You got that right!
Torus Game?more_vert
2015-04-20T10:35:55+00:00
Post file flag
Torus Game? 2015-04-20T10:35:55+00:00close

This has something to do with the upcoming tutorial game. But what? :)

User #39854 - 20 Apr 15 14:00
sooo excited!! thanks~!!
User #377983 - 21 Apr 15 08:23
"How to deceive Homer Simpson with familiar, torus-shaped, still un-edible objects"?
catlikecoding - 21 Apr 15 08:24
Sadly, I coulnd't make this game due to IP issues.
Time for a Game? 2015-04-01T10:39:55+00:00

Now that the Marching Squares series is done, I think it's time for another tutorial game. This is no joke!

flag
User #639839 - 5 Apr 15 03:05
:)
catlikecoding - 5 Apr 15 09:06
Yay!
Marching Squares 5more_vert
2015-03-30T18:36:03+00:00
Post file flag
Marching Squares 5 2015-03-30T18:36:03+00:00close

March brings us the fifth and final part of the Marching Squares series. It's a colorful ending! This time I'm doing the Q&A blocks a little different. Instead of adding a bunch immediately, I'll wait a bit and let you point out where I should place them first. Let's see how that goes!

Embed data

Provider
catlikecoding.com

Provider URL
catlikecoding.com

Subject
Marching Squares 5, a Unity C# Tutorial

Description
Being Colorful Support more than two colors. Keep normals consistent. Distribute work among multiple structs and objects. Find a new way to triangulate. Deal with shared feature points. Make nice circles. In this tutorial we'll add support for multiple colors to Marching Squares. This tutorial comes after Marching Squares 4.

HTMLplay_arrow

Up Next: Colored Marching Squaresmore_vert
2015-03-05T17:45:12+00:00
Post file flag
Up Next: Colored Marching Squares 2015-03-05T17:45:12+00:00close

Here's a preview of what the next tutorial will be about. Colors! It's done with multiple meshes that each have their own material. As you can have up to four different voxels per cell now, the amount of cell cases explodes, which requires a generalized approach. I have it all working, but the code needs to be prettied up a lot before it's digestible.

Unity 5 2015-03-03T18:57:17+00:00

Now that Unity 5 is officially released, I'm contemplating when I should switch to writing tutorials for that version. I'm thinking about wrapping up the Marching Squares series with 4.5 and then jump to 5.0.

flag
User #328062 - 3 Mar 15 21:28
That sounds like a good plan to me. Moving over as soon as possible seems prudent due to the large uptake expected for 5 due to the increased features that are available to Free users now, as Mike noted.
catlikecoding - 4 Mar 15 20:44
The difference is not that large, there's just more stuff to work with for everyone, like the profiler, nav. meshes, screen effects, and such. The existing tutorials are still perfectly viable, though a few code upgrades need to be made for the older ones.
User #367301 - 3 Mar 15 19:02
I'd move to Unity 5 asap. Unlike with previous major releases, I think there is going to be an immediate mass migration to Unity5. Due to the new pricing structure, there's not much reason not to. Thanks for all the kick ass tutorials.
User #140221 - 3 Mar 15 19:57
To me I think it makes most sense to finish the current series on Marching Squares with 4.5 before moving forward to 5.0. How much different are they from one to another? I haven't looked into it much yet. Though Mike makes a very good point about mass migration. There's a number of things that were only in the Pro version that are now in the Free one so I can see people wanting to switch faster than they have for previous releases.
Marching Squares 4more_vert
2015-02-28T14:46:19+00:00
Post file flag
Marching Squares 4 2015-02-28T14:46:19+00:00close

Thanks to your support, my fourth Marching Squares tutorial is here! We start with refactoring some code, which is something that you'll probably do many times as a programmer. So it makes sense to include it in a tutorial, right? After that's out of the way, we proceed to add some depth to our surface, by adding walls. This involves adding a new mesh, doing some different caching, connecting cell edges, and adding normals. Besides that, this is also the first new tutorial that uses the new layout. It is printer-friendly, and also includes a PDF download link at the bottom of the page. http://catlikecoding.com/unity/tutorials/marching-squares-4/

Embed data

Provider
catlikecoding.com

Provider URL
catlikecoding.com

Subject
Marching Squares 4, a Unity C# Tutorial

Description
In this tutorial we'll add some depth to Marching Squares, and refactor some code. This tutorial comes after Marching Squares 3. Like the previous ones, it has been made with Unity 4.5.2 and might not work for older versions. While Marching Squares is strictly 2D, we have no obligation to keep its visualization perfectly flat.

HTMLplay_arrow

User #485124 - 2 Mar 15 21:59
Ooh! I've been trying to shoehorn physics in by blindly mapping the vertices of Step 2 onto PolygonCollider2D's. It works fine at low resolutions, but maxes out at around 32x32 tiles. But hey, deciding which tiles need colliders at compile time (by mapping your walls to EdgeCollider2D's) will probably be much more efficient.
catlikecoding - 3 Mar 15 14:41
It may well be. Though if you're limiting yourself to static geometry you could run other mesh simplification algorithms too.
Upcoming: Raising Wallsmore_vert
2015-02-25T16:05:21+00:00
Post file flag
Upcoming: Raising Walls 2015-02-25T16:05:21+00:00close

It's getting time to add some depth to Marching Squares. I am now working on the next tutorial, which will do just that!

User #377983 - 25 Feb 15 17:02
Nice! Your projects are always geometrically and mathematically so interesting! A fact that ensures great potentiality by digging in them.
catlikecoding - 26 Feb 15 18:46
I'm a visual guy. Math an geometry are good companions. :)
User #433162 - 25 Feb 15 16:27
Oh yeah. Looks pretty good
Fractal got a Makeovermore_vert
2015-02-19T16:10:41+00:00
Post file flag
Fractal got a Makeover 2015-02-19T16:10:41+00:00close

After trying the new tutorial layout with Clock, I've also updated Constructing a Fractal. It's still the same content, but with the new layout, and less typos.

Embed data

Provider
catlikecoding.com

Provider URL
catlikecoding.com

Subject
Constructing a Fractal, a Unity C# Tutorial

Description
Details Through Recursion Instantiate game objects. Work with recursion. Use coroutines. Add randomness. Fractals are intriguing and often beautiful. In this tutorial we'll write a small C# script that manifests some fractal-like behavior. You're assumed to know your way around Unity's editor and know the basics of creating C# scripts.

HTMLplay_arrow

Working on New Layout 2015-02-12T17:56:36+00:00

I'm working on a new layout for tutorials. This is both for the creation of PDFs and for improving the HTML pages. Ideally both use the same design. The largest question has been what to do with the Q&A. I got rid of the side column and inlined everything, keeping a question and its answer together. So no more link hopping. HTML pages only show the questions, clicking them will reveal their explanations. PDFs will simply show everything. I made a revamped version of the Clock tutorial to demonstrate the new layout. Keep in mind this is still a work in progress. Like it? Hate it? Let me know! http://catlikecoding.com/unity/tutorials/clock/

flag
catlikecoding - 16 Feb 15 13:13
User #377983 - 12 Feb 15 18:07
So much more straightforward! Well done and good luck with the rest of the layout modifications!
catlikecoding - 13 Feb 15 16:44
Thanks! I'm making it a minimal as possible.
Ambiguous Cell with Two Sharp Featuresmore_vert
2015-02-11T09:57:52+00:00
Post file flag
Ambiguous Cell with Two Sharp Features 2015-02-11T09:57:52+00:00close

This graph shows all possible configurations when you have two sharp features inside an ambiguous cell. Seven have a diagonal connection, seven don't, and two are impossible. Luckily this can be condensed into a much smaller graph. The letters represent point-below-line relationships that can exist inside the cell, of which there are four. The Marching Squares 3 tutorial has the full story. http://catlikecoding.com/unity/tutorials/marching-squares-3/

Marching Squares 3 2015-01-31T19:33:56+00:00

The third Marching Squares tutorial is here! This time we're using hermite data to add support for sharp features. Real squares, and such! And we even end up resolving the ambiguous cells. We'll finally know whether there should be a diagonal connection or not. There is some vector and geometry math involved which might be a bit tough to digest. I still need to add Q&A and a bunch of diagrams to make this a lot easier. I still need to improve some other bits as well. I'll do so soon and let you know when it's done.

flag

Embed data

Provider
catlikecoding.com

Provider URL
catlikecoding.com

Subject
Marching Squares 3, a Unity C# Tutorial

Description
You'll learn to Calculate normals of edge intersections; Store hermite data; Discover sharp features; Decide which features to add; Resolve ambiguous cases. This tutorial is the third in a series about Marching Squares. This tutorial has been made with Unity 4.5.2. It might not work for older versions.

HTMLplay_arrow

catlikecoding - 10 Feb 15 17:10
Greatly improved the handling of ambiguous cases. I'm now finished with it.
catlikecoding - 1 Feb 15 16:01
I've separated some code to make things clearer.
catlikecoding - 5 Feb 15 16:43
Added diagrams to make things clearer, plus a few slight text changes.
catlikecoding - 31 Jan 15 19:38
Looks like Patreon lost the display image. Weird.
Resolving Ambiguitiesmore_vert
2015-01-29T13:59:18+00:00
Post file flag
Resolving Ambiguities 2015-01-29T13:59:18+00:00close

All the code for Marching Squares 3 is done, all that's left now is to write the actual tutorial. The last part was resolving the ambiguous cells - cases 6 and 9 - in a reasonable way. Is there a diagonal connection, or not? Sharp features allow us to answer this question. It's a bit involved though, as we have to deal with up to two sharp features in a single cell.

The March Goes Onmore_vert
2015-01-27T17:32:42+00:00
Post file flag
The March Goes On 2015-01-27T17:32:42+00:00close

Working on the next Marching Squares tutorial. Can you spot the new features?

User #485124 - 27 Jan 15 21:23
Hard corners and angle snapping?
catlikecoding - 28 Jan 15 21:01
Yes! The sharp corners are new. The snapping is done by enabling the align-to-grid option.
Untitled 2015-01-05T16:56:23+00:00

By now I've polished the Marching Squares 2 tutorial enough to consider it finished. But as always, don't hesitate to point out mistakes or ask for clarifications! http://catlikecoding.com/unity/tutorials/marching-squares-2/

flag
Marching Squares 2more_vert
2014-12-31T14:56:31+00:00
Post file flag
Marching Squares 2 2014-12-31T14:56:31+00:00close

The tutorial for December is here! Once again covering Marching Squares, this time we add vertex reuse and compute exact edge crossings. Besides festivities, two sprained ankles really put a dent in my schedule, so the tutorial isn't polished yet. Q&A still needs to be added and I want to put in some more images and improve a few explanations. And get rid of lots of typos too. I'll work on that in 2015, which as I write this means tomorrow. Enjoy!

Embed data

Provider
catlikecoding.com

Provider URL
catlikecoding.com

Subject
Marching Squares 2, a Unity C# Tutorial

Description
You'll learn to Cache vertices to reduce mesh size; Visualize stencils; Make snapping to voxels optional; Find exact edge crossings. This tutorial is the second in a series about Marching Squares. This tutorial has been made with Unity 4.5.2. It might not work for older versions.

HTMLplay_arrow

None
Why are you not using good OOP design? 2014-12-05T11:50:12+00:00

I added a new Q&A entry: Why are you not using good OOP design? http://catlikecoding.com/unity/tutorials/ It seems to come up every time I post a new tutorial.

flag
Marching Squaresmore_vert
2014-11-30T18:01:43+00:00
Post file flag
Marching Squares 2014-11-30T18:01:43+00:00close

It's time for a new tutorial series! The subject is voxels and marching squares. We'll stick to 2D, but there's plenty of possibilities in a flat plane. So much actually that one tutorial simply can't cover them all. This first one lays the foundation with an editable binary voxel grid and introduces the Marching Squares algorithm in its most basic form. http://catlikecoding.com/unity/tutorials/marching-squares/

Embed data

Provider
catlikecoding.com

Provider URL
catlikecoding.com

Subject
Marching Squares, a Unity C# Tutorial

Description
You'll learn to Construct a 2D voxel grid; Split a map into chunks; Support editing of the voxels; Triangulate the voxels; This tutorial builds on the foundation laid by previous tutorials. If you've done the Curves and Splines tutorial you should be good to go.

HTMLplay_arrow

None
Marching Squares Canvasmore_vert
2014-11-21T19:34:00+00:00
Post file flag
Marching Squares Canvas 2014-11-21T19:34:00+00:00close

Here's a screenshot of a boolean Marching Squares grid. It gets triangulated based on the on-off state of the voxels. It's actually a 3x3 grid of voxel chunks. A big portion of the code is about making both the editing and rendering seamless. Partitioning your dataset into chunks is mandatory when working with large spaces. So I decided to put it in there from the start.

User #433162 - 17 Dec 14 11:36
Great tutorial for a quite complex topic, it helps getting through the learning curve. So next tutorial in this series will be about smoothing the angles by adding more info to each voxel?
catlikecoding - 17 Dec 14 11:48
Among other things, yes. Though I'm not yet sure what goes in the next tutorial and what ends up in a third one.
New Tutorial Topic 2014-11-18T16:30:24+00:00

I've been doing research for possible tutorial material. After going through all the state-of-the-art material on Marching Cubes and its alternatives, I decided that it would be best to stick to 2D and write about Marching Squares. So that's what I plan to do this month.

flag
User #140221 - 18 Nov 14 16:46
That sounds great, I've never understood marching cubes and it's probably better for learning to start with less dimensions :)
catlikecoding - 21 Nov 14 19:23
2D can already become quite complex. In fact, we could spend quite some time before reaching 3D voxels.
Simplex Noisemore_vert
2014-10-31T22:50:02+00:00
Post file flag
Simplex Noise 2014-10-31T22:50:02+00:00close

Now that we've worked with Value, Perlin, and Curl noise, I though it was time to cover Simplex noise. No mysteries, no unexplained hairy factors. Having said that, the Q & A aren't done yet because I ran out of time. If you want me to elaborate on anything, mention it and I'll include it. The math is as straightforward as possible, but there's a lot and I might have moved too fast in some places. http://catlikecoding.com/unity/tutorials/simplex-noise/ (The url's title was wrong. My bad, I'm tired. Happy Halloween!)

Embed data

Provider
catlikecoding.com

Provider URL
catlikecoding.com

Subject
Noise Derivatives, a Unity C# Tutorial

Description
In this tutorial you will create alternatives of Value and Perlin noise, known as Simplex Noise. You'll learn to Use a falloff function based on distance; Convert between a square and a triangular grid; Convert between a cube and a tetrahedron grid; Compute Simplex Value noise, up to 3D, with derivatives; Compute Simplex Gradient noise, up to 3D, with derivatives.

HTMLplay_arrow

None
catlikecoding - 6 Nov 14 13:01
All right, I've added Q & A, included some diagrams, and fixed some text.
Creating an Octahedron Sphere in Unity | C#more_vert
2014-10-28T09:19:47+00:00
Post file flag
Creating an Octahedron Sphere in Unity | C# 2014-10-28T09:19:47+00:00close

Here's an extra tutorial about octahedron spheres! It was commissioned by Binpress.

Embed data

Provider
www.binpress.com

Provider URL
www.binpress.com

Subject
Creating an Octahedron Sphere in Unity | C#

Description
We often use meshes to represent 3D objects, approximating surfaces with a collection of triangles. This works fine when all lines are straight, but becomes troublesome when curves are involved. A cube is easy. A sphere? Not so much. Consider Unity's default sphere mesh. Its topology is known as a UV sphere.

HTMLplay_arrow

None
Noise Derivativesmore_vert
2014-09-30T14:45:26+00:00
Post file flag
Noise Derivatives 2014-09-30T14:45:26+00:00close

After learning about noise, it's time to learn about its derivatives! It allows you to do neat things, like figure out normals and make curl noise. http://catlikecoding.com/unity/tutorials/noise-derivatives/

Embed data

Provider
catlikecoding.com

Provider URL
catlikecoding.com

Subject
Noise Derivatives, a Unity C# Tutorial

Description
A Unity C# scripting tutorial in which you will create a mesh terrain and particles flows. You will use noise derivatives and curl noise.

HTMLplay_arrow

None
WIP Curlmore_vert
2014-09-28T18:55:39+00:00
Post file flag
WIP Curl 2014-09-28T18:55:39+00:00close

To show that you can do other fun things with noise derivatives, here's some Curl noise affecting a particle system. Best seen in motion, though.

WIP Analytical Derivativesmore_vert
2014-09-26T15:57:41+00:00
Post file flag
WIP Analytical Derivatives 2014-09-26T15:57:41+00:00close

Here's a shot of a terrain mesh with normals obtained via analytical derivatives. It uses rotated 3D Value noise. Analytical derivatives for Perlin noise is the next step.

WIP Noise Meshmore_vert
2014-09-24T16:32:28+00:00
Post file flag
WIP Noise Mesh 2014-09-24T16:32:28+00:00close

I'm writing the next tutorial, about meshes and noise derivatives. Though at this point I haven't reached the derivatives yes, it's just about making nice meshes.

Tutorials in PDF format? 2014-09-08T09:28:35+00:00

PDFs of the tutorials. Are you interested in this? If there's demand, I might create them and put them up for sale as well as turning them into a patron reward. I haven't figured out a good layout for the asides though. Any thoughts?

flag