I just submitted Archlinux build scripts for the iFolder client to the Archlinux User Repository (AUR). If you want to build the iFolder Client on Linux by hand, maybe looking at these scripts will give you some hints. Here are the packages:
Yes, I just spent two hours trying to get some output from Log4Net in Unity3D. The main problem was of course in front of the computer but I also blame the log4net online docs for not having a quick start guide that outputs to a file. I had three problems:
As the title suggests, I finally managed to add wide corridors in the world generator for my Unity 3D game prototype. Instead of spending a huge amount of time in tweaking and debugging the A* star algorithm that creates the corridors, I now just call it multiple times per door to door connection and encourage it to lay the paths side by side by adjusting the weights in the grid. It leaves some artifacts sometimes but these are easily removed by passing a few times over the tilemap and removing all wall tiles that are surrounded by 3 or more corridor tiles (excluding diagonals). Almost like Conway’s Game of Life.
Yesterday I wanted to improve the corridor generation by actually using a path finding algorithm instead of the hard coded mess I had before. While looking for path finding solutions in the asset store, I found a whole bunch of AI solutions – not exactly what I need right now but they looked interesting so I spent two hours looking at them. The most interesting seem to be Rain{one} and the A* Pathfinding Project. Both feature path finding and recast based nav-mesh generation. Rain{one} also comes with environment sensing, behavior trees and integrated animation control while the path finding project seems to be more optimized if you just need path finding. But, as I don’t have a game concept yet and I don’t need AI or navigation meshes right now, I ended up using an old-school open source C# A* implementation for grids. It is well designed and has many options for tweaking. Having the source to the implementation is a big bonus, too, since I later want to make corridors that are several tiles wide and no standard A* implementation can generate wide paths.
So, equipped with this new tool I can now connect rooms that are not right next to each other – the path finder is able to map out corridors between any two points on the map. I forbid the finder to use diagonal movements and I enabled the direction change penalty which makes it prefer generating straight lines instead of zigzag corridors that it generated to substitute for the lack of diagonals. Another set of tweaks was added to the weights in the grid. Basically, I told it to avoid making corridors directly next to a room’s wall and to prefer to make corridors right next to existing corridors. The last tweak tends to generate some wider corridors in areas where a lot of rooms are next to each other. As long as I can’t just outright tell it to make corridors with three tiles width, this is the next best thing.
While I was at it, I changed the look of the rooms’ walls and added automatic doors to the room exits.
No screenshots today. But I restructured the map generation code so that it can cope with multiple z-levels. Right now it just generates the same maze type layout you could see in earlier posts, layered on top of each other. This enables me to generate multistory rooms later. I’m not sure if I will make use of multiple z levels in the final game but it’s cool to have it available for experimenting. In case this game gets a top down Dungeon Keeper style interface, the mouse wheel could be used to move between z-levels. In case it will be first / 3rd person, I will need to add elevators or ramps. I could also just use it to generate background scenery for rooms with transparent floors. The possibilities are endless!
While running around in 3rd person perspective I got lost and decided to quickly implement a minimap. Can’t be that hard in Unity3D right? Well, two hours later I finally pulled it off.
The hard part wasn’t to get the map to show, but to draw the location of the player as little red dot onto that map in the correct position. I looked at various tutorials but I they only either dealt with the aspect of actually rendering the world in the minimap or how to draw blips on a radar like screen but without rendering the world. The first aspect required a second camera positioned above the world to actually render the minimap. But the radar only style maps don’t make use of a second camera, they just blit a few textures into a rectangle somewhere on the screen without using a camera. This sounds similar, and yes, it is similar, but not similar enough to take the code from the wiki and have it work.
The actual problem was to determine where the red dot has to be drawn on the minimap so that it covers the position where the player happens to be. You might think that a function called
camera.WorldToScreenPoint
would do the trick, but it doesn’t seem to take the viewport position and size of the camera into account. That alone took a while to realize. After I found that out I just needed to fiddle with the viewport values of the camera to get the projection correct.
So here’s the C# code:
using UnityEngine; using System.Collections; public class Minimap : MonoBehaviour { public Texture2D BlipTex; public GameObject Player; private void OnGUI() { var objPos = camera.WorldToViewportPoint(Player.transform.position); GUI.DrawTexture(new Rect( Screen.width * (camera.rect.x + (objPos.x*camera.rect.width)) - 2, Screen.height * (1-(camera.rect.y + (objPos.y*camera.rect.height))) - 2, 4, 4), BlipTex); } }
Make a second camera, attach the script to it. Set the camera depth to >0, projection to orthographic. Set the x-axis rotation of the camera to 90 degrees and position it above your world. Drag a texture into the BlipTex field and it should work.
Finally, after a very, very long time, I’m back into game development. I started working on a game prototype in Unity a few weeks ago and just finished my 3rd session on it. Yeah I know, this game is not going anywhere with a development pace like this, however, this is what I got so far:

