Tuesday, December 20, 2011

Backup Tool for Unity non-Pro, Areca Backup For Mac

I found this nifty tool called Areca Backup that does differential/incremental backups. I haven't used it extensively yet, but I'm hoping it plays nicer with Unity non-Pro than SVN does. It doesn't keep metadata on each folder like SVN, so it won't mess up if Unity messes with the file organization.

But because of that, it can't track changes between file moves. It can't even track changes anymore if you rename the file. But the old unrenamed file is still there in the old backup entries, so if you need to get back to it you can do so.

This is slightly better than the manual method of zipping up your project everytime you want a new backup. A version control system is the most ideal but we all know its not possible with Untiy non-Pro.

https://sourceforge.net/projects/areca/

I did some few fixes to have it running on Macs: http://dl.dropbox.com/u/25260770/Areca/Areca-7.2.3.dmg

Its not perfect, it may hang when you try to exit it. But I've tested it and backing up does work properly.


At first, the backing up didn't work. It turns out the exceptions stem from the fact that Mac and Linux have different ways of showing the output of ls.

In DefaultMetaDataAccessor.java, ls -ald1 seems to print the file without any info (filenames only). I had to change it to ls -ald. Furthermore, Mac's ls prints out a file size total as its first output, so I needed to skip that if found.

There are further problems with the way the output of ls is handled. Mac's ls puts an @ sign when the file has extended attributes (ACL, etc.) and that needed to be taken into account.

Currently the program may hang when you unselect an entry at the leftmost list.

I get this:


java.lang.NullPointerException
 at com.application.areca.launcher.gui.composites.TargetTreeComposite.handleEvent(Unknown Source)
 at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
 at org.eclipse.swt.widgets.Display.sendEvent(Unknown Source)
 at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
 at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
 at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
 at org.eclipse.swt.widgets.Widget.notifyListeners(Unknown Source)
 at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
 at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
 at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
 at org.eclipse.jface.window.Window.open(Window.java:796)
 at com.application.areca.launcher.gui.MainWindow.show(Unknown Source)
 at com.application.areca.launcher.gui.Application.show(Unknown Source)
 at com.application.areca.launcher.gui.Launcher.launchImpl(Unknown Source)
 at com.myJava.system.AbstractLauncher.launch(Unknown Source)
 at com.application.areca.launcher.gui.Launcher.main(Unknown Source)
11-12-20 22:09 - ERROR
java.lang.NullPointerException
 at com.application.areca.launcher.gui.composites.TargetTreeComposite.handleEvent(Unknown Source)
 at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
 at org.eclipse.swt.widgets.Display.sendEvent(Unknown Source)
 at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
 at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
 at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
 at org.eclipse.swt.widgets.Widget.notifyListeners(Unknown Source)
 at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
 at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
 at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
 at org.eclipse.jface.window.Window.open(Window.java:796)
 at com.application.areca.launcher.gui.MainWindow.show(Unknown Source)
 at com.application.areca.launcher.gui.Application.show(Unknown Source)
 at com.application.areca.launcher.gui.Launcher.launchImpl(Unknown Source)
 at com.myJava.system.AbstractLauncher.launch(Unknown Source)
 at com.application.areca.launcher.gui.Launcher.main(Unknown Source)

Source code: http://dl.dropbox.com/u/25260770/Areca/areca-7.2.3-mac-src.zip

Monday, December 19, 2011

Collaborative Diffusion/Influence Maps For Obstacle Avoidance

There was in the Unity forums, a post asking about how to implement flanking behaviour obstacle avoidance. I took interest because I've been wondering how to do that also.

Another user posted a link to a page explaining Collaborative Diffusion. From what I understand, its like influence maps, but once an agent passes through a node, that node's influence becomes zero, signifying its impassable now that he's there.


So I tried implementing it in Unity here: http://dl.dropbox.com/u/25260770/PathfindingTest/WebPlayer.html (you'll need to install the Unity plugin for your browser).

Left click to set the new attraction point or whatever its supposed to be called.

I'm pretty sure some of my code is a bit naive. Its only in certain situations do the agents will exhibit flanking behaviour. Some agents end up stuck, and I don't like the bee-like zig-zag movement they make.

