never-finish-anything

Nano is now Open Source

I made Nano open source and it’s all available on GitHub here. I haven’t been able to find the time and energy needed to push further development, plus I think it needs such a massive refactoring that it might as well be rewritten from scratch. Regardless, I think if anyone wanted to take what I have made and expand upon it in terms of just content, art and UI, then you could have a pretty solid and fun game.

I still like the game play ideas of Nano, and I learned so much about programming from making it that it pretty much landed me a developer job. While I’m not working on it currently I haven’t stopped having ideas for it. All of them revolve around remaking it as an android game, perhaps as a Unity 2d project but still, finding the time and motivation will be tough in the next few months. To come home from a day at work of coding and spend the evening doing more coding might be a bit much for now, so any personal coding projects are on the back burner for now.

Anyway, it would be really cool if someone wanted to use this base for their own browser game. So if you do use it, let me know I don’t know about how to make something officially open source licensed or whatever but if you wanna play with the source and are concerned about that stuff just let me know how to set it up.

This was a really cool project and I’m sure I’ll revisit it in some form some day.

Playing with Unity and My Critters

I’ve been away from the Nano project for a few months now and I’ve instead been spending my programming time learning Unity. It’s actually pretty easy to use, and after watching a few of the tutorials on Unity’s site I was good to go and started off on my new learning project, which I’ve been calling My Critters. This is an awful name and isn’t a name at all really, it’s just what I say when I tell my girlfriend what I spent my day doing.

Her: “Have you been playing video games all day?”

Me: “No! There were a few hours that I worked on my critters… AND I showered!”

Unity?

Unity is a 3D engine typically used for making video games, incase anyone is reading this (no one is) and isn’t familiar with it. You can use Javascript and C# to write scripts for how the objects in your game should function.

Evolution Simulator Project

The Idea

In my case, I’m trying to make something I’ve been calling an evolution simulator. The idea is that when you start the simulation a few critters (aka spheres) and some food (cubes) are randomly dropped into a small flat world. The critters have the ability to detect the food via sight (raycasts) and then can move to the food (using physics and impulses) and eat the food. Now, every action the critters do burns energy, some actions burn more than others (moving forward burns more energy than turning) and simply existing slowly consumes energy, and when you run out of energy you die. In the end, critters try to get to food to stay alive, they will mate to make more critters and spread their genes.

Current State

This isn’t how it all works right now, currently I only have 1 critter who doesn’t burn energy at all and just poots his way around the world eating everything he sees, sweet life. But all that other stuff is coming and I don’t think it’ll be too difficult to get those basics in place. (In before the post where I talk about that stuff turning out to be really difficult.)

The Hard Part

The hard part comes when the critters aren’t told to do any of those things. The goal is to not have the instruction of move to food, eat food as an explicit instruction of the critters, instead the critters genes should determine what the critter does when it detects food, when it comes in contact with it, when it detects another critter, how it explores its environment, etc. This is when I’ll be getting into neural networks and stuff like that.

Polyworld

This whole idea is based off a project I saw years ago called Polyworld. The guy is a terrible presenter but it’s really inspiring the way the creatures in Polyworld develop their own survival strategies. My goal is to create a similar effect in a 3D space, the bigger goal is to then use this type of creature generation in a game of some sort.

Up Next

As of now, Nano’s development is on hold. I think Nano makes a decent portfolio piece and I’ve still got ideas for it that I want to implement, so the project isn’t canned, just on the back burner.

I’d really like to get some 3D models in the simulator. It’s really early, but I think having some models to look at instead of just geometric shapes would be more interesting to look at. Since I don’t know much about making 3D models, this part will likely require outside help. For me, the next part is to add more critters to the world, allow for mating, and add energy consumption.

Screen shots in next post!

Better Map Generation, Auras and Deck Include Modifiers

Getting back into the swing of things with the project by first implementing Better Map Generation. Like I said in my last post, the world used to be generated totally randomly as a player moved around, causing Mountain terrains to be right next to Forests which are directly next to Tundras, basically all the terrain types where just mixed together.

But now, when a player moves into a new location, with no terrain tile associated with it. The game takes all adjacent terrain tiles into account before choosing one. This causes larger Biomes to exist, hopefully this will make the world seem less random and give some aspect of actually being somewhere in the world. Especially when I get around to adding biome specific events, enemies and effects.

This is just the first step in expanding the terrain generation mechanic, so we’ll see how that goes.

