#why switch up the behaviour to bugging (ha) me when you’re inside?? it feels like a targeted attack is all I’m saying
Explore tagged Tumblr posts
starcastic-artificer · 4 months ago
Text
most people don’t know this but in summer I secretly switch to my alter ego: hater of bugs
4 notes · View notes
faceted-tourmaline · 6 years ago
Text
Adrinette April Day 4: Hide Me
Chapter 2: Bread Is Bread 
ao3
Marinette was standing at her bedroom door, conflicted.
She had been adament about letting the disasterously attractive (even in his sleep) guy on her couch sleep as long as he needed to, but it was starting to push into the afternoon.
'It's probably not good for him to sleep the entire day away,' Tikki hissed at her from her shirt collar.
'But what if he really needs it? He just looked so exhausted when he came in last night,' Marinette stressed. 'I don't know if I could. If he's really only here to rest and recoup, shouldn't we let him do that?'
Tikki hummed, looking at the mess of blonde hair. 'Why don't you give it a bit longer, and if he doesn't wake up by himself by then, then do it? He'll need to rehydrate, and eat something, if nothing else.'
Marinette frowned slightly, before moving to tiptoeing past him.
Yet right as she passed him, she hit the coffee table, causing him to shift.
'No, Nathalie, I can't wear that,' he mumbled, 'it's a fish.' He buried his face into the cushion. 'Not for the school dance,'
Marinette was intrigued, yet in her haste to get her balance she stumbled, and landed on the couch next to him.
'I can't, I don't want to embarrass Lady-' His eyes snapped open at the motion, and he sat up, blinking. '-bug?'
Marinette flushed to her roots, jumping back to her feet.
Adrien looked around, before looking up at her.
His hair was mussed, reminding her strikingly of Chat's, his clothes rumpled, and his cheeks were flushed from a heavy sleep. He raised one hand to rub at his face. 'What time is it?'
Hell, if she didn't want to kiss him right then and there.
A tiny nudge from her collar brought her back to reality. 'Oh, um, it's, nearly one.'
He stared at her blankly for a moment, before frowning. 'Really?? Wow, I'm so sorry,'
'You don't need to apologise,' Marinette flapped at him. 'You obviously needed it. Are you feeling alright?'
He rubbed one eye, before pausing, and his shoulders slumped slightly, like he'd taken on a heavy weight. He smiled brightly up at her, one she didn't believe for a second. 'Yeah, thanks for asking. Can I use your bathroom?'
She nodded, gesturing to the door, and he sprang to his feet.
As soon as the door closed, Tikki flew out and landed on her shoulder.
'Maybe he's stressed from work?' Marinette questioned, looking at the closed door.
Tikki shook her head. 'I think there's something else at play.' There was a hint to her tone that Marinette missed. 'It's good of you to let him stay.'
'Of course, Tikki. I wasn't going to turn him away!' She turned towards the kitchenette. 'Before anything else, he's my friend. I'll do anything I can for my friends.'
Tikki eyed her. 'It's not because you have that massive crush on him?'
Marinette coloured, before opening the coffee container. 'It's not to do with that at all.'
Tikki pulled a face at her. She floated over to the cookie jar, flipped open the lid and took a cookie.
However when Marinette went for the milk, Tikki went for the cheese.
'Cheese, Tikki? That's unusual,' Marinette noticed.
'Oh, yeah, uh, I felt the desire.' Tikki replied quickly. 'I'm going to eat by the window, ok? I'm sure Adrien will be out in a minute.'
Confusedly, Marinette watched her float off to the livingroom window overlooking the street, where Marinette kept a few potted herbs bathed in sunlight.
Shrugging, she went back to her coffee preparations, and indeed it was only a few minutes before Adrien appeared.
'Do I smell the essence of the gods?' He questioned, drifting towards her, looking much more lively.
'It's only instant,' she said a little breathlessly.
'The gods do not care.' He said solomnly, taking a mug from the counter.
He winked at her, causing her to suddenly need a bracing hand on the counter, before he returned over to her couch.
She watched him for a long moment, sipping at her own coffee, as he once again made himself comfortable amongst her cushions.
'Hey,' she said suddenly, 'in a little bit, do you want to make some bread with me?'
He paused, before looking up at her.
'Fair warning, I've never baked anything before in my life. I'd hate to destroy your oven.'
She turned to face him and smiled widely. 'Oh don't worry, we won't even get to the oven part until much later. For now, all you have to do is make the dough, and there's nothing like it after a rough time of it.'
He stared at her blankly, upon which his phone took the opportunity to start ringing.
He started, pulling his phone from his pocket so quickly that he nearly dropped it, before almost throwing it facedown onto the coffee table.
Marinette watched him with a hint of confusion, as he tried to settle back casually into the couch. 'Who is it?'
'Oh, it's Nathalie. Don't worry.' He attempted a wave of his mug, which threatened to spill its contents. 'What were you saying? Something about making bread dough?'
She nodded slowly, and he sprang to his feet, obviously eager to be away from the device. 'What do we need? Milk? Eggs? Sugar?' He strode over to where she was, and opened a cupboard door at random. Marinette's carefully stacked crockery stared back at him stubbornly.
'Um, you don't need to worry about any of that,' Marinette said, unsure how to react to his behaviour, 'It's not a cake, just bread. Flour, water, yeast, salt. It's actually pretty easy.'
The phone cut off, and Adrien visibly relaxed. He closed the cupboard door slowly.
'Are you alright?' She questioned, and he looked at her tiredly, before shaking his head.
'Oh, yeah, don't worry about it.'
His body language defied his words, and she only worried more. 'Well, alright. Can you get two mugs out of that cupboard next to you?'
He did so, looking at her with a hint of confusion. 'You use mugs to make bread?'
'You do when your measuring cups are currently full of pins and buttons.' Marinette smiled at him. She went to her pantry and pulled out a large packet of flour. 'Under the mugs, can you get two of the mixing bowls?'
'Now that sounds more like bread.' He managed the task, setting them onto the counter carefully.
While he did that, she poured flour into the two mugs. Little puffs of it spilled onto her counter, but she didn't seem to care. 'Alright, take one of these and put it in your mixing bowl.'
He did so, while she did the same, before looking at her. 'Is it alright to make a mess like this?'
'Oh honey, you haven't seen anything yet.' She smiled at him, then slamming her gaze down to refill the mugs, flushing hard.
They put another cup and a half of flour into the bowls, then Marinette pulled out the yeast. She put a well-practiced dollop into her bowl, before instructing him to measure out enough to cover the floor of his mug, then put it in.
'And look at that, you're well on your way to making bread!' She smiled at him. 'Now you need to quickly mix it through.'
He looked at the mix, then looked at her. She already was tossing her mix with expert fingers, something he couldn't help but admire.
With his non-ringed hand he mixed it through carefully, while she took their mugs and filled them with water. 'What are you doing now?' He asked her, watching her refill the kettle.
'I'm getting the water for the mix.' She sat it down on its stand and flicked the switch.
'Won't it be too hot?' He said with an air of panic.
'No, I'm not going to let it boil, I just want to heat it up slightly. The yeast is a living thing, and it needs warm water to thrive.'
'Oh, right.'
She stood with her hand against the side of the kettle, waiting for what was obviously peak temperature.
As she waited, she suddenly realised how close they were standing, his eyes expectantly on the silver kettle.
She could hear Alya's teasing voice now. 'Go get him, girl!'
'Um, so,' she started, and he looked up at her with green, green eyes. She felt her insides melt slightly. 'Are you feeling any better this morning? Today, I mean?'
He smiled slightly. 'That has to be the most amount of sleep at any one time I've gotten in months. Thank you. I can't tell you how much I appreciate it.'
Her replying smile was nervous. 'So you haven't been getting a lot of sleep?' Not that she was one to talk. Between her fashion internship, her side work, and Ladybug, sleep was a rarity indeed.
He shrugged, with a trace of sheepishness. 'It's been, busy.' The glance he threw over his shoulder had sadness in it though. 'I've been pretty run off my feet trying to stop everything from falling apart.'
Welling her courage, she reached with her free hand and tapped him on the nose. 'Well, I'm proud of you.' She smiled warmly.
Moving quickly, she picked up the now warmed kettle and started pouring, trying to distract herself from her failing nerve.
He stared at her for a moment, wide eyed, with a slight flush rising unbidden to his cheeks.
He shook his head quickly, before peering down at the now filled mugs. She offered one to him, and he looked between it and her. 'What am I supposed to do with it? Mix it through too?'
'Exactly.' She did so with hers, pouring carefully. 'Then you want to mix it through with your hands.' She picked up her bowl and moved it over to the small dining table she had by the window, eager for the larger space.
Tentatively he poured his, before looking down at the mixture. 'Isn't there a mixer for this kind of thing?'
She shrugged, squeezing the mix between her fingers. 'When you work in a bakery or you have the cash. But this is better.'
He looked between his own mix and the ring on his hand, grimancing slightly. 'It'll come off, right?' He followed her carefully over to the table, placing the bowl down facing her.
'Sure it will. Go on,' she encouraged.
Hesitantly at first, he ran his fingers through the mix.
'This feels so weird.'
'I told you it was fun.' She had already brought the mix into something that could be considered a dough, and he couldn't help but admire her skill.
'I know it sounds obvious, but you're really good at this.' He smiled at her, before returning his gaze to his mix, and mixing with more vigor.
'That's the way,' she smiled at him. 'Mix it all the way through.' She paused, her eyes on his hands. 'Are you sure you don't want to take your ring off?'
'Oh,' he chuckled slightly nervously. 'Don't worry about it. Like you said, it'll come off.'
She looked at him for a moment, before looking down at her mix.
He'd never noticed it before, but she stuck out her tongue slightly as she concentrated. It was incredibly endearing.
They worked in comfortable silence, getting increasingly sticky fingers while the dough collected. He followed her instructions of making the dough into a ball, then running the ball around the bowl to pick up any excess flour.
Once completed, he looked at her with a hint of triumph in his eyes. 'What next?'
'Now, as my dad calls it, we just have to wait for it to bomf.' She smiled a mischevious grin.
'To what?' He said confusedly. 'Bomf?'
She went and washed her hands in her sink, then gestured for him to do so as well.
While he did, she grabbed some tea towels from a drawer, and placed them over the mixing bowls.
'Yup,' she said, turning her oven timer for an hour, as he dried his hands with a hint of fear. 'Bomf.'
1 note · View note
iyarpage · 6 years ago
Text
Unity Beat ’Em Up Game Tutorial – Getting Started
This is an excerpt taken from Chapter 1, “Getting Started”, of our book Beat ’Em Up Game Starter Kit – Unity, which equips you with all tools, art and instructions you’ll need to create your own addictive mobile game for Android and iOS. Enjoy!
In this tutorial, you’ll start your journey with game building in the same way you start a game — through the title screen!
You’ll be making this game in Unity, a powerful and popular game creation engine. If you don’t have Unity already, you should download and install the latest version before continuing.
As you assemble the first bits of your game’s UI, you’ll go through the basics of Unity and familiarize yourself with the Unity editor. By the end of it, you’ll be well on your way to making your very own beat ‘em up game.
What are you waiting for? You’ve got games to build and things to beat up! Get to it!
Note: If you’re already familiar with Unity, feel free to skip ahead a bit to the section Creating the Title Scene. On the other hand, if you feel a little rusty or you’re new to Unity, start from the top!
Getting Started
Start up Unity and click New. You’ll see the following window:
Enter PompaDroid as the Project Name, and then select the Location to where you want to save the project.
Select 2D as the Template. Finally, click the Create Project button.
Just like that, you created your very first Unity project. Since you went with 2D settings, your images will all import as 2D sprites instead of textures.
If you feel compelled to change this, you can do so under Edit\Project Settings\Editor. It is labeled as Default Behaviour Mode.
Note: You’re probably wondering why you named the game PompaDroid. As you’ll soon see, the main character has a funky pompadour hairdo, and he’s about to beat up on a bunch of droids. My apologies in advance to the Android devs out there.
With the Unity editor now open, first things first: you need to set the target platform.
On the menu at the top, select File\Build Settings. Select iOS in the Platform section.
At the bottom of the window, click Switch Platform, and then check Development Build.
Close the window.
You’ve just set up your game to run on iOS devices. If you prefer to build for Android, just do the same thing but select Android instead of iOS. It’s that simple to build the same game for a different platform!
Note: If you encounter a “no module loaded” error for the desired platform, just download the module by clicking Open Download Page. Go through the steps to get the install process going, then come back to set up your folders and go through the crash course. When installation finishes, you can just circle back to finish setting up the platform.
Clearing Starter Files
Depending on which Unity version you are using, starting a new project may or may not include starter files for you to use. These files are not necessary for PompaDroid. If your starter project is not empty, the following steps will help you delete all of the unused assets.
Create a new scene by choosing File\New Scene in the top menu. Once a new Scene has been loaded, select all files inside the Assets folder in the Project view, and right-click Delete to remove them from the project.
Setting up the Project Folders
Now is an excellent time to think ahead and set up a system for your project files — orderly assets are easier to find.
In the Project window, right-click the Assets folder and select Create\Folder. Name this folder Scenes.
Repeat these steps and create Images, Prefabs and Scripts folders.
No surprises here — you’ll save your various assets in these folders.
Unity Crash Course
You’re at the point where it’s time for a Unity editor crash course. Unity veterans may want to skip this part.
Note: If you want a not-so-quick explanation about using the Unity editor, you can read more about it at http://docs.unity3d.com/Manual/UnityOverview.html.
The Unity editor comprises several windows. Except for the toolbar, all windows can be detached, docked, grouped and resized. Go ahead, try dragging and dropping things to see what you’re working with here.
Its interface allows you to create a variety of layouts that suit personal and project needs, so your layout may look unique from other developers’ layouts.
Toolbar
The toolbar contains essential tools you need for manipulating GameObjects.
Transform Tools
These tools let you manipulate the Scene view and its GameObjects. From left to right, these are:
Grab tool: Allows you to pan around the Scene view.
Translate tool: Used for moving GameObjects.
Rotate tool: Allows you to rotate GameObjects.
Scale tool: Used to scale GameObjects.
Rect tool: Allows you to manipulate 2D elements in Unity (Sprites and UI).
Transform tool: Allows you to move, rotate and scale using only one tool.
Transform Gizmo Toggles
Toggles are what you use to change how transform tools affect GameObjects. From left to right, these are:
Pivot Toggle: Toggles whether transforms happen from the center of the GameObjects or around their pivot points. It’s useful when rotating GameObjects.
World Space & Local Space Toggle: Toggles whether the transforms should work on world or local space.
Playback Buttons
These buttons allow you to run and test your game. From left to right, these are:
Play button: Runs the current scene.
Pause button: Pauses and resumes the game.
Step button: Allows you to jump forward by one frame when the game is paused. It’s useful for hunting down pesky bugs.
Hierarchy
The Hierarchy is a complete list of all GameObjects in your current scene.
Scene View
The Scene view is a viewing window into the world you’re creating. You’ll be able to select, position and manipulate GameObjects here.
Project Window
The Project window, sometimes referred to as the Project browser, contains all the assets that belong to your project. You can add, delete, search, rename and move assets here.
The left-hand side shows your project’s folder structure.
The right-hand side shows all the assets contained in the folder you’ve selected on the left.
Game View
The Game view renders what the camera(s) sees. It’s a decent representative of the final product.
Inspector Window
The Inspector window is for viewing the GameObjects’ properties, assets and other preferences and settings.
Basic Unity Concepts
You have a basic understanding of how to get around in the Unity editor. Now get ready to absorb a few more core concepts that’ll help you make the most of this tutorial.
GameObjects
Meet the fundamental objects in Unity. Without them, you have…nothing.
They are the “things” that make up a game — literally what the name implies: objects in your game. They can be trees, lights, floors, cameras, a ball, a car, a slice of bacon, a hot buttered waffle, etc. (Hungry yet?)
The Hierarchy window lists GameObjects used in the current scene.
GameObjects are basically containers that can contain components, which are building blocks that define a GameObject’s capabilities. Components allow GameObjects to display images, play audio, think with an AI, handle physics, display 3D meshes and so much more!
Unity comes with many built-in components, but you can (and will) create some of your own by scripting — more on that later.
The following shows all the components that belong to the GameObject named Hero.
A GameObject doesn’t fly solo; it always has a transform component that determines the GameObject’s position, rotation and scale.
UI elements (still GameObjects) have a much more complicated transform called RectTransform. You’ll learn about them in a later chapter.
Parenting
Parenting is simple. Well, at least it is in the Unity engine! Any GameObject can become the child of another GameObject. The Hierarchy view is where you see and manipulate children and parents. Child GameObjects are indented beneath their respective parents.
There are no limits on how many children a parent can have, but each child can only have one parent.
The next image shows you an example of such a relationship: Image is a child of Joystick, and Joystick is a child of Controls Canvas. It’s just one big, happy family in there!
To make one GameObject a child of another, just drag one over another in the Hierarchy. To unparent, just do the opposite — it’s as easy as pie!
In the example, GameObject 1 is now a child of GameObject 2:
You’ve finished the Unity crash course and have the basic understanding you need to start creating a game!
Don’t worry if you’re not totally clear on everything so far. You can always come back to this part to refresh your memory, and trust me when I say you’ll become very familiar with the engine as you create PompaDroid.
Creating the Title Scene
You’ve created the project and are ready to build. When you first visit a new project, Unity greets you with a new, unsaved scene.
To save it, select File\Save Scene and name the scene MainMenu. Navigate to the Scenes folder and click Save.
Saving is simple enough. Look closer at the scene — contrary to what you might think it isn’t empty. By default, Unity created a Main Camera GameObject.
You don’t need it for the title scene, so select the Main Camera in the Hierarchy window, right-click and select Delete.
Your scene won’t stay empty for long!
Find the Images folder under Assets in the Project window.
Right-click and select Create\Folder. Name it MainMenu — this is where you’ll add all the assets you need to make the title screen.
Open MainMenu then right-click it and select Import New Asset. Navigate to the Chapter 1 Assets folder that comes with this tutorial.
Import bg_title.png, bg_title_touchtostart.png and bg_title_txt.png to MainMenu.
Note: An alternative way to import files into Unity is to drag the files directly into the Project window.
Now select the three assets you just imported in the Project window. Go to the Inspector and set Pixels Per Unit to 32 and set FilterMode to Point. Click on Apply to save your changes.
What did you just do?
Setting the value of a world space unit in Pixels Per Unit means that 1 Unity world space unit equals 32 pixels.
Setting Filter Mode to Point means textures will look blocky when magnified. Perfect for pixel art. This setting determines what happens when an image is stretched.
The assets are ready to use on the title screen — speaking of title screens, here’s what yours will look like:
How are you going to make that? By using Unity’s UI of course!
Setting Up the Canvas
In the Hierarchy window, click Create\UI\Image to create three new GameObjects and a plain white box:
A canvas comprises three components: canvas, canvas scaler and graphics raycaster. You’ll find them in the Inspector.
Remember that you’ll need to create a canvas for all UI objects in Unity.
The Canvas represents the space where the UI is drawn. You’ll learn more about this later. For now, just keep in mind that all UI elements have an ancestor of a canvas component that renders on screen.
The Canvas Scaler handles the overall size of the canvas. A common use case is when you want the game’s UI to scale automatically to the current screen size.
The Graphics Raycaster determines if a raycast can hit a canvas. It’s important when setting up correct UI functionalities such as button clicks.
Secondly, Unity also created an Image GameObject as a child of the Canvas GameObject. It contains two components: a Canvas Renderer that’s required to render a UI object on a canvas, and an Image component that draws the sprite set in the source image field.
Lastly, there’s also a new EventSystem GameObject containing an Event System component that handles all the events the UI system uses. You won’t be able to interact with UI elements without this component. It also contains a Standalone Input Module to handle game input.
Adding the Background Image
Select the Image GameObject from the Hierarchy. Next, open Images\MainMenu from the Assets folder in the Project window, and drag bg_title to the Source Image field in the Image component.
Tadaaa! The white square on the screen now shows the bg_title image — you may need to zoom out to see it.
Note: Another way to set the source image field is to click the knob on the right side to open a sprite selection window where you can select the sprite you want.
Take a closer look. It’s there…but why is it shrunken, squished and squared off?
It definitely shouldn’t look like this!
Making it Pretty with the Canvas Scaler
First, you need to determine the resolution and pixel per unit import settings for bg_title.
Select bg_title in the Project window and check the pixel per unit value.
For the image resolution, select the sprite (bg_title) in the Project window and check its properties at the bottom of the Inspector.
You imported bg_title at 32 pixels per unit and its dimensions are 568 x 384 pixels, so you still need to configure the canvas scaler to match these settings. Remember, this component scale’s the UI to fit the screen size.
In the Canvas Scaler component of the Canvas GameObject, change UI Scale Mode to Scale With Screen Size. Set Reference Resolution to the sprite resolution of 568 x 384.
Set Screen Match Mode to Match Width or Height, and Match Value to 0. Finally, set Reference Pixels Per Unit to 32.
Now you can fill the screen with the background image.
Select the Image GameObject. Set both PosX and PosY to 0 to center the image, and in the Image component, click Set Native Size.
There you go! Now look at the Game view and change the resolution by selecting various devices from the top-left drop-down selector. You’ll notice the image stays fullscreen because the canvas scaler now knows to maintain its size at bg_title’s resolution!
Add Text Sprites to the Title Screen
Now you have a lovely textured wall, but there are no prompts to tell players what to do next. This is a job for a text sprite!
Create two more images by right-clicking in the Hierarchy, then selecting UI\Image. Rename the first Image GameObject to TitleText by right-clicking and selecting Rename.
Drag bg_title_txt to the Image component’s Source Image.
Rename the second Image GameObject to TouchToStart and then drag bg_title_touchtostart to the Image component’s Source Image. Click the Set Native Size button on both Image components. Make sure that both TitleText and TouchToStart are children of Canvas.
Hmmm, that’s not quite right. Seems like a good time to go over repositioning things.
Select the Rect Tool on the toolbar — it allows you to change the position, rotation, scale and dimensions of 2D GameObjects.
Select TitleText and drag it around the selection box in the Scene view, then do the same with TouchToStart until you have something similar to this:
If one of the sprites “disappears�� after you drag it around, check the order of GameObjects in the Hierarchy and make sure your screen matches the above screenshot.
Now you’ve got a legitimate title screen!
Note: Alternatively, you can change positioning from each sprite’s Rect transform component. Set a specific value by typing it in or dragging the text of the value you want to adjust.
This is the moment you’ve been waiting for — click the Run button on the Toolbar.
What happens when the game is running? Absolutely nothing! There is nothing to run…yet.
The next task is to allow the player to start the game from the title screen.
Buttons and Scripts
In this section, you’ll create controls and points of interaction on your scene. Here’s where you’ll work with scripting for the first time.
Create a Button
Users naturally look for things to press, tap and swipe, even when you’ve made them non-essential. You should always add a button so the user has no doubts about how to start the game.
Select Image in the Hierarchy, and then click the Add Component button in the Inspector. Select UI\Button, and then on the newly created Button component, set Transition to None.
Note: Button transitions let you change the look of buttons when they’re pressed, disabled, hovered over or selected. You don’t need any transitions for this title screen, but don’t let that stop you from experimenting with various button transition modes!
Currently, your button is merely an empty shell. You’ll change that by adding a custom script as a component to your canvas GameObject and creating a corresponding script file in the root of the Assets folder.
Select the Canvas GameObject, click Add Component and select New Script. Name it MainMenu, set the language to C Sharp and then click Create and Add.
Find it under Assets in the Project window, drag it to the Scripts folder, and then double-click the script to open it in your code editor.
Change the contents of MainMenu to match the following:
using UnityEngine; using UnityEngine.SceneManagement; public class MainMenu : MonoBehaviour { void Start() { //1 Application.targetFrameRate = 60; } //2 public void GoToGame() { //3 SceneManager.LoadScene("Game"); } }
Save the script and take a closer look at what you did:
In the Start method, you changed Application.targetFrameRate to 60, which limits gameplay to 60 FPS (frames per second). It’s fast enough but helps your game avoid being a battery hog, which could easily happen if you left FPS uncapped.
You added a method named GoToGame() and made it public so you can call it from the button you created earlier.
SceneManager.LoadScene() loads another scene. In this case, a soon-to-be-created scene named “Game”.
Save, close the editor and return to Unity.
Giving the Button Something to Call
The Button component needs to call the GoToGame() method.
Select the Image in the Hierarchy. In the Button component, click the + that’s beneath the OnClick() field. Drag the Canvas GameObject to the field named None (Object). Select MainMenu\GoToGame() from the drop-down to the right.
Well, that was pretty easy! Now your button calls MainMenu.GoToGame() whenever it’s pressed!
Adding a Game Scene
Start with saving your current scene by going to File\Save Scene. Afterwards, create a new, empty scene by clicking on File\New Scene. Save this new scene and put it inside the Assets\Scenes folder. Name it Game.
Open the MainMenu scene by double-clicking the Assets\Scenes\MainMenu scene file in the Project window.
Run the game again and press anywhere on the screen.
Fail! Although you created a new scene, Unity doesn’t know whether to include it in the game or not.
To add it, navigate to File\Build Settings. Drag the two scenes from the Scenes folder to the Scenes in Build field. If needed, removed other scenes that are added and drag the scenes to show MainMenu above the Game scene. Unity always starts from the top.
Save the scene and run the game again. Click the background and there you go! You’re looking at an awe-inspiring empty scene.
You might notice an issue while clicking things in the title scene. For instance, if you click the PompaDroid Logo or the Touch to Start text, nothing happens.
It’s not really a bug, it’s just that you haven’t walked through making a transition to the game scene. Don’t blame yourself for this one! :]
Just like bouncers keep the rif-raf out of a club, your sprites currently block click events from reaching the background. Your next task is to let the click events pass through.
Uncheck Raycast Target in the Image component of both TitleText and TouchToStart to fix this.
Run again and click the text logo. It now transitions to the game scene! Bug fixed!
Where to Go From Here?
Congratulations, you now have a functional title screen at your disposal! Not bad, especially since you’re probably new to Unity.
At this point, you know how to:
Set up a new Unity project
Navigate the Unity editor
Create a simple scene using Unity’s UI
And finally, load a new scene
If you enjoyed what you learned in this tutorial, why not check out our complete book, Beat ’Em Up Game Starter Kit – Unity, available on our online store?
What could possibly be a more amusing way to burn time than slaughtering a horde of bad guys with trusty right and left hooks? Creating your very own beat ‘em up game, of course!
Beat ‘em up games have been around since the inception of 8-bit games and experienced their glory days when early console gaming and arcade gaming were all the rage — long before the world turned to pixels in the early part of the 21st century.
In the Unity version of this popular book, we’ll walk you through building a complete beat ’em up game on Unity.
With Unity’s great suite of 2D tools, it’s easy to build a game once and make it available to multiple platforms. The dark days of building for one platform, then painstakingly building your ingenious game on another engine for a different platform are over!
More than a book, this starter kit equips you with the tools, assets, fresh starter projects for each chapter, and step-by-step instructions to create an addictive beat ‘em up game for Android and iOS.
Each chapter builds on the last. You build out features one at a time, allowing you to learn at a steady, logical, and fun pace. Components were designed with reusability in mind so you can easily customize the resulting game.
This starter kit is for beginner to intermediate developers who have at least poked around Unity, perhaps even built a game, but need guidance around how to create a beat ‘em up game.
And even better, the book is on sale as part of our Game On Book Launch event! But hurry, it’s only on sale until Friday, June 8. Don’t miss out.
If you have any comments or questions about this tutorial, please join in the forum discussion below!
The post Unity Beat ’Em Up Game Tutorial – Getting Started appeared first on Ray Wenderlich.
Unity Beat ’Em Up Game Tutorial – Getting Started published first on https://medium.com/@koresol
0 notes