Also I think it would be better to couple this with typical A*, such that, the path created by the A*, the area of the influence map that that path takes up, will be set to zero influence. Its as if the agent will be saying "to my allies, this is the path I'll take, don't cross it, its mine only. find your own path".

Angry Birds

I overheard my father talking about how he's appreciating playing a game. I'm surprised my father is starting to understand the depth of fun and strategy to be had in playing a video game. I'm more surprised that the game he mentioned was Angry Birds.

I never payed much attention to Angry Birds because I find the basic premise of the game mechanics boring. But after overhearing my father I figured there is much thought and depth that the developers added to the game. More than what I would have considered at first draft of a design document.

It turns out each bird has special abilities. There's one that can dive, one that drops eggs as bombs, one that speeds up, and probably a bunch of other stuff that I don't know. Each bird's ability is useful in a certain situation. The blue one is suited to breaking ice as I heard. Its not simply "this bird does 25% more damage on ice objects". Its with the fact that it breaks up into three smaller birds (not sure why) and you'd have an easier time shattering through multiple layers of ice that way.

Contrast that with the last game I've released, Zombie Fields, and Angry Birds is looking like its got more strategical depth in it, disguised in a veneer of the visuals of a kid's story book.

Tuesday, September 6, 2011

About Me

I made a forum post in Unity 3d which had me going on how I started in the game industry. Here it is:
______________________________________________


Where are you coming from?

I've always wanted to make videogames ever since I was a kid seeing one for the first time when my brother showed me. Ever since, I've studied what it took to make a game so I got into programming and 3d art.

As a child, I've shown a natural inclination in art, but I also persevered with programming, and I'd say it paid off.

I would usually learn a programming language earlier than my peers in school, only to find out that what I studied was too advanced for my expected level. I remember being a freshman in highschool when two seniors were at awe when I started writing private variables and public functions in C++.

My very first game was a turn-based RPG combat in QBASIC, which I threw away because I thought it sucked. I regret doing that.

I've dabbled in other stuff over the years: sketching, 3d art, graphic design, Flash and web programming.

Game development is a very risky proposition here in my country as its not as established as other fields like advertising or information technology. Nevertheless, I always jump on the chance to go into game development because its what I love to do, stable jobs be damned.

My very first major project was an online game with Torque, and it was quite stressful being the only programmer in the team. I worked there for two years and eventually left from burnout. There was a point when I questioned myself and didn't want to do programming anymore (I thought about being a novelist), but that's all water under the bridge now. As a compromise, I'm making a videogame where I'm also writing the story.

Now I work in a start-up company making videogames hoping to establish ourselves in the local industry.

I'm also active in the Unity developer community sharing code in the wiki and forums. You can find me hanging out in the Unity IRC chat channel occasionally as AnomalusUndrdog.



Which languages are you working with in Unity?

I come from C++, so C# was a no-brainer to me, after finding out the equivalents to the STL data structures and whatnot.



What do you enjoy about using these languages in Unity?

Its what I'm used to, and no more need for pointers.



What do you find annoying?

Mostly not the language but the IDE, MonoDevelop is a weird one, double-clicking on an error doesn't focus the MonoDevelop window, its slow, and crashes sometimes. So I use Notepad++ when on a Windows machine and Unitron on Mac.

I'm mostly vexed with the fact that I can't afford Unity Pro for the foreseeable future. This has me tempted to try out UDK.

Monday, August 15, 2011

Blending Problems

So I got these indicators to know when a unit is selected or where he's going to move:


Its a projector, its not the fastest, but it looks good. Its blend equation is set right now to multiply. That's fine but:


Multiply darkens the blend, making it hard to see in dark places. So, I try an additive blend:


So that looks better. Only it does the opposite: in bright areas, its hard to see:


More so in very bright areas:


So in the end, I am forced to use a normal alpha-blend equation. It looks plain, but is sure to be visible in both bright and dark areas:



Unfortunately, you can't emulate the blend types in Photoshop like Overlay, because blending equations in videocards are fixed-function.

Here's the Unity shaderlab code for alpha-blended projectors:

