purplelilgirl

makes games & other things

3 notes

Unity 3D Game Development by Example Video Review

Unity 3D Game Development by Example is a Video lecture by Adam Maxwell (Packt has videos now, apparently).

It has 8 sections, each around 20 minutes, which covers the basics of Unity 3D game engine.

The author or narrator explains everything from the very basic things, such as how Unity’s user interface looks like, where to find everything, to more complex things like how to write scripts, how to make Title screens and Menus, how to save and load data for your games through examples.

The narration is paired with “slides” that in bullet points or diagrams that help explain some topics. And of course, the video also demonstrates concepts using the game engine itself, so it’s easy for listeners to follow and understand.

The narration for me though, is a little flat, but it’s still better than reading books, and simply following through screenshots.

For beginners, I think this video lecture is a good place to start. But people who are already familiar with Unity, this video doesn’t offer much more.

You can check out the video lecture on Packt’s website or check out some sample sections on YouTube.

Filed under unity game engine packt video lecture

1 note

Indie Speed Run 2013: “From Strawberry” Dev Post

Indie Speed Run is like a game jam, but slightly different, because one, you don’t have to be at a physical location (which is great, so at least you get to sleep in your own bed, if ever, between breaks) and it has a theme and an element that you need to incorporate into your game.

This is my second year doing Indie Speed Run, last year was my first (also my first ever game jam). Instead of grouping with my friends who were in the Philippines and working together virtually through Google Hangouts like I did last year, I decided to group up with my sisters instead, and we worked on the game together from our apartment. I’m just lucky to be a programmer that have 2 sisters who are artists.

We happened to have a four day weekend, because of the Mid Autumn Festival (it’s a Chinese holiday, where people eat moon cakes, when we were younger, we called it Moon Cake Festival).

image

In case anyone is wondering, these are moon cakes, we had a lot of them, and no, they are not shaped like the moon (no idea why).

So picked the middle of that weekend to do our game jam.

Before we started the game jam we already decided that we want to do something with real world objects, and its going to be a puzzle game. My sister suggested that we can have an entire game set in a box.

The Dream Machine had a scene where there is a box, and there are a bunch of stuff in it, like books and other indie game cameos, and you need to find a letter, and that’s like part of the puzzle. We wanted to do something like that.

image

Screenshot from The Dream Machine

Another thing we decided is that we wanted to do something that looks different from other indie games (the usual darker theme and visual style).

We wanted something that is bright and colorful, and filtered (as in Instagram filters). We were joking that we want to create a hipster looking game, with all sorts of hipster accessories thrown into the box, like pixel glasses, moustache rings, polaroids etc. I even made a mood board.

image

Pictures found from all over the Internet

And then its just press the Go button and see what theme and element will be, and ultimately decide how our game’s gonna be.

image

With our This is Sewius duck, Duckles

image

Our  theme is Symmetry, while our element is Corgi.

The good thing about Indie Speed Run is that the theme and element are pretty much open to interpretation. There are a few definitions of symmetry, and we decided to go for:

A relationship of characteristic correspondence, equivalence, or identity among constituents of an entity or between different entities, such as: “the narrative symmetry of the novel”.

So in terms of the game play, we decided to do a matching game. but instead of matching similar objects (like cards, etc.) we decided to match different kinds of objects to letters or notes that contain, at times, very vague descriptions of them, since from the definition of “symmetry”, “identity between different entities”.

And then we had to incorporate the element corgi in it, and that part is pretty easy, because we love corgis (or at least we started liking corgis after they made that cameo in that Olympics video).

So since we wanted to make a game with real world objects, the first step is to scrounge our apartment and find and assemble our box with quirky and interesting objects.

image

We have a lot of quirky objectsCan you name and identify all of them? (You’d have to in our game)

And then the next step is to take pictures of all our objects.

image

My little sis’ camera setup.

We also took pictures of notes and letters.

image

And then my big sis was charged with turning them into textured 3D objects.

There were a lot of objects and notes…

And then my lil sis and I wrote out the story in the form of notes and letters.

image

My lil sis’ pink desktop

We watched “The Bling Ring”, and it influenced us a lot in terms of “writing” (we like to think we actually don’t talk like that). You’ll understand what I’m talking about once you played our game.

And then my job is to throw everything into our game engine, Unity.

image

Our real world objects’ textured 3D models in engine

And to get the filtered effect we wanted, I used Color Correction Curves and Screen Overlay Image Effects. I’m biased, but really it makes everything look so much better.

image

Filtered in engine

Albeit a little like pink cotton candy.

And then we needed some background music. Originally, we wanted to just record ambient noise from our balcony, but it was raining, and rain just doesn’t go well with our pink cotton candy.

Thankfully, my lil sis can play the ukelele.

image

Unfortunately, she can only compose eerie sounding music.

But we used it anyway. She recorded it officially with my iPhone’s Voice Memo Recorder in our bathroom.

