playMaker

Author Topic: Creating a 2D Platform Game for Smartphones  (Read 3152 times)

NeverCon

  • Playmaker Newbie
  • *
  • Posts: 9
Creating a 2D Platform Game for Smartphones
« on: April 23, 2014, 06:38:16 AM »
Hi Guys

I am trying now my luck here as no one could help me really on the Unity Forums and maybe Hutong has not received my Email again which I did send yesterday.

I wanna create a 2D Platform Jump N' Run Game for iOS, Android and Windows Phone . I already have

- Several different Platforms (Large,Medium,Small, Very small)
- Main Characters (Can be unlocked during Game Progress with different       Attributes)
- Backgrounds

Now I never really used Playmaker before and trying to figure out some stuff how to get it done. Found not much on here or I looked in the wrong place.

What needs to happen ingame:

- Camera needs to be focused on the Player
- Camera needs to move within the Background and know the limits of it
- How to create an infinite Background from left to right
- Some Platforms need to move up & down /left & right
- Possibility of giving the Platforms to ability to float in the air
- A TNT Barrel needs to grow upon touching as then a Countdown starts and the Barrel grows bigger and once the time is up, it explodes
- How to create multiple levels ?
- Create nice looking menu System based on the same graphics like my Game

I also want to implement in-app purchases, is there an easy integration with something like unibill ? I want to offer ingame currency's and items to buy.

If there are good tutorials or even demos to download to give me a good insight as how I could get this done, that would be awesome.

Regards
NC



Breadman

  • Full Member
  • ***
  • Posts: 185
  • Derp
Re: Creating a 2D Platform Game for Smartphones
« Reply #1 on: April 23, 2014, 06:53:00 PM »
I, too, jumped straight into PlayMaker without ever having seen it before. I wanted to know "what's the best way to do X, Y, and Z?" It can feel somewhat overwhelming at first, but once you get the hang of it you'll be making your own FSMs in no time.  I think your best bet would be to follow the video tutorials.

http://www.hutonggames.com/tutorials_game_design_with_playmaker.php

I found them frustrating because I was working with primitives and not my own game art. But I forced myself to stick through with it and learned a lot. The whole time you watch them, you should be thinking "how can I use this in my game?" You can play along, or just watch. For some of them I just left them playing and sat back with some tea. Soon it will click, you'll "get it", and you won't need to keep watching the tutorials. Once I understood how PlayMaker works I closed the videos and got to work.!

Once you start setting up some basic FSMs, you'll probably hit a snag, and that's when (in my opinion) this community here is the most helpful - they're great at saying "ah, yes, I've hit a similar error before too" and giving you a solution. We all try to help each other work through issues, process of elimination, scientific method, etc.

I also find another great resource is YouTuber "badseedgames", he uploads tutorials that cover slightly more advanced topics. These are great in case you have more of a broad question like "how do I set up enemy AI?" Badseed will get you started step by step, and you can change it as you go or afterwards.

https://www.youtube.com/user/BadSeedGames

As your specific needs, here are some starting points. Play with settings and states until they work for you:

On your camera object, create an FSM and add the "smooth follow" action. The target object should be the character.

To start with moving platforms, try the "move towards" action, defining a point in your game field as its destination. When it reaches the destination, send the FSM to a new state which uses "move towards" to get it back to its starting point.

Platforms will float in the air automatically - gravity is only applied to objects with physics components (rigidbodies usually). Leave these components off of your platforms, and they'll float.

Multiple levels aren't hard. In unity go to File > Build settings. Here, you can "add current" scene to the list of levels. In Playmaker, there is a "load level" action which lets you specify a level, by number in this list, to load.

Menu systems will rely on the playmaker "GUI" actions. There are lots of them and this is a whole tutorial in itself. Watch lots of videos! GUI took me a long time to have control over.

Hope these are some good starting points for you!



NeverCon

  • Playmaker Newbie
  • *
  • Posts: 9
Re: Creating a 2D Platform Game for Smartphones
« Reply #2 on: April 24, 2014, 08:21:49 AM »
Hello Breadman