Shader "Projector/Diffuse" {
	Properties {
		_Color ("Main Color", Color) = (1,1,1,1)
		_ShadowTex ("Cookie", 2D) = "" { TexGen ObjectLinear }
	}
	Subshader {
		Tags { "RenderType"="Transparent"  "Queue"="Transparent"}
		Pass {

			ZWrite off
			Fog { Color (0, 0, 0) }
			Color [_Color]
			ColorMask RGB
			Offset -1, -1

			Blend SrcAlpha OneMinusSrcAlpha

CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma fragmentoption ARB_fog_exp2
#pragma fragmentoption ARB_precision_hint_fastest

#include "UnityCG.cginc"

sampler2D _ShadowTex;
float4x4 _Projector;
fixed4 _Color;

struct v2f {
	float4 vertex : SV_POSITION;
	float4 texcoord : TEXCOORD0;
};

v2f vert (appdata_tan v)
{
	v2f o;
	o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
	o.texcoord = mul(_Projector, v.vertex);
	return o;
}

half4 frag (v2f i) : COLOR
{
	return tex2Dproj(_ShadowTex, UNITY_PROJ_COORD(i.texcoord)) * _Color;
}
ENDCG
		}
	}
}

Wednesday, August 10, 2011

MeleeWeaponTrail: Another Unity Asset Store Submission

This is my second Unity Asset Store submission, a weapon trail effect for your character attacks. Props go to Forest Johnson (Yoggy) and xyber for the original code.



You can find the wiki page here: http://unifycommunity.com/wiki/index.php?title=MeleeWeaponTrail

UPDATE: Asset Store submission accepted! http://u3d.as/content/anomalous-underdog/melee-weapon-trail/2ck

Web build demo here: http://dl.dropbox.com/u/25260770/MeleeWeaponTrailDemo/WebPlayer.html

Tuesday, June 14, 2011

Funny



I hardly go out.

During the times that I go out, things hardly happen.

Today something happened.

I went out today to buy some PS3 games, and, funny thing, there's this person at the store, looks about at least 20 years old, and keeps on talking about American McGee's Alice.

He kept on asking questions and making conversation with anyone within his reach. What's up with this guy? From the way he speaks, you could tell he's not quite right in the mind, but well enough that he can go to a store by himself, and have his own cellphone. You can imagine that creates some problems everywhere he goes.

Eventually he reaches me, then goes on to say about American McGee, then about Suda51, about the origin of the 51 in his name, then about how its the same with how the word Konami came out to be. I'm mildly surprised Madness Returns came out already; I hadn't checked the release date at all.

He picks a copy of Duke Nukem Forever, goes on about the fact that it was 15 years in the making, "close to 20" he says. Talks about how the game's different: Duke, he's not eeemmo, he says, because the aliens took his... his girls.. he's fighting for his... uhuh pleasure, yeahhh.

He was obviously recounting what he heard in the developer interviews (I know, I saw those too). In that brief moment it made me think about what I'm making. I had better make sure Garwolf is a well-rounded character and I hope he won't be labeled "emo".

Because labels are dicks.

Even while I was finishing my purchase at the cashier he was still going at it. Me and the store people smile knowingly. Oh boy, we thought.

I do my best in not being a dick and even engage in conversation a few times; I was surprised Suda51 worked on an EA game, though I think he didn't get that I meant that.

Out of that guy's hearing, the store guy talks about how that person actually went through all of the store's branches, and that he even punched another person once, supposedly trying to recreate some scene in a game. Oops.

Walking home I thought, I'm just as much as a loser as that guy. The only difference is, his ignorance is his bliss.

Tuesday, April 5, 2011

Tuesday, March 29, 2011

All In

I did not feel inspired, I felt driven. I have to finish this. I'll shell my own money if I have to (don't have a credit card though). I need to do this. Time is running short.

Few days earlier I was trolled on the Internet. It distressed me. Now I feel confused. A mixed bag of emotions.

This time again I feel the urgency to complete a purpose larger than myself.

Wednesday, March 16, 2011

Adventures in Open Source

