Wednesday, December 31, 2025

Making Dashed Line in Unity!

There's probably no web developer who doesn't know the famous dashed line. Especially when you select "dashed" as a style on the border of a web element, voila, there you have it, the dashed line! Let's show an example below:
 

Easy peacy! But wait I need dashed line in Unity. So let's start!

First of all, we need to know exactly what we're going to do. We need a line, this line should be multiple and have gaps between them, and it would be good if it could move!

Lets start with line texture:


You can save this to your computer if you want. We copy this into the Unity project and select its properties as follows:


The key point here is that "Wrap Mode" must be set to "repeat". So the texture is ready. In the next step, we will create a dashed line using this texture. For this purpose, we will use a Shader. Right-click on the folder where we will create the Shader and select Create > Shader Graph > URP > Sprite Unlit Shader Graph. Let's work deductively, and when the graph is finished, it will look like this:


Let's explain the steps in order. First, we create an input of type Texture2D. To include this input in the shader graph, we add a "Sample Texture 2D" node and connect the texture input to the texture input of this node. To multiply and move our lines according to our purpose, we add a "Tiling and Offset" node. The value we give to the "x" value of the Tiling input corresponds to the number of breaks. If we want to move, we split the output of the "Tiling and Offset" node using the "Split" node. The R output will correspond to the "x" value and the G output will correspond to the "y" value. Since we will be moving along the x-axis, we preferably add a "Subtract" node before the x value. Since the x value will decrease over time, we add a "Time" node and, preferably to control the movement speed, we add a "Multiply" node, connecting the "Time" output and the x output to the "Subtract" node. Finally, we connect the output of a "Vector2" node to the UV input of the "Sample Texture 2D" node. We also make sure to connect the RGBA output of this node to the BaseColor input of the "Fragment" node and the A output to the Alpha input. And there you have it!

After creating the graph, right-click on it and select Create > Material to create a "Material". Now all you have to do is create a "Line Renderer" and select the newly created object as the Material.

Once you've completed all the steps, you'll have a moving dashed line!




Sunday, December 14, 2025

SnakeCraft - Making Android game with unity





aa



Download Link:


You can install the game on your Android phone by clicking the link above, selecting the package manager, and completing the security verification. 

In this article, we delved into a completely different topic: game development with Unity. This playground has developed surprisingly much compared to the past, so much so that you can find countless tutorial videos on YouTube. So I thought, why not make one myself? But how does asset creation work? I had AI draw it. I drew it, but of course, I couldn't do much fine-tuning. But still, a game came out of it. Now we need to make some money. For that, there's AdMob. This was great; I was able to finish the process quickly. Quick, but get your driver's license and passport ready. Since I didn't have a passport, I sent my residence permit, and they accepted it, thankfully. So how do we publish this game? We signed up for the Google Play console. Google has made such a mind-boggling console; you need to be a Google engineer to understand what's where and how. Anyway, I researched and found out that we needed to complete a closed test. You informed within the console. For the closed test, you need 12 users, and these users need to test the game for 14 days. Okay, we understand you're implementing this to prevent quality from dropping or to improve declining quality, but am I a company that's going to find 12 people to test it for 14 days? Let's say we distribute it to friends and family. According to my research, Mr. Google might not like that either and extend the process for another 14 days until they're satisfied. Also, I couldn't create an email link to send to the testers. It's impossible to understand by searching at the interface. For example, the status shows "under review," and the game is in draft. What is a draft? Who is reviewing it? What will happen after it's reviewed? Maybe that's why the link isn't visible. I asked the AI, and it couldn't figure it out either. Anyway, people who do this kind of work can copy the link from YouTube videos; hopefully, I'll be able to copy it someday. Additionally, you need to fill out many surveys and create a privacy policy. Finally, you need to pay $25 to use the Google Play console. I wrote this article to share my experiences in case anyone is interested. However, they withdraw the money incredibly quickly; I've never seen a system that does that. Despite everything, YouTube is free, so let's not deny them their due.

Update: To begin closed testing, you need to wait up to 14 days for review process. After process application, status will change from draft and link become usable. So closed tests could be continued.


Saturday, December 13, 2025

SnakeCraft - Unity ile Android için oyun geliştirmek









İndirme adresi:


Yukarıdaki linke tıklayıp paket yöneticisini seçerek ve güvenlik onayını vererek oyunu Android telefonunuza yükleyebilirsiniz. 

Bu makalede bambaşka bir konuya giriş yaptık: Unity ile oyun geliştirme. Bu alan eskiye göre şaşırtıcı derecede çok gelişmiş öyle ki YouTube üzerinde zibilyon tane eğitim videosu bulabiliyorsunuz. Ben de dedim ki madem öyle bir tane de ben yapayım. Yapayım da asset oluşturma işi nasıl olacak? Onu da yapay zekaya çizdirdim. Çizdirdim ama tabi ki ince rötuşları çok yapamadım. Ama olsun yine de bir oyun çıktı ortaya. Şimdi biraz da para kazanmamız lazım. Bunun içinde AdMob var. Bu güzel olmuş hızlıca işlemleri bitirebildim. Hızlı ama sürücü belgenizi ve pasaportunuzu hazır edin. Pasaport olmadığı için ikametgah gönderdim kabul ettiler sağ olsunlar. Peki sonra nasıl yayınlayacağız bu oyunu? Google play consola üye olduk. Google öyle bir konsol  yapmış ki beyin yakıyor, ne nerede nasıl anlamak için Google mühendisi olmak lazım. Neyse araştırdık ve anladım ki kapalı teste girmek lazımmış. Bu durum konsol içinde gösteriliyor. Kapalı test içinse 12 tane kullanıcı lazım ve bu kullanıcıların bu oyunu 14 gün boyunca test etmesi gerekiyormuş. Tamam anladık kalite düşmesin veya düşen kaliteyi yükseltmek için böyle bir uygulama yapıyorsun da 12 adamı nereden bulup 14 gün test yaptıracağım şirket miyim ben? Hadi diyelim ki eşe dosta dağıttık. Araştırmalarıma göre onu da beğenmeyebiliyormuş Google Bey 14 gün daha uzatıyormuş süreci beğenene kadar. Ayrıca testçilere gönderilecek mail linkini de oluşturamadım. Ara yüze bakarak anlamak mümkün değil. Mesela durum "incelemede" görünüyor ve oyun taslak halinde. Taslak ne kim inceliyor incelendikten sonra ne olacak belli değil. Link belki bu yüzden görünmüyor. Yapay zekaya sordum o da işin içinden çıkamadı. Neyse youtube videolarından bu işi yapanlar linki kopyalayabiliyor, bir gün bende kopyalarım inşallah. Ek olarak birçok anket doldurmanız ve gizlilik politikası oluşturmanız da gerekiyor. Son olarak google play konsolunu kullanabilmek için 25$ ödemeniz gerekiyor. Heveslenen olursa tecrübelerimi paylaşmak için bu makaleyi yazdım. Yalnız parayı çok hızlı çekiyor böyle para çeken sistem daha görmedim tebrik ederim. Her şeye rağmen youtube beleş şimdi adamların haklarını da yemeyelim.

Güncelleme: Kapalı  teste çıkmak için 14 güne kadar beklemek ve uygulamının durumunun taslaktan çıkması gerekiyor. İnceleme bittikten sonra link göründü ve test aktif hale geldi.