Thank you very much for your extensive reply! Yes it will help me for the future, but Playmaker seems more complex then I initally thought that it would be. It ain't a problem but I have to learn soooo much right now, I am literally overwhelmed. Since I am only 1 Person doing a complete 2d Game combined with learning c#, getting warmed up again in photoshop + illustrator, 3ds max, some unity plugins including Playmaker...

My Head is firmly exploding by so much informationen and knowledge that I need to stuf into my brain while still working full time , etc...

Would you recommend me doing menu systems based on the standard gui maker or use 2D Toolkit with UI Extensions for example? I want to create a quite color rich menu system that should represent the ingame graphics.

Also I am having kinda trouble finding a good tool or way to create vector backgrounds. I do have illustrator but I am wondering if a unity plugin could let me create as well low drawcall backgrounds?

The Background for me is soo important as it acts like a level on it's own to where to player can move around within only this background.

Regards
NC

Tibo

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Creating a 2D Platform Game for Smartphones
« Reply #3 on: April 24, 2014, 01:22:48 PM »
Hi NeverCon,

I think you are doing the classic mistake of people creating games for the first time: you want everything at once :)

I suggest that you first focus on your gameplay. Try to get the mechanics right using playmaker and crude graphics. I.e: try to generate basic pltforms in your levels, have a big rectangle as a character and make it move, attach the camera to it, etc.

Once that is done and you are satisfied with it (which might take a bit of time, Rome wwas not built in one day), you can start worrying about menus and graphics.

Changing the graphics after having the mechanics right will have minimal effect on your code. You'll also be able to judge much more quickly the idea you have, and tweek them as necessary.

Breadman

  • Full Member
  • ***
  • Posts: 185
  • Derp
Re: Creating a 2D Platform Game for Smartphones
« Reply #4 on: April 24, 2014, 03:08:57 PM »
Siding with Tibo again here - take it easy! It's very easy to be ambitious (which is a great trait and it will help you later on), but for now you should focus on one thing at a time. Even if you do want to make a huge game, you would want to focus on one small aspect of it at a time. I usually pick one item to tackle a day. "Today I'll figure out how to get the enemy to face the player" or "Today I'll make a few textures in photoshop", etc.

In regards to your question about colorful UIs, it's definitely possible without any extra addons. (There are tons of UI addons you could use, of course!) I prefer to use as few as possible for my own sanity though. Basically, Playmaker uses a bunch of "GUI" actions. You control the appearance of the GUI stuff with the actions (they have some nice control options) as well as the Unity GUIstyles. (Another thing for you to spend some time reading about!)

Here's a quick shot of my game's current settings menu. Obviously you're not looking for this exact style, but it might help give you a sense of what's possible in PlayMakerGUI as a rookie (as I very much am!)

http://brendan-farrell.com/images/D12.jpg

NeverCon

  • Playmaker Newbie
  • *
  • Posts: 9
Re: Creating a 2D Platform Game for Smartphones
« Reply #5 on: April 24, 2014, 03:41:27 PM »
Hi Tibo, Hi Breadman

Thanks for the Feedback guys! I really appreciate it ! :)

To be very honest, right I am still doing my Characters in Photoshop and Background in Illustrator. Platforms are already finished.
But I am a person that thinks ahead alot, and I wanna be prepared.
My actual Problem is attention to detail, I want to know as much as possible and as early as possible from a plugin, program, whatever. That is why it could or would take  me a bit longer to finish my first game. I have a LOT of people behind me and supporting me plus wanting to know my progress and my GF is holding up my back.
It's a dream for me to create or be able to finally create games, and that is why I asking all this questions. I am setting myself a Goal for each Month to achieve and I focus on that.

But I wanna get to know Playmaker during that time of making my character or background.

For example I did hand draw my 3 backgrounds and scanned them onto my computer. Edited it in Photoshop & Illustrator and I am not happy with the Quality. So I am doing them completely new but this time in Illustrator from scratch.

I try to take it easy but I am setting myself some high goals to motivate myself to bring Quality into my Game. The more I know early how something works, the less time I loose when I am standing in front of it.

For the GUI, I heard NGUI is quite good but 2D Toolkit is much better, has also a bit of a cartoony feel to it which suits my game more. Anyone has 2D toolkit experience yet?

I will definitely check those GUI feature and the Links you posted out.

Regards
NC