Ok, this sucky svn client I have on the Mac doesn't support the file:// protocol. I bet there's an open-source svn front-end just for me!
Last login: Wed Mar 16 21:50:05 on ttys000
mac:~ user$ sudo port install kdesvn
---> Computing dependencies for kdesvn
---> Dependencies to be installed: automoc cmake qt4-mac libmng lcms kdebase4-runtime bison exiv2 hicolor-icon-theme kdelibs4 aspell texinfo xz aspell-dict-en attica phonon avahi dbus-python26 dbus-glib py26-gobject libffi python26 libdaemon libglade2 py26-gtk py26-cairo py26-numpy atlas gcc44 gmp mpfr gzip fftw-3 py26-nose py26-distribute py26-py cyrus-sasl2 dbusmenu-qt qjson enchant hunspell flex giflib gmake grantlee kerberos5 gnupg libusb-compat libusb libart_lgpl liblzma openexr ilmbase gsed pcre qca shared-desktop-ontologies soprano clucene libiodbc redland raptor rasqal strigi virtuoso gawk libssh openslp oxygen-icons qimageblitz subversion apr apr-util neon serf
Wait, don't install GTK, I just want kdesvn! Surely that doesn't use GTK? Opeen Soooouuuuuurce!!!!

Its like I'm really in Linux!

Tuesday, March 15, 2011

Stuff: A news aggregator in 3d

http://anomalousunderdog.herobo.com/Unity/Stuff/

A work-in-progress 3d RSS reader, similar to the RSS Visualizer in Mac OS X. More than this, its planned to also slideshow showing Twitter tweets, time of day for different countries, images from a folder/website (demotivational posters, wallpapers, etc.), text from a folder/website (word of the day, etc.), weather data, and even perhaps video podcasts.

I originally envisioned this to be displayed in a large LCD screen in our office.

Thursday, March 10, 2011

HHHhUUUUuRRRrrrRRrrRRRRR! A RECKLESS DISREGARD FOR POLYCOUNT


"I'd check it out, but I have to install some shitty plugin. 0/10."
- Anon

Your framerate is your life. In HHHhUUUUuRRRrrrRRrrRRRRR, you fight badly created 3d models in a never-ending effort to bring your framerates to an acceptable value.

HHHhUUUUuRRRrrrRRrrRRRRR is a non-work project I'm making in my free-time. Only a work-in-progress main menu intro animation has been uploaded so far. Check it out here: http://anomalousunderdog.herobo.com/Unity/Hurrr/

Monday, March 7, 2011

Back To The Oct 29 2099

Check it out, my first try at uploading something to the Unity Asset Store. Its pending review but here it shows the preview of what it'll look like back... to the future!



UPDATE: Here's the link: http://u3d.as/content/anomalous-underdog/unity-lua-interface-library/1AY

Saturday, February 26, 2011

Random Random Word Generator updated!

Its now called Random Name Generator to make it more specific.

Method 3 is added, making a word that follows some rules based on the last letter chosen.

Recently I got "Narlet", which I think is a very good female name.

http://anomalousunderdog.herobo.com/RandomWord/

Friday, February 25, 2011

Random Random Word Generator

I made a random word generator a very long time ago when I was a kid.

The first one was made in Visual Basic 6, now I made a new one as a web page, also using this opportunity to learn jQuery and jQuery UI.

Its going to spout out nonsensical words that likely don't exist in any language (however, just now I got the word "Sayako" which I think is a Japanese name). I used it to help me make up names for my stories.

Method 1 generates a word out of all English letters without any pattern. Method 2 tries to be more refined by alternating between a consonant and a vowel when choosing letters.

A little story: One time in the first version of this program, I just kept on clicking the Generate button rapidly and it spewed this sequence of words:
(a bunch of random words)
I
AM
(then a bunch of random words)

Did my computer gain sentience, or was God talking to me?

Give it a try: http://anomalousunderdog.herobo.com/RandomWord/

Wednesday, February 16, 2011

PS3 Trophy Cards

Had a bit of fun looking for pictures to use for PS3 trophy cards. You can use these on ps3trophies.com. Use this link to join and get your own trophy card.

405x120:









348x126:





Sunday, February 13, 2011

I don't always get doubles, but when I do, check 'em

