Categories
Game Development PC Nerding

Odd

This script works well while in Unity Editor
GameObject obj = new GameObject("MyObject");
MyScript s = obj.AddComponent();
s.MethodThatInstantiateSomething("argument");

But when calling it in a Android APK it return a Null Pointer Reference error when calling MethodThatInstantiateSomething, at the line where Instantiate() is called.

Odd.

Categories
Uncategorized

Make clean readable code…

…and, in case you can’t, comment it well.

Just a quick note for myself. I was reading an old code I used in a prototype, I know what the script does but I really cannot figure how to actually use it in my new game, how it does what it does or how I could improve it. I guess I’ll have to waste time by building again the same stuff, perhaps this time with a cleaner code and comments explaining stuff.

Categories
Uncategorized

Corridors and multiple floor maps

MapGen I’m still working on this map generator, a project absolutely bigger than my programming knowledge, but I’m actuallly enjoying it. It now features different level shapes, multiple floor generation and corridors (printed in green in the demo). I didn’t add a way to explore different floor, so only the topmost one will be shown. As you can see in most maps the corridors are pretty lame.

It needs some more features, like stairs connecting the floors and a better corridor placement script.
You can find the new version here.