Next up, I started adding in Auras but quickly realized I need to refine the idea. The basic idea is that Auras give you special abilities, and you can only have 3 equipped at a time. These special abilities would give you additional choices during events or alter how some items work. At first I thought they might just be stat modifiers but I scrapped that idea because I was afraid it would move in on the Deck Include Modifiers idea.

So my plan is to leave Auras alone for now and return to them after implementing Deck Include Modifiers. What ARE Deck Include Modifiers you ask? This is a mechanic I’d like to add where including certain cards in your character’s deck result in your base stats being modified, as a means of balancing a cards power.

For instance a FireBall card might do a large amount of damage when played in combat, but simply adding the FireBall card to your deck will lower both your Max Hit Points and your Defence. The overall idea is that by adding certain cards to your deck you have some degree of control over your character’s “class”. Want to be a Mage-like glass cannon? Add in those fireballs and other powerful abilities at the expense of your health and defence. Perhaps add in Armor cards that have no effect when played in battle, but their Include effect raises your base defense so long as the card is in your deck, making you into a Warrior like tanking class.

These are just off the top of my head, so there will probably be many changes as I start to add it in. Which is exactly what I’m about to try to do!

Post-Contest Hiatus, Planning and Card Art

The Break

I’ve been on a break from further development for the past month. Various reasons for the break including just being busy, freelance design work and playing too much Civ 5, DOTA2, Card Hunter and Android:Netrunner.

The World