And then that’s pretty much it.

Our game is called “From Strawberry”, it is a story-based puzzle game, set in letters and curios.

Icon followed by some screenies:

image

image

image

image

Indie Speed Run Free Play starts October 7, so go try out and rate our game: http://www.escapistmagazine.com/content/indie-speed-run/?game=417

Please and thank you!

Filed under indie speed run game jam post mortem game development unity hipster indie game

1 note

I am writing for a new blog with one of my friends, it’s called The Venerer, and it’s going to be all about Film.TV.Music.Tech.Style.People. 
Also I’m in charge of the Tech section, so I’ll be writing about what I know best, which is apps, and some casual games, so developers, if you have any app or game that you’d like me to try out and review, just message me.
So… please check it out! Also please follow us on Facebook and Twitter. Please and thank you.
Link: http://www.thevenerer.com/
Facebook: https://www.facebook.com/thevenerer
Twitter: https://twitter.com/TheVenerer
 

I am writing for a new blog with one of my friends, it’s called The Venerer, and it’s going to be all about Film.TV.Music.Tech.Style.People.

Also I’m in charge of the Tech section, so I’ll be writing about what I know best, which is apps, and some casual games, so developers, if you have any app or game that you’d like me to try out and review, just message me.


So… please check it out! Also please follow us on Facebook and Twitter. Please and thank you.

Link: http://www.thevenerer.com/

Facebook: https://www.facebook.com/thevenerer

Twitter: https://twitter.com/TheVenerer

 

Filed under blog the venerer reviews

0 notes

Code Bit: How to use JNI in Cocos2dx Android?

Thank you, Bojun for helping me understand all this :)

You can first read up the Cocos2dx documentation on this: http://www.cocos2d-x.org/projects/cocos2d-x/wiki/How_to_use_jni

Basically JNI is this thing that allows you to call Java code from C++ and vice versa.

I’m gonna post a very round about code that I think shows how to do it both ways.

First off, in Java (my class name is sample.java), I have two additional methods:

public static native void printSomething();

public static void printSomethingFromJava()
{    printSomething();
}

The printSomething method corresponds to a method in my C++, while printSomethingFromJava is a method that is called from my C++.

So far so good?

And then in C++ (HelloWorld.cpp), I have the method that corresponds to the printSomething method in Java:

void Java_com_purple_sample_sample_printSomething(JNIEnv *env, jobject obj)
{    CCNotificationCenter::sharedNotificationCenter()->postNotification(“printSomethingInCPP”, NULL);
}

Basically, when you call printSomething in sample.java, this method is called.

So there, we can call a method in C++ from Java.

Notice the CCNotification (thank you so much, Bojun for teaching me this). Since I can’t call anything in HelloWorld, because it’s not part of the scene, I need to use CCNotification to call any methods from Hello World.

In order for a CCNotification to be called you need to add an observer first, so somewhere in HelloWorld’s init method:

CCNotificationCenter::sharedNotificationCenter()->addObserver(this, callfuncO_selector(HelloWorld::printSomethingInCPP), “printSomething”, NULL);

printSomethingCPP is a method in HelloWorld that essentially adds a CCLabel to our scene:

void HelloWorld::printSomethingInCPP()
{    CCLabelTTF* pLabel = CCLabelTTF::create(“Hello World”, “Thonburi”, 34);

    // ask director the window size
    CCSize size = CCDirector::sharedDirector()->getWinSize();

    // position the label on the center of the screen
    pLabel->setPosition( ccp(size.width / 2, size.height/2) );

    // add the label as a child to this layer
    this->addChild(pLabel);
}

Still following?

So now, we can call a method in C++ from Java, and we use CCNotification to call another method that’s in the HelloWorld scene.

Next up! Calling a Java method from C++.

Remember the printSomethingFromJava method? That is a method that we will call from our C++.

So in C++, I created a method named printSomethingFromJava, and it contains some of these:

void HelloWorld::printSomethingFromJava()
{    JniMethodInfo t;
    if(JniHelper::getStaticMethodInfo(t, “com/purple/sample/sample”, “printSomethingFromJava”, “()V”))
    {    t.env->CallStaticVoidMethod(t.classID, t.methodID);
        // delete reference
        t.env->DeleteLocalRef(t.classID);
    }
}

Now, this code is what calls the printSomethingFromJava method in Java.

I call the printSomethingFromJava method in HelloWorld.cpp in its init method, somewhere after the CCNotificaton Add Observer.

This blog has a list of methods, return calls etc. for Android JNI: http://blog.csdn.net/lizhiguo0532/article/details/7219357.

Okay, so it’s a little confusing, basically what my code does is, HelloWorld (C++) calls a method in sample (java), and sample (java) then calls a method in HelloWorld (C++).

Why do I do this? It’s just an exercise that was pretty helpful for me (I think) to understand the confusing thing that is JNI.


*bows*

Filed under android JNI cocos2dx cpp c++ java