Posts Tagged ‘unity2d’

QWER: Making a pixel game in Unity

Posted by
Sunday, May 8th, 2016 8:59 am

Howdy! This is my first post on LD and I thought it would be cool to share what I learned making QWER, my game jam entry for both LD35 and LowRezJam2016.

First of all, feel free to give it a go and rate it if you haven’t yet ūüėČ

Play QWER

Submitting for 2 jams at the same time meant respecting both the theme from LD35 (ShapeShift) and LowRezJam’s rules.

Here’s a summary of the main¬†rules:

  1. Resolution should be 64×64. This means that the game can only have 4096 (64×64) pixels on screen but does not limit your viewport to be 64×64. For example, QWER uses a default viewport size¬†of 640×640 but as each pixel is rendered as 10×10 onscreen, the game resolution is still 64×64.
  2. No inter-pixel movement.¬†This means that objects in the game are not allowed to move in increments lower than 1 pixel. In context of Unity’s transform component, the x,y,z of an object’s position cannot have decimals. (E.g: transform.position.x=10.4 is not allowed)

 

Taking those rules into account, here’s some¬†tips for making a pixel game in Unity:

  1. Camera Setup
    QWER Camera SettingsFirst at all we have to set the Camera Projection to Orthographic, this is because the game does not require depth and is 2D. The other thing to set is Camera Size. In Unity, an orthographic camera size is defined by the height in pixels from the centre of the viewport to the top. Since our game is 64×64, the camera size (also interpreted as half the height) is 32.
  2. The Grid
    QWER The GridThat one is more of a personal preference thing. I have an empty GameObject called ‘Grid’ under which all other objects in the scene are nested. Notice as well that the Grid’s x and y positions are both -32. What this achieves is that all the nested objects’ ‘localPosition’ values will range from 0-64, 0 being left(x) and bottom(y) and 64 being right(x) and top(y). This makes it easier (for me at least) to deal with¬†object positions compared to (-32 to 32).
  3. Importing Sprites
    QWER Dot Import
    The important settings here are Pixel per Unit and Filter Mode.
    By using a Pixel per Unit value of 1, we make sure that whatever sprite we import will display at exactly the same size as the original. E.g: A 10×10 sprite will display as exactly 10×10 in the game.
    Unity’s default Filter Mode is Bilinear, which smoothes out edges. Since all our sprites are gonna be low rez, the smoothing effect will blur them out. Setting Filter Mode to Point makes sure the¬†sprites willl look sharp.
    Point:
    QWER Point FilterBilinear:
    QWER Bilinear Filter
  4. Pixel Movement
    Here’s a screenshot of the Pixel Movement Code. Code can also be found¬†here.
    Pixel Movement CodeFirst of all I’d like to say that this is not the most optimized code, but for a small game like QWER, it does the job. This script is basically a base class from which GameObjects that need to move should inherit from. What is does is internally¬†increment the values of x and y positions depending on the speed provided BUT only move the GameObject on screen when the new position reached a new integer.E.g:¬†An object at position x=0 is meant to move 0.4 pixels right¬†each second.
    Second 1: Internal x = 0 + 0.4 = 0.4, Onscreen x = 0
    Second 2: Internal x = 0.4 + 0.4 = 0.8, Onscreen x = 0
    Second 3: Internal x = 0.8 + 0.4 = 1.2, Onscreen x = 1That way, we make sure that we abide to rule #2 which is No inter-pixel movement while still allowing for all kinds of¬†move speed values.A Vector4 is passed in as parameter where x,y,z make up the position of the target and w is for the speed. Here’s an example of how it is called from a derived class: QWER Derived Code Annotation

 

That’s about it. Hope some of you guys got something useful out of this. If you wanna know more, the source code for QWER is available here. If you have any questions,comments or suggestions, you can reply on this¬†post or contact me on Twitter¬†@Orukinawa

Wasteful Revenge is finished!

Posted by (twitter: @sourtrance)
Sunday, December 13th, 2015 8:42 pm

Hey, you! Do you like wasting food? No? Well, that’s okay, because in Wasteful Revenge, you only waste virtual food.

In this game, you play as a humiliated farmer seeking revenge the farmer’s way: by growing food and shooting it at people. This was my first “real” Ludum Dare event and it was very fun! I’m looking forward to reading your feedback.

