How to Read from and Write to CSV in Unity

Shane Martin's Blog

(Code Snippets At The Bottom)

After accepting an offer for help on RPG side project I decided to create a CSV writer/reader to work with an inventory.

Since I was building something to do with an inventory, I was unsure of whether I wanted to build items through strings or through an ID list. I decided to build using a string. This would be easier in the short run and can create a generic function that works across all scripts. The only problem is spelling mistakes. If I chose to do it using an item ID list, I also run into the problem where an item could be set to the wrong ID.

Coding a CSV was not that hard to do. The problems with setting it up is that you need to use a file path to write to the CSV file.

CSV Reading:

Screen Shot 2015-11-20 at 12.45.30 pm.png

In this example, I was using…

View original post 1,053 more words


Frank Opinion: Why Our Game Is Premium

Game Revenant

Believe it or not, Jack and I don’t spend every waking minute of our lives with our heads buried in our computer screens working on Where Shadows Slumber. Occasionally, we take the time to read up on current events in the game industry!

The big news of last week was Star Wars Battlefront 2’s controversial loot-box system, and how EA and Disney tried desperately to pull up as their starship careened toward the surface in a full nose-dive. I’m not a journalist, so I’ll let you look up the story on your own. Personally I’m a huge fan of this YouTuber YongYea – watch the last 5 or 6 videos on his channel and you’ll get the full story. (Coarse language warning – YongYea gets pretty passionate about this subject.)

View original post 2,785 more words

Dev notes. Week 7. Freelance

Today I want to talk about a little bit about how to proceed further in the game development business. This has been on my mind for a while now, I also did some research on the topic, and just want to lay it down on paper, like some sort of plan. I think it is a time to do so, as I already got my first contract on a freelance platform to help with the development of mini-games.

Continue reading “Dev notes. Week 7. Freelance”

Dev notes, week 6. Fireball

As I mentioned last time, the next build is supposed to be about fireball, it appeared, updates with perks and extra features like an explosion on impact, embers, and ignition.


The first part of the week I spent trying to make existing fireball look nicer, using particle system and explosion effect on impact. After watching several tutorials on youtube, I ended up with the following fireball.

I think it looks nice for the first particle system I’ve ever created. The problem raised when enemies started to use it as well. Once there were 30 fireballs flying around, the game began to lag. So I had to create a new spell specifically for enemies, which is just a flying ball (almost like it was before).

And the rest of the week I worked on updating fireball logic, how it delivers a damage, with and without explosion effect. For instance, when the spell does not have an explosion update, it will damage only an enemy it just hit. Once an explosion is active (let’s say a perk was chosen with Explosion on it), the fireball gives a damage to every enemy in a specific radius.

Perk System Update

The one thing I had to change my Perk system is an ability to have several values per a tier. What I mean is, a spell costs mana to be created, and once we increase the damage of the spell, we have to increase mana as well. Next, what if the spell does not have a specific damage value and instead it is a range, from minimum to maximum. It will definitely be with lightning, cause it usually delivers points of damage in a range from 1 to some value. And third, what if I don’t want to type every damage/mana cost in every spell, but instead have a formula do it for me. With that, I redesign the Level up System, and there is now a flag, a boolean variable, which defines how this perk should be created. Does it take values from xml file, does it accept formula, or does the information about the next level of a perk is located in spell prefab already? The latter I added, cause I figured it would be easy for some of the values to be changed this way, specifically for the additional features of a spell, like an explosion of the fireball.

Time log

Finally, about my productivity. I logged 16 hours last week, however, I also spent some time on my work with learning some stuff from the Internet, for instance, I thought it is gonna be good for me to know how to draw at least the basic staff. So now, when I have some free time, I am doing lessons I found on Reddit. Maybe someday I will be even satisfied with the staff and will post it 🙂

$20,000 in 10 months from two small games, how? and what next?

The goal of any indie developer 🙂

Coffee Induced Games

Between January 2017 and November 2017, I have made a little over $20,000 in advertising revenue alone from two small mobile games on the Android App Store – Google Play

Admob income Nov 2016 - Nov 2017 Proof of income to back up my claims

Up until now, I’ve been writing small simple Android games as a hobby, but now it’s getting serious…

If you’ve have told me a year ago, that I’d be writing this article today, I’d think you were joking around. At that point, my total earnings on the Google Play store, amounted to $43.75, if it hadn’t been for some extra income from my YouTube channel showing simple games programming tutorials, I’d have never of received any money from Google up until that point. But as of the time of writing, I’ve earned just over $23,000 in the last year, all from just two games:


An pretty simple Space Invaders clone I…

View original post 962 more words

Dev notes. Week 5. Build #4

This week I spent the less amount of time, since the beginning of writing this journal. In total, I logged 13.3 hours,  and almost all of it was in the beginning of the week, as on the weekend I travel to Prague to pass a text for IELTS.

On Tuesday, I finished the build #4, and with this update I bring a perk system (see more about it in the Dev notes. Week 4, a new enemy and a small rework in Leveling up of the player. Now I will focus on the creating a proper fireball, also with perks associated with it.

Continue reading “Dev notes. Week 5. Build #4”

Dev notes. Week 4

This week I had to prepare for IELTS test, as at some point I will move to Scotland, so I did not have good chance to work hard during the weekend. Still, I spent almost 20 hours this week on the project, and in total 74 hours this month. My main focus was on continue with the level system I introduced last week, with mostly learning how to load assets (images for instance) from a code. And was thinking also about a better way to spawn waves, the xp progress of the player, loot tables, and other small staff.

Continue reading “Dev notes. Week 4”

First blog post

Hi! After struggling for a while with Facebook notes, I decided that it is probably better to transfer my dev notes to an actual blog service, such as WordPress.

Anyway, this blog will begin just as a place for summarizing a progress I made in a week, and maybe someday I will start to add tutorials, reviews about a gamedev.