Categories
Game Dev Web Web Development

Membuat Animasi Sprite Dengan Canvas HTML5

Saat mengerjakan tugas akhir kuliah dulu membuat game Gatotkaca – Otot Kawat Tulang Besi dengan menggunakan Java. Saat itu masih belum ada HTML5, baru beberapa tahun ini perkembangan teknologi web begitu pesat.

Kali ini saya ingin sharing bagaimana cara membuat animasi menggunakan HTML 5 dengan Canvas. Memang ada cara untuk membuat animasi dengan CSS, tetapi kalau kita sudah berbicara membuat game, CSS sudah tidak mampu untuk melakukan hal-hal unik pada game.

Untuk source code nya kamu bisa langsung download di Github.

Categories
Game Dev

Sebuah Karya Masa Lalu: Platformer Game “Gatotkaca – Otot Kawat Tulang Besi”

Beberapa minggu yang lalu tiba-tiba terbesit untuk mem-publish semua project-project lama saya, daripada terbengkalai dan hilang. Siapa tahu akan dapat berguna yang baru belajar di bidang IT, karena relatif simple. Cocok untuk yang baru belajar.

Project lama yang saya publish ini adalah sebuah Tugas Akhir pada saat saya berkuliah 10 tahun lalu, sekitar tahun 2011. Project ini adalah sebuah platformer game seperti Mario Bros dengan beberapa penambahan special move.

Categories
Game Dev IT

Box2D – Reset Body and Fixture

Some of you may re-create the body and just re-attach in world object. Did you know in JAVA if you re-create an object over and over this is bad for you performance if garbage collector run anytime. It would make your game lag for a few time which is bad for user experience.

Here some simple script to reset your body definition:

body.setTransform(pos.x, pos.y, 0);
body.setType(BodyDef.BodyType.DynamicBody);

Hare to reset FIxture definition

filter = new Filter();
filter.categoryBits = HookaHookaGame.ANIMAL_BIT;
filter.maskBits = HookaHookaGame.GROUND_BIT;

// Change fixture category maskbits
fixture = getFixture();
fixture.setSensor(false);
fixture.setFilterData(filter);

Basically you just need to recreate filter object and reattach it.  We don’t have another option to reset fixture by not recreate new Filter object, but I think this is the only way.

To get fixture, it is better if you save the fixture when you create set FixtureDef in your first place, and store it to a variable.

Categories
Android Game Dev IT

Godot Engine – File Size Experiment

Godot - Game Engine
Godot – Game Engine

I want to share my experiment using Godot Engine. It is about file size when export.

Without doubt that file size is very essential and important when making a game.

Did you ever feel that you download >50MB game that disappointed graphic and gameplay? I did.

That’s why I try to export and experiment with Godot Engine.
Here is detail:
Godot Engine: godot_win64-1.1stable.exe
Sprite: ~588kb

Windows(32-bit): ~11,915kb
Windows(64-bit): ~22,610kb
Android(Arm Only): ~7,870kb

I think the size very fair enough with very AMAZING editor.
I have run on android and it looks cool and stable for simple testing.