Shooting

Intergalactic Pong – MiniLD 58 Entry

Posted by (twitter: @xanjos)
Saturday, March 28th, 2015 7:19 am

Just submitted my entry for MiniLD 58 (Intergalactic Pong) last night.

Same rules as regular pong except everything is now set in space and the ball is now an asteroid and there are planets that can pull the ball in and also the ball can wrap around the screen because space.

Click the pic to play!!

Click the pic to play!!

First update – a game about a prison’s market

Posted by
Sunday, December 7th, 2014 7:54 am

This is the first update of our game for Ludum Dare 31. We are a team of students from ENJMIN (France) with the help of a young Peruvian artist.

In short, it’s a game about the internal market of a prison, where you¬†can get access to different items with the help of some guards. Then, you can sell those items¬†for money. We use a top-down view for seeing everything that happens on the prison.

Take a look at our main character.

 

Image and video hosting by TinyPic

We are applying the theme of the jam for making a fast-paced game in one screen, where you will need to be cautious so other guards won’t see you. The game is being developed in Unity 2D and we are also working very hard on the sound assets and voice acting.¬†Expect more updates on our game soon!

I’m in #9

Posted by
Wednesday, August 20th, 2014 12:18 pm

For the last two Ludum Dares, the themes have been really uninspiring and I was feeling overworked and tired before the compos. Not completing them I realized that change was needed. So we decided to take a vacation and then come back and completely change what we were using to create games in for the last 3 years. As much as I’m worried about Unity’s domination over the market in the future, I gave in to its overpowered awesomeness. I don’t regret it.

My History with Ludum Dare
LD 22: Didn’t complete a game but turned it in anyways.
LD 23: Hard to track down bug killed the game 8-hours before the end of the jam.
LD 24: Did as much as LD 22.
LD 25: Finally finished a game first time. Both in the LD and ever.
LD 26: Finished second game ever and by myself in the 2-day time squeeze.
LD 27: Was really sick the whole compo. Didn’t finish (because I slept too much), but made the most complex game mechanics I’ve ever made.
LD 28/29: Cancelled both for reasons of being uninspired (believe me, 4 hours into LD29 we went, “crap, this game is terrible”)…

The goal set forth for this Ludum Dare is to create something “simple” since I’ve only been using Unity for a handful of weeks…or in general to just create something which hasn’t happened for 2 LDs. It will happen, there’s high energy this time around (and pizza!).

What we’re using!
Engine: Unity (2D)
Programming Language(s): C# / JS(Unity)
Editor(s): Visual Studio 2010, Notepad++, Sublime Text
Graphic: Graphics Gale, Photoshop
Sound Effects and Music: bfxr, Soundation, FL Studio, or public domain music/sounds
Library/Framework: Unity 2D, Toolkit2D

Near the end, updated!

Posted by (twitter: @Haite)
Sunday, December 29th, 2013 2:21 pm

Hi guys!

Near to the end of the Ludum Dare 28 I had updated my entry, which you can play it here http://www.ludumdare.com/compo/ludum-dare-28/?action=preview&uid=11311

Remember to play the entry sended to the comp too if you had not played before.

dorunitychan

Also, unity-chan! Yaaayyyy…

A post-mortem will soon be made, stay with me guys!

Dropout time! (&a guide for plot-heavy designers)

Posted by
Monday, December 16th, 2013 4:57 pm

Yay! That was so much fun, though. Unlike LD25 with the team, I felt so little stress I thought I was dreaming!

NOT MY ENTRY. NOT MY ENTRY. NOT MY ENTRY. Lifted from http://www.ludumdare.com/compo/2011/08/22/post-ld-still-dreaming/ because it was (1) relevant and (2) Ludum Dare related. ^_^

 

I don’t currently intend to become the best game jam dev evar, hehe, I just had fun making something, even if I didn’t get all the way with it in the time limit, I will always have the ability to return to it and flesh it out. I love LD because of what people end up doing with the always loved-and-hated theme both during and after! :)

Postmortem and top-down, plot/world-focused game design heuristic (for those of us who ain’t so good at starting bottom-up from a gameplay mechanic) after the jump:

(more…)

[cache: storing page]