How to run your Unity3D app at Windows Phone 8 Emulator in VMWare

Howdy!

Here is a quick “how to set up” notes to myself and other curious people who have no Windows Phone device on the desk:

1. PC should be compatible with HYPER-V.
Hardware requirements: 64-bit processor with Intel VT or AMD-V support. DEP, Intel XD bit (execute disable bit) or AMD NX bit (no execute bit) should be enabled.
Software requirements: Pro+ editions Win 7 / Win 8 / Win 8.1 – both guest (client) and host.
Read more: Hyper-V Overview Continue reading

Found a typo? Please, highlight it and press Shift + Enter or click here to inform me!

Share Button

Unity Asset Store and Madness Sale: my experience

Warning: this post contains full earnings details, all financial part uncovered, lot of spoilers! >:}
(feel free to skip the boring part and jump straight to the sum up numbers at the end of this post)

As you already might know, my Anti-Cheat Toolkit plugin was selected for the Asset Store May Madness Sale, which has started at May 5 and was rocking until May 16.
Before revealing any Madness Sale numbers and achievements, I’d like to make an overall retrospective of this plugin.
Please, note, all earnings will be posted in gross, net (what I get) is 70% of gross.
Continue reading

Found a typo? Please, highlight it and press Shift + Enter or click here to inform me!

Share Button

Update on my Unity3D plugins

Hey there, dear friends, subscribers and strangers passing by!
Today I’d like to tell you something about my Unity3D plugins I sell on the Unity Asset Store.

Let me begin with one plugin I didn’t introduced on my blog yet: Advanced FPS Counter!

This is a super simple and flexible way to show FPS, memory usage and some hardware info right in your app on target platform \ device.
This plugin may be really useful on the project testing phase, when you send your app to the beta testers and wish to hear from them what performance on what hardware do they have. Or if you just wish to see all these data yourself in your app running on the target device.
Anyway, I hope you’ll find it useful and helpful. And most important part – it’s almost free, currently I sell it for just five bucks (except the Nebraska)!

Another good news I’d like to tell you – latest Anti-Cheat Toolkit update finally hit Asset Store and now available for purchase!

It brings some great new features, like speed hack detection and I did fixed lot of community reported bugs and implemented some community requested features.
I also wish to let you know I’m already working on next significant update which will raise plugin’s price a bit. As you may see Anti-Cheat Toolkit went really far from what it was on its first Asset Store day, and I never changed its price since releasing it in Aug’13. I hope you see it deserves few additional bucks =)
So, I’d suggest to hurry and grab it for current low price until next update released! =P

After all, I wish to hug all people helping me to make my plugins better or supporting me in any other way. In first place I’m talking about all my friends and customers who were so kind to send me a bug report, or leave a review in Asset Store or just say me “good work” on forums. Thank you all, guys!

Special thanks and hugs fly out to my little-almost-year princess and my wife, her great mommy <3!

Found a typo? Please, highlight it and press Shift + Enter or click here to inform me!

Share Button

Types conversion in Unity3D

Hey there!
Recently I needed to store floats as integers and vice versa (used it to easily xor floats in my Anti-Cheat Toolkit) and I came across few ways of doing this.

Unsafe pointers – fastest one:

public unsafe int FloatToInt(float value)
{
	return *(int*)&value;
}

public unsafe float IntToFloat(int value)
{
	return *(float*)&value;
}

Easy, right?
Please, note, it requires /unsafe compiler option. To leverage unsafe operations in unity, you have two commonly used options to choose from:
1. Use it in a separate dll, compiled with /unsafe option.
2. Set /unsafe option right in your project using “Global Custom Defines”, putting it in .rsp file in your Assets/ root. See bottom of this page for details.
And keep in mind unsafe code is not supported in some build targets, like Web Player and Flash Player.

Unions (Explicitly layouted structs) – slower than pointers, but works in Web Player (not in Flash Player, d’oh!):

[StructLayout(LayoutKind.Explicit)]
internal struct FloatIntUnion
{
	[FieldOffset(0)]
	public float f;

	[FieldOffset(0)]
	public int i;
}

public int FloatToInt(float value)
{
	var u = new FloatIntUnion();
	u.f = value;
	return u.i;
}

public float IntToFloat(int value)
{
	var u = new FloatIntUnion();
	u.i = value;
	return u.f;
}

Pretty easy to use, safe and works on more build targets comparing to pointers.
Note [StructLayout(LayoutKind.Explicit)] attribute is used here in conjunction with [FieldOffset(*)] attribute. It allows you to set each struct field position in memory explicitly and read data stored there.

BitConverter class – pretend to be slowest:

public int FloatToInt(float value)
{
	return BitConverter.ToInt32(BitConverter.GetBytes(value), 0);
}

public float IntToFloat(int value)
{
	return BitConverter.ToSingle(BitConverter.GetBytes(value), 0);
}

Safest one though (works even in Flash Player).

I should mention there are so-called “safe pointers” in C#, used through Marshal class, but they are pretty complicated, require unmanaged memory allocations and constant control on memory at all (C# developers are usually rely on GC and do not bother on allocations), so I’ll not post Marshal review here for now, these 3 methods I described are usually enough for the types conversion.
I hop I’ll have some time to make performance tests on these methods in latest Unity 4.3 later and post results with tests sourcers here (in another blog post).

Questions? Ask in comments!

Found a typo? Please, highlight it and press Shift + Enter or click here to inform me!

Share Button

Meet Anti-Cheat Toolkit: prevent cheating easily in your Unity3D game!

Hey, dear fellows!
Today I’m glad to present you my first contribution to the Unity3D Asset Store:

Anti-Cheat Toolkit logo

Anti-Cheat Toolkit (ACT)!

This is a tiny toolkit, created to help you protect your Unity3D project from many cheaters / hackers (not from all – skilled and well-motivated person can hack anything). Current ACT version allows you to protect sensitive variables and PlayerPrefs from cheating.

Feel free to watch a small video I made to show how to cheat your game (or whatever) and how ACT allows you to prevent such cheating: http://www.youtube.com/watch?v=6–2JECbpSE

So, currently ACT allows you to keep variables safe from all kind of memory searchers (Cheat Engine, ArtMoney, etc.) and prevent your saved PlayerPrefs data from altering by any person on any platform.

Just add ACT DLL into your project and replace PlayerPrefs to PlayerPrefsObscured, sensitive int to ObscuredInt, float to ObscuredFloat, etc. and you’re done! Really :)
This is all you need to do to add some protection from cheaters to your project in no time, no any additional steps required!
For more flexibility I added custom crypto keys usage (not necessary, but feel free to use it), if you’re nerdy enough :)
ACT is very simple and intuitive to use as you can see – you shouldn’t have to know something special at all. Hope you’ll like it!

Anti-Cheat Toolkit at:
Own ACT plugin page
Unity Forum
Asset Store

GIVEAWAY IS ENDED, SORRY :P  

PS: I wish to say special thanks to Daniele Giardini for great logos and all priceless feedback he provided about ACT!
And I’d like to let you know about some must-have Unity3D content Daniele created, like tweening engine HOTween or “Swiss knife” panel HOTools, and you definitely should check out Goscurry – super fun, creative and addictive game!

Found a typo? Please, highlight it and press Shift + Enter or click here to inform me!

Share Button