Jump to content
  • Advertisement
  • entries
    3
  • comments
    0
  • views
    562

About this blog

Follow the development progress of this "Currently unnamed Item Shop Game". Join us as we document the progress, trials and tribulations of an Item Shop game developed by a Husband and Wife team (Whistling Alpaca Games)!

Entries in this blog

 

Unity Tilemap White Line Issue

One of the issues we ran into is this fairly well documented Unity Tilemap white line issue. When you have a tilemap in unity, with really a large repeating area you''ll usually end up with a pretty glaring issue coming from the tilemap. You'll notice long, weirdly colored lines appearing vertically (as I've seen it) on your tilemap. According to what I've been able to tell this comes from your camera not snapping to a whole number pixel count, which seems to be the issue in my case. My camera follows the character in a pretty slow way, approaching the character quickly than slowing down the closer it gets. There's basically two solutions that I've found to fix this issue and they're both pretty straight forward. The first fix is the fastest, and usually works, you simply find your container grid for your tilemap and give the cell gap a bit of a negative offset, in this case -.01: This is the fastest way to solve this problem, but I've noticed that it doesn't always work. If the above solution isn't working you're going to need to get dirty and add a 1px padding to all of your tilesets that show this problem. Since it would be a massive effort to redo all of your tilesets, I'd recommend finding the offending tile and testing if something like this works. Take the tile that's causing the issue, and surround it with copies of itself like so: Simply apply that center tile to the whole map you're trying to test and you'll be able to tell if this is the issue and dedicate more of your time to getting each one of your offending tiles that 1px buffer. In my case, there needed to be BOTH of these solutions in order for the tilemap to look correct. Overall this is going to be one of those problems that you poke and prod at until you find something that works for you, just make sure you run around your map and make that camera move in weird directions to see if you can get your issue to reproduce!  
 

Progress: First month of development

Unnamed Item Shop first month In this devlog we'll be discussing the various aspects of what we did in our first month of development. We'll cover important things like what we accomplished and how we set our expectations and processes to get the most out of the time we had. One of the first things we did to give ourselves a very vague direction was to make a few statement about what the game was. We first came up with the very baseline statement: "You run a fantasy item shop". As long as the game meets those expectations, we were on the right track. Instead of trying to rigidly force the game to be something, we are creating the systems one by one to enhance our first main idea.   Things We Accomplished:   Art:   One of our big challenges was coming up with an art style we liked while also keeping a resolution and feel that would be easy enough to do within our time limit. We were initially thinking about doing a 32 pixel base size, but ended up going with a 16 base pixel size because we were able to get plenty of detail and style. Not to mention the characters came out looking absolutely cute. We're doing very well on the amount of sprite sheets we have already created with enough assets to make the entire player's shop, most of the exterior scenes and a few of the other interior scenes in the game.  Since the pixel art represents basically every aspect of the game, this section can be summarized as: Everything you can see, is the art we've accomplished.   Systems: We started creating systems for the game by layering various managers over each other as well as other independent systems such as character movement, pause functions and camera movement. Keeping these systems completely separate proved to be incredibly useful earlier this week. We were faced with a major refactor of the inventory system, it was the first thing I started working on with the game and since it's my first unity project it had several issues. A refactor was in order and because the systems were so independent, after I ripped out the entire inventory system all other systems were functioning fine. The shop system was also working pretty well, customers will walk around the player's store visiting a random amount of points of interest before deciding if anything in the shop is worth them buying. The user is also able to set custom prices on each item in their store, which works really well both in the fantasy of the game and as a mechanic (Also note the placeholder icons 👍) . All of our UI components are also broken out into prefabs, which makes it incredibly easy for our UI manager to perform all CRUD operations on them. Guilds, a fairly major feature in the game, are also implemented (although I only have 2 coded at this point). Each one can consume or produce resources and each interact with each other based on those resource production/consumption. It's currently in the air if we're going to do guild reputation at this point.   Summary Overall I think we were able to get a lot accomplished, especially considering the fact that this is our first month of development time. We had a lot less direction and far fewer goals in the beginning, but now that we're under way we really are just blasting along. I think one of the most important things for us was to set an impossible development time, while keeping the focus of the game razor thin. If we get to the end of that development time and there's something missing or the requirement to add more systems we can easily add additional development or testing time. Also since we're beholden only to us and what we want to get out of this game we're not burdened with meeting other people's expectations. The first month has been very eye opening. Learning new software, learning a process that works for us (as a two person team) has all been really cool and we're looking forward to the next month of development.  
 

Managing UI between scenes in Unity

Coming up with a solution for managing UI elements across different scenes wasn't as trivial as I first expected. It's very easy to attach a canvas to a scene and call it a day. Initially I had all of my canvases attached to the first scene I expected the player to enter and then simply call DontDestroy(gameObject) on all of the canvas scripts. So what's the issue? If you allow the user to save and load from other areas, you have to copy/paste a prefab into each of your other scene. This is a trivially easy solution, but it's too dirty for my liking, instead we should dynamically create and manage the UI elements via a UI manager. The first step would be to create an empty object in our loading screen (the loading screen will always be accessed before gameplay starts). In this case, since we're also going to be appending a bunch of canvases to this empty object, it needs a canvas or stuff just doesn't render properly. Also make sure to add a reference to your UI element prefabs: And the start script for the UiManager script: void Start() { if (allCanvases == null) { DontDestroyOnLoad(gameObject); foreach (GameObject prefab in prefabsToInst) { GameObject toAdd = Instantiate(prefab); toAdd.name = prefab.name; toAdd.transform.SetParent(transform); uiCanvases.Add(toAdd); } } else { Destroy(gameObject); } } Each canvas appends itself to the UIManager and therefore does not get destroyed on scene change. All specific behavior for each individual canvas can be handled in the individual UI component's scripts. Blamo! That's it! Crisis averted, we can now navigate between scenes and know that our UI manager is now empowered to show canvases, hide them, etc.
  • 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!