About sandbaydev (twitter: @sandbaydev)

Entries

 
Ludum Dare 37
 
Ludum Dare 34
 
Ludum Dare 33
 
Ludum Dare 32
 
Ludum Dare 31
 
Ludum Dare 30
 
Ludum Dare 29
 
Ludum Dare 28
 
October Challenge 2010

sandbaydev's Trophies

sandbaydev's Archive

I Ain’t Leaving My Bunker

Posted by (twitter: @sandbaydev)
Monday, December 12th, 2016 3:21 am

I just leave these here. Click images to view GIFs.

prepper0001

prepper0002

I’ve completed several ludum dare jams in the past. This time I did not manage to finish on time, but here’s a cool gif to watch and some lessons regarding creating an 2-player online multiplayer game for Android.

wheee

art from unity asset store, as probably everybody knows

Prototyping google play online realtime stuff

I wanted to make a tech prototype and just to see how it is to develop an Android online multiplayer game. I’ve done multiplayer game code in the past, so I knew some fundamentals regarding server authority, ownership of objects, lag, and whatnot.

So, here I assume you have some idea about multiplayer networking.

#1 – Android multiplayer development (on google realtime system) requires low-level code, unless you find some other tools

I did not do a good research on finding out what options there are in Unity asset store, and would totally recommend finding one before starting out. I wanted to learn what Google has to offer and their code is pretty hardcore. I got flashbacks of year 2001 when I was working on my own byte based networking stuff. In Android, you gotta convert stuff into bytes, send the array and change packets back to usable information.

There’s no automatic “keep this object’s position synced”. Nope, it’s you who gotta code ownership, network ids, rate of updates, and everything else there.

#2 – Quick matchmaking seemed to work after initial setup

Setting up an Android game requires quite many steps to do and I’m not sure if I did them right. But basically, I needed to submit APKs to demo, then setup online stuff via google play, get resources XML, put them to my game, and re-send. (If not done in this order, I got an error about “version” value not good and spent some time on unity forums trying to figure out what’s the problem).

Eventually, once this initial setup got done, getting online functions was pretty OK and it took some seconds for devices to connect. I think that was actually pretty well done. Just needed one button “quick match” and wait a bit.

#3 – oh the slowness on testing on two devices

Connect android tablet. Build on Unity. Wait. Once done plug in the other device. Build on Unity. Wait. Once both devices have a version running, I can start clicking and seeing how things go. If I spot a problem, redo. (Sometimes I could keep the older version on other device and just build to other).

But oh my gosh, this is so slow way to test. I don’t know if there’s any other better idea.

#4 Рonce somebody leaves a game, nobody else can join (in 2 player game)

Google play allows you to make a game for 2 players (up to 4 or so for realtime, check their documentation for details) but there’s an interesting catch I did not realize 3 days ago.

Google play creates “rooms” where you and your buddy can join. Once the room is full (in my case, somebody else joined) no more connections get accepted. So, if there’s a network issue and other person leaves the game, nobody can reconnect. You both get kicked away.

In case there’s a 4 player game, and one player leaves that means the 3 other can continue but no more new connections are accepted. At least this is what I understood from the documentation :)

I’m concluding that: this essentially means that in case of problems in networking, I cannot just wait for other player to reconnect easily. Nope, I would need to code some sort of save system to save the game state, setup a new room, invite the other player again and once connected sync stuff and continue playing.

This is a very different in for example if you are building a raknet/something based online multiplayer game for PC: you can have a host and clients can leave and join as they please.

#5 – Debugging tip: build your own UI based debugger

Debugging an online multiplayer game for PC can be painful, since you need to launch 2 instances of the game and debug in the editor and all this takes time.

But on Android it’s worse: I made an UI based debugging right away. I added a text UI element on top right corner on the screen (width 30%, height 50% of screen or take your pick) and wrote a method networkdebug(str msg). After that I would make a call like “this.debugUI.text = msg + “\n” + this.debugUI.text;” which basically allowed me to make debug calls and the text would appear nicely in the UI element right on the android screen.

I totally recommend this style of debugging for all Android/Mobile development, whether you are doing a multiplayer game or not.

Bonus tip:

This article series was very useful:

www.raywenderlich.com/86040/creating-cross-platform-multiplayer-game-unity-part-1

Conclusion: if you want to try realtime multiplayer… get tools to help you out