So what do you see here? It’s a tilemap. With rooms and (still broken) corridors that connect the rooms. The map is generated procedurally. Ignore the graphics and the textures. These are all placeholders while I’m working on the map generator.
What kind of game is it you ask? I have no idea. I have no firm concept, just a list of urges I want to satisfy. I’m not sure how many others are working this way and if anyone managed to finish a (good) game with a methodology like this, but this is what I am doing now. I have this desire to combine elements from Nethack, Dungeon Keeper, Dwarf Fortress, The Settlers and Majesty with an Old School Arcade feeling. This list is not exhaustive and might change when I play something else that rocks my world, even if it’s only momentarily. So, I want to make a simulation where stuff is produced and minions are roaming around doing stuff to the stuff. Fights will be had. You have to manage resources, explore, design a base. Maybe. I like games where things happen without the player doing anything. I don’t know yet if this will be a 1st person, 3rd person, RTS, Tower Defense or Tycoon game. I don’t know if it will be multiplayer. I don’t know if a game session will take 10 minutes, 10 hours or 10 weeks. What I do know is that there is no game out there that feels like what I have in mind. So there, now that you know exactly where I’m going with this, let’s talk tech.
I initially wanted to make this a Flashgame with Flixl or FlashPunk, both very awesome frameworks for developing tile-based games. I evaluated both and liked what I saw. Then I looked at Unity and was immediately hooked. Multiplatform, Rapid Application Development, C# scripting (yes!), a large development community, the asset store. Wow. The time it takes to get something to screen is really short, so this is the perfect framework for prototyping, even though it’s my first project using Unity. I’m learning a lot of basics as I go and I think I’m about 6 hours in now. Feats accomplished so far:
This project has no name, yet and thus will be known as the project that has no name, yet or TPTHNNY for short which paradoxically gives it a name.
Update: Here’s a related post.
If you are trying to install iFolder Server 3.8.0.3 on Ubuntu or Fedora, you might run into problems.
I followed this manual:
http://www.chimos.de/stuff/ifolder-ubuntu.txt
Everything went fine, until I wanted to login into the admin interface. I just couldn’t get logged in. The apache server log said:
Error: Exception Object reference not set to an instance of an object. Could not initialize collection store.
Over and over again.
In /var/simias/data/simias is a file called Simias.log4net. This controls the logging output. I opened it and changed the two lines containing INFO to say DEBUG instead and lo and behold. I got proper error messages after that in /var/simias/data/simias/log.
As it turns out, Simias tries to store something to /var/www/.config and hadn’t any permission to do so. The manual I mentioned at the beginning of this article actually contains the fix, but I skipped this step due to a typo. The manual says:
If /root/.config/mono exists again (just to be sure), perform the following operation:
rm -r /var/www/.config/mono mkdir /var/www/.config mv /root/.config/mono /var/www/.config/mono chown -R www-data.www-data /var/www/.config
Well, it didn’t exist. But /root/.config/.mono existed. So I skipped this step. But after seeing the error in the log and executing
rm -r /var/www/.config/.mono mkdir /var/www/.config mv /root/.config/.mono /var/www/.config/ chown -R www-data www-data /var/www/.config
and restarting apache, it finally worked.
Yay!
The Gnome Guake console tool is really handy, since you have a command shell ready for typing at the press of a single button (F12 or F1 for example). Yakuake for KDE does the same thing, and it works a little better in one aspect: When you have the console at the top of the screen, the first line of text appears at the bottom of the console space. In Guake however, the first line of text appears at the very top of the screen.
This is not where I am used to look. Even the original Quake console starts printing from the bottom.
So what we want is this:
I didn’t find any way to configure this inside Guake, so I had to use some other means to achieve my goal: Just print some newlines when a new shell is opened. Of course, we can’t just echo some newline chars in .bashrc, otherwise everytime we open a shell or login from a tty or via ssh it would get executed, too. So we need a way to determine if the currently opening shell is inside a Guake session.
To achieve this, we take the PID of the current bash shell with $$, use ps to ask for the parent PID, and then use ps again to determine which binary image is executed with this PID. If the direct parent is python, it is likely we are running inside Guake, since it is written in python.
So, long story short – put this in your .bashrc:
# check if we are running inside guake if [ `ps -o ppid -p $$ | sed -n 2p | xargs ps -p | grep python | wc -l` -eq "1" ]; then bash -c "echo -e '\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n'" fi