One thing that added to the stall was trying to come up with the right way to proceed with the World Generation. The current way the world is generated in Nano is not very apparent to the player. But here is a summary of how it works:

  1. A player enters an x/y location, either through moving to that location or their initial spawning (which places them at 0x 0y.
  2. The game checks to see if a terrain piece has already been set to that location.
  3. If there IS a terrain piece saved to the player’s location, then that terrain piece is displayed to the player.
  4. If there is NOT a terrain piece saved, the game randomly rolls to see which terrain piece to use out of all terrain pieces in the database. Then that terrain is saved to that location and any player entering that location will find that terrain piece.

While this was very easy to implement, it also is very rudimentary and does not allow for the inclusion of Biomes. Ideally, if a player was in a Thick Forest terrain, then they moved 1 position they would still be in a Forest biome and hence get another forest type terrain piece generated for them. This would continue until the player came to a transition piece which the game would place semi-randomly (it would take into account the adjacent terrain which would affect the probability of the player’s location being generated as a transition piece). Once a transition piece has been placed, adjacent, undefined locations could be from any other biome.

Basically, this would make it so a player wouldn’t be in a forest one second, a mountain the next and then a desert after that. Hopefully, implementing biomes would make the world of Nano seem more realistic, with various Forest terrains adjacent to each other, as with all other biomes.

This however is much harder to implement and there are many ways to achieve the desired effect. I looked into a variety of procedural generation techniques which use height maps or Perlin Noise. But these methods seemed a bit too complex for my needs and it would also mean more terrain would be generated than I needed, if I was to generate terrain only on a character’s movement.

Another option was to simply create the game world manually. This has the benefits of being easy (no programming needed) but would limit the size of the world and would make the world less dynamic.

So, my current plan is to do something similar to transition piece idea, mentioned above. I’ve yet to begin implementing it but I think that will achieve my goal best without being overly complicated.

The Art

I’ve got new card art! Ashley Kuros has been a friend of mine for a long time and she is a talented artist. She has been nice enough to offer her help with the art needed for my game! So far she’s provided a bunch of pieces to be used with the various cards you can find in Nano. Below are a few of the pieces provided by Ashley already implemented in Nano and I hope she’ll continue providing more!

Punch Sand in your eyes!

Warm Up

Warm Up

Debilitating strike

Debilitating strike

Major development progress, entered into contest, Game Playable

Test Nano!

Nano is up for testing! Goto http://nano.apphb.com Sign up, and enter the world. There is limited content, limited design/art and only the most basic of features, but it works, and gives some sense of the basic idea of the game. Give it a try and let me know what you think!

Major updates

I’ve added a TON of stuff to nano over the past two weeks. Here is a summary:

  • Huge improvements to make it easier for me/admins to add content. Hence, more content and way more to come.
  • Proper enemy assignment to combat, allowing events results to dictate which enemy is chosen.
  • UI improvements
  • Card Design and some card art added.
  • Decreased Hunger/Thirst generation
  • Basic Character name validation
  • Leaderboard!
  • Text feedback for all event results
  • more food/water/item sources
  • Loading screen to prevent multiclicks
  • Soooo many bug fixes
  • Some minor balances

Nano entered in DevelTeam Contest, but…

I entered Nano into DevelTeam.com’s Summer Game Jam contest, you can try all the games that were entered into the contest here: http://www.develteam.com/GameJams/

But, this is embarrassing, I didn’t know all the unspoken rules and subtleties involved with a Game “JAM” contest. Once all the projects entered into the contest were listed I quickly noticed that it seemed all the other games had been developed over the 2 week period after the theme was announced. This is certainly not the case for Nano, and I got in contact with the contest’s administrator to clear things up. He said that since the rules didn’t actually state that the games had to be developed only over the 2 week period that he would let it stay in the contest.

That was really kind and understanding of him, but I felt bad that I’d have this unfair advantage of a lot of extra time, where the other entrants really beat themselves up to get theirs in. Granted I pushed way harder these last two weeks than ever before, and most of my time prior to these past few weeks was just learning to program.

So I tried to make it known that my game doesn’t really fit the bill for a “Jam”, I’ll know next time and I hope the people over at that site don’t hold it against me. I tried to be public about the matter on the site and urged anyone to not vote for Nano if they feel like I really should have known better and not been in the running. It was nice of them to let me stay in the contest but now I just feel a bit shitty about it. I’m sure they’ll be more detailed in the rules they provide next time.

I’m really eager for the contest to be over so I can make more additions to the game. I have plenty of things to add and I’m going to spend this down time sorting out my To Do list and prioritizing things. I think from here on out, I’ll try to do push a weekly build for testing.

Give Nano a try! http://nano.apphb.com

True Deck Validation, Card/Combat Reconjigger, Additional Content!

True Deck Validation, I was being dumb

Last post I started out boasting about how I implemented Deck Validation, but then as I was writing the post I realized it didn’t work at all. Well this time I actually DID make Deck Validation work, by avoiding the problem altogether. Take THAT last post!

So originally I came up with this way of having the deck get checked for its validity after a change was made. Oh and just so you know, an invalid deck is one which has less than 10 cards in it, for now atleast, I may increase the minimum deck size later. But anyway, I quickly realized this was the wrong way to go about it, as a deck could be made invalid (remove all the cards) then the player could just leave the game entirely by closing the browser, upon returning to the game they would be back in the world, with an invalid deck, ready to blow up my game the moment they enter combat and have no cards to draw! Hell no am I letting some deckless weirdo blow up my game!

So basically, I just made it so you could never go below 10 cards, if you try to the game doesn’t apply your change, warns you of such and tells you to add a card before removing one, easy. I wish I thought of that at first.

Making Cards and Combat not suck

After that it was on to making Cards and combat a bit more interesting. Problem was, until now, cards could only make 1 stat change. That was fine when I only have cards like Punch and Kick that do x amount of damage to the enemy, but if that is the most any card can do then the game will get boring really fast. I’m bored just talking about it, so I set out to make more complex card interactions possible.

Cards are now made up of 2 objects, Card and CardEffect, in a One to Many relationship. One Card can have many CardEffects. Each of these effects can have a different target, effect different stats and for different amounts. This allows for new cards such as Thrash, which does a large amount of damage to the enemy, a moderate amount of damage to the caster and lowers the caster’s Defence stat. Complexity, Fun!

There are many other cards like this and I intend to balance a cards with positive and negative effects to make each choice one of risk vs reward. Hopefully this will make combat more interesting. I have more ideas for making cards have interesting effects, even having them affect the character outside of combat!

Speaking of combat, since I changed around how cards work, that meant that I had to go back and refactor my combat methods. This took a while but it really needed it, since I’ve learned so many better practices since first coming up with my combat methods. I still have to add in text generation but that shouldn’t be too hard… (famous last words).

Filling out the games content a bit

Lastly, I’ve greatly improved the workflow involved with adding content to Nano. This is something only admins like myself would ever interact with, but adding content has been something I kept putting off simply because the only way to do it was via SQL statements. Well not anymore! Now I have nice forms that I can fill out and drop down lists with all my enums. Just the other day I added 20 cards and all their effects. Next will be enemies, consumables and events!

So, things are working out pretty well, and I think I’m still on track to have Nano ready to present at DevelTeam’s game jam. Only thing left that I haven’t thought about is how to host the game. I originally planned on just hosting it on my own computer and leaving my comp on for a few days and giving them an IP address, but I’ve started to look around and it seems I can get some temporary hosting setup and just use that for the contest. Better figure that out soon!

Deck Validation and DevelTeam.com Contest

I’ve added ‘Deck Validation’ and it was easier than expected. Pretty much any time I implement something and it works right off the bat I consider it “easier than expected”, perhaps I’m a bit of a pessimist when it comes to my programming skills.

Anyway, I’ve set it up so that a character’s deck must consist of at least 10 cards, any less and the player will be shown a warning message, telling them that they cannot leave the inventory screen without adding more cards…

Actually, now that I think about it, there are plenty of ways to get around this, most likely by accident… hmm, how to deal with this then…

Well, the basics are there, I suppose I’ll just have to check deck validation in more places to cover this.

DevelTeam.com Contest

DevelTeam.com is having a contest for indy games/developers. I’m going to try to enter Nano into the contest, but the deadline for submissions is mid/late august and I can only hope to have the game functional by then, it probably won’t be much fun. I’m more interested in getting some people to notice it and maybe get some other developers and artists to want in on the project. The contest is offering a handful of quality game (most of which I already own) but I’m not terribly interested in winning (I’m sure I won’t win with Nano in it’s current state).

If I do get the game into the contest, I hope people will be receptive to the game in its current super-early stages.

Death and Cascading Delete

Character death logic has been added, when a character’s health reaches zero the character is DELETED along with all of its associated records, such as its inventory and any active combat records. Having a character’s death be permanent is pretty vital to this type of survival, roguelike. It makes the risk vs reward choices that much more vital. Just don’t get too attached to your character and its stacked inventory of food and cards.

But not all is lost, for I have also added the Graveyard. This is where all characters go when they die and simply stores their name, final score and the user they belong to. Having these records allows for a couple of things. First, it allows for a leaderboard to be posted that displays the top scores of characters alive or dead. It also permits me to make a page that a player can visit to see a history of all their old characters, perhaps as a motivator to beat their personal best score, or maybe just a place to go and mourn your passed characters.

I’ve got some ideas for expanding the stored stats but for now, name and score is all I’m holding onto.

When implementing character death I realized I had many records that needed to be removed from many different tables. At first this seemed daunting, not only would I have to remove the character from its table, but I’d also have to remove every inventory item, any active combats the character was in and then every enemy card associated with that combat. That’s a lot of foreach loops removing a lot of records, one at a time.

Luckily, there is a better way and it’s called Cascading Delete which basically means – when I delete this thing Entity Framework will go ahead and delete everything else associated with it. Then it was just a matter of going back to my models and making sure they were associated properly to begin with. So now, all I do it remove the character in question and Entity Framework takes care of removing all the records associated with that character via a Foreign Key. It was nice to go a learn a new trick that makes things like that easier to handle.

But it’s not all death and deletion, there have also been major strides with the visual design of the game, and I’ve done a lot to make all of the interactions with Nano use ajax. Once you enter the game’s World view, that it, no need to do full page refreshing anymore.

The character death logic was the last “feature” I needed to tackle before the game can be played seamlessly. Next I just need to work on the visual presentation layer of things and add some more content. Once those two things are done, I hope to be ready for some very early playtesting.

Combat goes in the Combat Box

Long story short, I got the Combat screen to display within the World view via ajax. What does this mean? Means the game looks like this when in combat now…

Featuring background scene art by Koishii Kitty.

Featuring background scene art by Koishii Kitty.

This turned out to be easier than I expected when implementing, but took a while to plan out properly. The result is a smoother transition from Event to Combat. There are still a bunch of things I need to refactor now that this is how the combat screen will be displayed, but it’s a step in the right  direction.

I still need to change the card’s ‘Use’ button to use ajax and the players stats in the top left need to update after each combat round.

I also ajax’d the close button for the inventory screen, meaning now, going from the World screen to your Inventory, using an item and then closing the inventory screen to return to the world screen is all seamless. I’m going to start looking into fancy javascript animations for the opening and closing of screens. While the current transition requires no full page refresh, the switch is somewhat startling. I think all it needs is a slight fade as it transitions.

Paradise

Art!

I got a few pieces of art to use in Nano! Here are a few of the pieces that Koishii Kitty (check out her DeviantArt portfolio).

path to solace Paradise lu the sky

She’s been a friend of mine for years and I’ve always wanted to collaborate with her on a project, so I’m pumped that she was kind enough to provide some scenery art for Nano.

I’ve already added these scenes by Koishii along with a new others she provided. Updated screen shots of the scenes within the game itself are on the way. I’ve just been trying to make the game’s combat, inventory and world screens work with Ajax instead of full page refreshes. Doing that and crushing the bugs that pop up along the way have been keeping me busy.