Android development is possible, but I would recommend finding a solid library that takes care of all the low level stuff. I do not know if such exist, but I did see some of them at the Unity store. Building a game is a lot of work. I think my time is not best used in thinking if it was the 4th or 5th byte that tracked the player rotation and handling all that – there are people much smarter than me who can do that better. If there was some good library that takes care of the multiplayer, then I could spend my time on working on gameplay, not on networking code. (I’m sure somebody will recommend one in the comments ūüėČ

I did not try how bluetooth based multiplayer works. I would assume that to be interesting thing to research too.

Anyway – that’s it for my ludum dare 35 & lessons learned.¬†Hopefully somebody finds any of these findings useful.

Thanks for reading.

icandance

Meet Ragnar. Ragnar is a viking.

Posted by (twitter: @sandbaydev)
Saturday, December 12th, 2015 4:03 pm

He is the village defender.

ragnar_the_defender

He is pretty psyched about that defending-the-village stuff.

but_then_again_now_i_can_do_this

He can chop anything.

ragnar_the_timberman

But most of all, he likes his cool hammer.

ragnar_hammer

 

I’m in

Posted by (twitter: @sandbaydev)
Friday, December 11th, 2015 1:36 am

 

 

 

ludumdeer_512

Yay, LD!!

Posted by (twitter: @sandbaydev)
Friday, April 17th, 2015 12:23 am

babymonster_page_300

Ludum Deer (mascot)

Posted by (twitter: @sandbaydev)
Saturday, March 14th, 2015 12:31 pm

ld_ludumdeer_256

ld_ludumdeer

Entire screen full of snowmen wanting to bite your head off

Posted by (twitter: @sandbaydev)
Sunday, December 28th, 2014 12:39 pm

When the snowman theme was going strong, I thought it was pretty lame or… well, something that didn’t feel right. I drew this to express my thoughts:

I wanted anything but snowman.

But… once the real winner was announced “Entire game on one screen”, it hit me that “snowman” is actually a great theme compared to the winning theme. In this light, “Snowman” theme had some potential, but this new theme was not… such a real theme to me. I still don’t quite understand the theme nor have seen (yet) a super unexpected/creative/innovative way to handle it in any of the entries.

So I did what I always do in ludum dares: ignore the theme and do whatever I want.

And “snowman” theme was lurking there in the shadows. And that thought grew… and here’s what I came up with:

I put together an online multiplayer game in less than 72 hours. Plenty of axe hitting. Plenty of melting snow. Plenty of nasty snowmen.

Eventually the entire screen was filled with snowmen who try to bite off your head.

That’s what snowmen do.

You can play Limberjacks here (invite a buddy to play the game for optimal experience)

Thank you snowman. You saved my ludum dare.

How to make a cool wind sound…

Posted by (twitter: @sandbaydev)
Saturday, December 20th, 2014 4:39 am

My Limberjacks entry needed sounds, and I thought that “winter forest needs some wind sound”. How to make such? I grabbed four almost-free tools of mine to help get the job done:

* My Samsung Galaxy S3 (cheap)
* Smart Voice Recorder app (free)
* Audacity (free)
* My mouth (free)

I start blowing very gently towards the screen (not towards the microphone, since that would just create noise). I didn’t blow directly to the microphone, and my mouth was above the screen. After recording the audio (making sure the quality of recording is highest possible) I copied the files to my computer and tweaked them in Audacity (basically, cut off the clip and might have slightly reduced the noise if necessary).

After that, the job was done: your cheap-as-hell background wind sound is finished.

Yes, it sounds crap if you compare it to… well, almost to anything BUT there’s one advantage: it’s still much better than no sound at all. Just by spending few minutes on this, I have enhanced the game experience. Now it kind of emphasis the cold winter scene. Having any small sounds can make a big difference.

Or, at least a little difference in a game JAM like ludum dare.

To check it out, here’s the Limberjacks entry.

Is an online multiplayer “game” doable in 72 hours?

Posted by (twitter: @sandbaydev)
Friday, December 12th, 2014 2:04 pm

That was the question I posed to myself when I entered LD31.

It’s interesting how much more fun a game can be if you play with a buddy. Here’s a GIF showing me playing alone. It’s not too bad but… well, I wouldn’t play the game many times.

limberjack2

Alone it’s almost just “running around whacking as much as you can” but with two people… it’s still whacking and running around as much as you can, but it becomes much more fun. I could help the other guy (or girl), she could run away and trick some snowmen to target her while I maneuver around snowmen and use the mighty axe to chop em half.

Here’s a GIF about a multiplayer game. (click the image to view the animation)

limberjacks_cut3_no_boss_is_revealed

Even with a random stranger who just happened to appear to the same playroom, the game felt different.

My Limberjacks entry is million light years far away to be considered a game, but it’s a pretty decent attempt on doing barebones version of an online multiplayer game. It’s enough to test the concept.

And at least that much seems to be doable in 72 hours.

Snowman killing works best with a buddy

Posted by (twitter: @sandbaydev)
Tuesday, December 9th, 2014 1:00 pm

It’s pretty decent alone…

limberjack2

…but there’s something really great in chopping snowmen with a buddy. If you try out Limberjacks, I warmly recommend getting somebody to help you out.

First day done…

Posted by (twitter: @sandbaydev)
Saturday, December 6th, 2014 2:24 pm

knights_vs_snowmen7

Final round of voting is here

Posted by (twitter: @sandbaydev)
Thursday, December 4th, 2014 9:45 am

And we all know what we must do.

butcher_and_snowman_256

Working on my post LD48 (jam) entry

Posted by (twitter: @sandbaydev)
Monday, September 15th, 2014 1:09 pm

woods5

I posted some thoughts about the LD48 midgord vikings blog post. It’s pretty cool how adjusting simple things (like character controls), the game becomes much more playable. In the original version, it’s clear that scrolling the screen is a problematic. I made changes so that you move only one character, and camera moves alongside.

That alone makes the movement much better.

No post compo version available yet, but feel free to try out the original jam entry: available here.

how_not_to_ludum_dare

My Ludum dare this time was different from any previous entry. Earlier I had pretty clear ideas about the outcome, each theme was suited for me… but this time…. this time my 72 hour jam went pretty differently. Here’s some thoughts.

Day 1: “I think I just start drawing some pixel dudes”

  • Realize the theme Connected Worlds gives me zero ideas
  • Mind blank. Resort to plan B.
  • Plan B: draw pixel vikings with a mighty beard
  • Pretend that the theme is “Isolated” and start developing a survival game !!! POST-MORTEM REFLECTION: THIS WAS THE MOST IMPORTANT STEP. I WOULD NOT HAVE AN LD48 JAM ENTRY IF I HADN’T STARTED WORKING ON SOMETHING !!!
  • Realize vikings don’t live on an isle. They will live in a woods. Now. They want to build a settlement, a viking long house. For some reason.
  • Get some ideas about the gameplay mechanics.
  • Draw more pixel vikings and stones and whatnot.

vikings_bigger_ld_entry_blog

Day 2: “I think I need to start coding…”

  • Read bit of viking mythology, realize that Midg√•rd and Valhalla would be good… realize that drawing new art has a great impact on where this game is going
  • Work on mechanics: building, characters, long term goals (viking house), short term aid (food). Plan conflict (Valhalla creatures could attack them…?)
  • Start writing code (it was very strange that I started writing code on the second day, I drew art and planned the concept the whole first day and half of the second day or so.)

ld_viking_entry

Day 3: “Leeeeeeeeeeeeeerrrrrrrrrrrrroooooooooooooooooooooyyyyy!!!”

  • Concept is clear: Vikings want to build a long house settlement. They will encounter conflicts, bad weather and valhalla creatures. They will need to mine raw resources (wood, stone) and turn them into tools, buildings.
  • Realize there’s no way all that can fit in
  • Go on full LEEEEEEEEROOOOOY mode and get all the most important items in.
  • Cut features.
  • Forget UI. For example, selecting the “next item to build” was done using key E. I thought about that for like 2 seconds.
  • Cut more features. Write code. Draw viking move animations. Finish strong.
  • Who cares that Class instance of CameraHolder keeps track on resources which BuildingObject asks after receiving a message from some 3rd connected object. Also: Characters are now items too.
  • Skip in-game instructions. Skip testing. Hope scoring works.
  • SUBMIT THE ENTRY!

…and realize that right mouse click opens a context menu. That’s a pretty bad idea when right click is supposed to command the selected character.

But at least it’s done. I couldn’t get Valhalla creatures, nor bad weather, nor ice giants in… but it’s playable. Has goals. Some thinking. And those mighty bearded vikings.

And the most important step was to start working on something.

If you wanna try out my LD jam entry “Midgord Vikings”, feel free to play the web version or download here. If you have time, please test & comment. Thanks for reading.

Under The Shade – surviving the contest…

Posted by (twitter: @sandbaydev)
Tuesday, April 29th, 2014 12:00 pm

My ludum dare jam entry Under The Shade was about building a shade and getting a signal fire built. Like perhaps every participant…, I too had huge plans on what I wanted to have in the mini game.

screenshot_2014_04_27-11_15_54
This wasn’t working so well…

With big plans in my todo list… I saw I couldn’t get everything done. I chose certain key things (like shelter building, fire building, hacking wood and so on) and get them done (well enough for playing). The end result is an actual mini-game: you can get a higher score by building a nice shelter (that provides shade)… and the game ends when you build a big enough signal fire. It’s nowhere near where I wanted to be, but it’s OK.

The turning point was when on Sunday I was so exhausted that I just slept between 21-24… and woke up in the middle of the night. I thought.. “man, I’m so tired, I just want to sleep…” but then decided to work “one more hour”. At 2:30 am (Finnish time) I was ready, couple of hours before the final deadline.

The crucial last couple of hours helped me to get the thing done, release the game. I feel that was a hugely important achievement for me: to finish & submit the entry. Without that last hour push, my work would have not been here to rate.

I survived the contest, and it was fun time so I consider this one a successful survival scenario.

Those interested: I posted a youtube video moment ago just in case you have a minute to check out bits of gameplay.

Under the Shade – getting there…

Posted by (twitter: @sandbaydev)
Sunday, April 27th, 2014 2:21 pm

It might not be beatiful, but at least it’s mine.

screenshot_2014_04_27-11_55_50

[cache: storing page]