So I tried downloading Fist of the North Star demo on PSN. After I chose Download in Background, it put me back to the cart list with the option to download that same game still available.

Baffled, I thought the initial download request didn't work so I chose to download it again. Still the same, so I quit PSN Store and looked at my download queue.


What the flying fuck is this? There's an option to pause a download but no option to delete it as far as I can see.

EDIT: Ok, turns out "Cancel" aborts the download, and not cancel as in exit from the options menu.

What is a Mac? *throws glass* A miserable little pile of secrets!

To this day, I don't think she got the reference.


So I wonder, will I ever meet a girl gamer who understands me? But enough talk, have at you!





Friday, February 11, 2011

Dependency Hell

Last login: Fri Feb 11 01:20:48 on ttys000
mac:~ user$ sudo port install libusb-devel +universal
--->  Computing dependencies for libusb-devel
--->  Dependencies to be installed: autoconf help2man gettext expat libiconv gperf ncurses ncursesw p5-locale-gettext perl5 perl5.8 m4 automake git-core curl curl-ca-bundle libidn openssl zlib pkgconfig p5-error python27 bzip2 db46 gdbm readline sqlite3 rsync popt libtool

You need all this shit just to get a usb library working? Opeen Soooouuuuuurce!!!!

Its like I'm really in Linux!

Tuesday, February 8, 2011

AssetBooruCh

Somewhere along the way we discussed the need to better organize our 3d models, reference images, concept sketches, fonts, music, and sound effects in the office.

This reminded me of ResourceSpace. I tried it out on a local dev test site.

I have to say, its meant by default for graphic design, web design and those areas. Properties like Country or Camera Model are useless to textures, while you need more information for 3d models, such as polygon count.

I set out planning a different digital asset management tool that would work for us.

Meanwhile, people in the ResourceSpace Google groups explained that thankfully you can add new resource types and change properties of existing ones. Seems like I may use ResourceSpace after all.

However, my plans started diverting from ResourceSpace and I really thought I should look into it more:

  • Upload any kind of file. Plugins are made to handle a specific asset type, like images, 3d models, textures, fonts, etc. 3d models show interactive thumbnails, videos have streaming flash video previews, and fonts can be previewed interactively (edit the text that is displaying the font).
  • Danbooru-style tag-based organization. Assets are tagged and a sophisticated search system can be used to search assets based on its tags and properties.
  • Imageboard based commenting system. Comments can be quoted, replied upon, with images and links properly parsed.
  • Voting system. Assets can be rated from 0 to 5. Using the search system mentioned above, its easy to find popularity trends of certain assets. Comments can be voted up or down. Upvoted comments appear at the top while downvoted comments are hidden by default.
  • AJAX. Most user operations do not require reloading the page. Search result pages are loaded without needing to refresh the page, similar to Google Images. Inputting values for tags give suggestions based on the word currently being typed.
  • History graphs. Show history graphs of changing values like number of times an asset was viewed, average rating of an asset, number of comments to an asset, etc.
  • Bookmark search results or subscribe to them as RSS feeds so you can be notified of any changes.
I shall therefore call it AssetBooruCh, and I'm looking at releasing it as an open source project.

Sunday, January 30, 2011

I am not your mom

Jan 30 17:49:32 <Tayfe> AnomalusUndrdog: mom, maybe i found the problem...
Jan 30 17:49:51 <AnomalusUndrdog> I am not your mom
Jan 30 17:50:03 <VILE> lol
Jan 30 17:51:04 <Tayfe> AnomalusUndrdog: mom - one moment pls^^
Jan 30 17:51:19 <AnomalusUndrdog> I am not even female
Jan 30 17:51:36 <Tayfe> AnomalusUndrdog: maybe it's a problem that i use the same code on the car, too?

Oh IRC chat, you so crazy.

Join in the fun: #unity3d in freenode.

In other news, from the same IRC chat, I just learned about partial classes. A way to split your class definition into separate files, which is what I did back in C++ Torque days as my classes get to be too big. In most situations, this is doing it wrong, because classes getting big is a sign that I'm putting too much functionality in one place and I should separate distinct functionalities into separate classes in the first place.