maanantai 12. syyskuuta 2016

Unity platformer - Moving platforms and parenting

NAV15AP & NAV16AP

1. jakso lukuvuonna 2016-2017

There are multiple ways to do moving platforms with playmaker. The easiest is to use I Tween actions. Start by creating FSM for the moving platform. In this FSM we need two states. Link the states with finished event. 



Now in the first state you need to find action called I Tween Move To. This automatically moves the object to desired position. Select the vector position according to your object transform. If you want to move object vertically on y axis then change those values and same goes for horizontal x axis. I wanted the platform to move horizontally so I changed the values on the x axis. Remember to change the y axis value too, if your object has other than 0 for the value on that axis.  Then define the speed you want for your platform movement.  Remove check marks from orient to path and move to path. Remember to put your finished event in finish event location. Then copy the action to the other state but change the value for the x axis so it matches the original position of the platform.


Second way to do a moving platform is with animation. You need to choose object you want to animate and in the animation window click create new animation. You'll need to create folder in the project for your animations and save the animation under appropriate name.




Next you are going to make the animation. This is done by adding property and choosing transform position. Click on the time line and create a new key by moving the platform to the desired position. Do this few times and make sure the animation goes smoothly back to the position it started from. You can copy keyframes by choosing a frame and pressing ctrl + c. Then choose other place from the timeline and press ctrl + v to paste the frame.



You can test the animation by pressing play button from the animation window. When you are satisfied with the result stop recording by pressing the record button (red dot) in the animation window. Now when you test the game the animations you have made, they will play automatically.


Last thing we are going to do is make the platforms parented with the character. If this is not done and the character is on the platform, it will not move along with the platform. This might work as a feature in the game for horizontally moving platforms. For the vertically moving platforms it might not be a good idea because it can cause some twitching. So that's why you should use parenting for moving platforms.

Create new FSM for the character. In the first state use collision 2D event action.  You'll have to create new tag for the moving platforms because this action uses collide tag to recognize which object you are colliding with. You'll also need to create new variable. This time the variable type needs to be gameobject because you're going to use it for storing the collider. When you store the collider, you can use it later in the next state. Then we need to sent event to activate the next state.



In the next state use set parent action. Use the gameobject variable we created before. This will set the parent according to the last moving platform the character has collided with. Then you want to add one state before returning to the start state. In that state use the action wait for 0.1 seconds. This prevents creating an infinite loop which will result in error.


You'll also need to make changes in the ground control FSM. In_air state you need to create two new actions. One is collision 2D event because you want to prevent the player for using jump while in air with the moving platforms too. Then there's the set parent action. This time don't choose anything for the parent. It will make the character independent object again and it won't move with the platforms while jumping.


torstai 8. syyskuuta 2016

MATERIAALIT

NAV16AP


1. jakso lukuvuonna 2016-17

Materiaalit muodostuvat monesta eri tekstuurikartasta, jotka yhdessä saavat pinnan vaikuttamaan halutun näköiseltä. (puu, kivi, metalli jne.)
Realistisissa materiaaleissa on vähintään neljä eri tekstuuria:


Diffuse Map (Color Map)
Värikartta, josta materiaali ottaa värinsä.














Normal map
Kartta joka näyttää pienten pintarakenteiden muodot, ilman että lisätään geometriaa.
Voidaan tehdä highpoly-objektista tai generoida apuohjelmien avulla vaikka suoraan kuvasta. (CrazybumpxNormalNormalMap-Online)

Hyvää lisäinformaatiota aiheesta: http://wiki.polycount.com/wiki/Normal_map 

Täällä ohje Normal Mapin tekemiseen 3ds Maxilla, tämän tekemiseen tarvitaan sekä highpoly-, että lowpoly-objekti:
http://help.autodesk.com/view/3DSMAX/2015/ENU/?guid=GUID-0E460416-8F85-49F0-AE45-4E79B929FF26














 Ambient Occlusion Map (AO)
Mustavalkoinen kartta, joka simuloi "yleisvalon" aiheuttamat varjot. Korostaa yksityskohtia.














Specular Map
 Mustavalkonen kartta, joka kertoo mitkä kohdat materiaalissa kiiltää ja mitkä ei. Valkoinen = 100% musta = 0%














Unityn omasta materiaalin luonnista ohjeita:
http://docs.unity3d.com/Manual/Materials.html

Ja yleistä puhetta aiheesta:
http://blog.digitaltutors.com/understanding-difference-texture-maps/  
(suosittelen VAHVASTI kirjautumaan Digital-Tutors sivustolle (nykyään Pluralsight). Paljon hyviä tutoriaaleja)


TILETTYVÄT TEKSTUURIT

Tilettyvillä tekstuureilla tarkoitetaan kuvia, joita voi latoa vierekkäin ja päällekkäin ilman että niiden välinen raja näkyy.

TEHTÄVÄ 1

Ota kuva jostain tekstuuripinnasta (lattia, seinä, pöytä, asfaltti, yms.).

Valitse sellainen pinta, jossa valo käyttäytyy mahdollisimman tasaisesti. Kuvatessasi pidä kamera kohtisuorassa kuvattavaan pintaan nähden.

Avaa ottamasi kuva Photoshopissa.

 Avaa uusi tyhjä kuvapohja ja tee siitä 512 x 512 tai 1024 x 1024 pikselin kokoinen.

Kopioi tekstuuripinnasta ottamasi kuva ja liitä se uuteen tyhjään kuvapohjaan. Ehkä kannattaa vielä rajata kuva uuteen kokoonsa, eli Select > All ja Image > Crop.

Valitse Filter > Other > Offset.

Kirjoita Horizontal-kenttään puolet kuvan leveyden pikselimäärästä, esim. +256, jos teit 512 x 512 kuvapohjan.

Kirjoita Vertical-kenttään puolet kuvan korkeuden pikselimäärästä negatiivisena lukuna, esim. -256, jos teit 512 x 512 kuvapohjan.

Jätä Wrap Around -valinta päälle ja klikkaa Ok.

Kuvan reunat ovat nyt siirtyneet kuvan keskelle, jossa ne näkyvät häiritsevästi.

Käytä Clone Stamp -työkalua kuvan siistimiseen, jonka jälkeen kuvasi tilettyy kivasti. Clone Stamp maalaa kopiota valitsemastasi alueesta kuvassa. Valinta tehdään klikkaamalla haluttua kohtaa vasen Alt-näppäin pohjassa.


KÄSINPIIRRETYT MATERIAALIT



Käsinpiirretyt materiaalit ovat oma tyylisuuntansa, jossa lähes kaikki informaatio on piirretty (yleensä) diffuusikanavaan.
Voidaan myös puhua tyylittelystä, kun puhutuaan käsinpiirretyistä materiaaleista.
Pääsääntöisesti käsinpiirretyssä käytetään kahta kanavaa: Diffuse ja Specular. Toki muitakin voidaan käyttää, mutta yleensä niitä ei tarvita.









Hyvää infoa aiheesta:
http://wiki.polycount.com/wiki/TexturingTutorials#Painting_Stylistic_Textures 


Tekstuurit ja power of 2
Tekstuurien koko on aina kahdella kerrottuna, johtuen näytönohjaimen tavasta käsitellä tekstuureja.

Esimerkki: 8x8, 16x16, 32x32, 64x64, 128x128, 256x256, 512x512, 1024x1024, 2048x2048, jne.
Koon ei tarvitse olla aina esim, 1024x1024, vaan voi myös olla vaikka 512x1024 jos ei tarvita enempää, kunhan molemmat koot noudattavat power of 2 suhdetta.

PBR (Physically-Based Rendering)
On uusi rendaus tekniikka, joka on kovaa vauhtia muodostumassa uudeksi standardiksi. Joka tuottaa realistisempaa jälkeä peleissä.

Teoriaa asian tiimoilta.
http://www.marmoset.co/toolbag/learn/pbr-theory

TEHTÄVÄ 2

-Tee kolme tilettyvää tekstuuria (voit käyttää cgtexturesta löytyviä tekstuureja) photoshopissa, puu, metalli ja kivi.
-Tee jokaisesta diffuse, normal, ao ja specular mapit.
-Vie tekstuurit unytyyn ja tee niistä materiaalit kolmeen eri planeen, pyri realismiin.

TEHTÄVÄ 3 

-Tee kolme käsinpiirrettyä tekstuuria photoshopissa, puu, metalli ja kivi.
-Tee ainakin metallille specular map
-Vie tekstuurit unytyyn ja tee niistä materiaalit kolmeen eri planeen.

keskiviikko 7. syyskuuta 2016

MORE MODELING

NAV16AP


1. jakso lukuvuonna 2016-17


Tällä kurssilla syvennetään mallintamiseen liittyviä taitoja 3ds Maxilla.


Smoothing Groups


"Smoothing group is used for creating smooth surface. Once there're same smoothing group found next to the selected polys, smooth surfaces will be created. You may ask what're the differences between smoothing group and Meshsmooth. The major one is that it will not add any polys to create smoothness, unlike Meshsmooth. So we shall consider using smoothing group before MeshSmooth or TurboSmooth."

Smoothing Groupeilla siis saadaa aikaan pehmennystä ilman polygonien lisäämistä.


Tehtävä 1.

Harjoitellaan Smoothing Grouppien tekemistä.

Valitse Editable Poly -objektista haluamasi polygonit ja klikkaa oikeassa reunassa Smoothing Groupin numeroa.



Työkaluja


Search Bar
Maxissa on myös etsintäpalkki, jonka avulla löytää halutun työkalun tai modifierin kätevästi. Search Barin saa esiin näppäimellä X.

Statistics
Objektin tiedot, muun muassa polycountin saa näkyviin numeronäppäimellä 7.

Cut
Tekee edge-tasolla uusia edgejä minne tahansa.
Jos haluat jakaa polygonin tekemällä uuden edgen kahden vertexin välille, on ehkä helpompi käyttää Create-työkalua.

Connect
Tekee edge-tasolla uuden edge-loopin alueelle, jonka edget on valittu. Tämän kanssa voi käyttää vaikka kehävalintaa (Modeling  > Modify Selection > Ring).

Chamfer
Jakaa edge-tasolla edgen useaksi edgeksi.
Tämän jälkeen tarvitaan usein esimerkiksi Target Weldiä yhdistämään syntyneitä ongelmavertexejä.

Create
Tekee edge-tasolla uuden edgen vertexien välille.
Työskentelyä helpottaa, jos laittaa Snaps Togglen päälle. Sen avulla kursori napsahtaa lähimpään vertexiin (klikkaa Snaps Togglea hiiren oikealla ja valitse Vertex).

Tekee polygonitasolla uuden polygonin kun klikataan ympäröivät vertexit.

Inset
Tekee polygonitasolla uuden polygonin valitun polygonin sisään.

Target Weld
Yhdistää vertex-tasolla kaksi vertexiä yhdeksi vertexiksi. Vertexit valitaan klikkaamalla.

Collapse
Yhdistää vertex-tasolla kaikkivalitut vertexit yhdeksi vertexiksi.

Cap
Sulkee border-tasolla epämääräisen aukon. Uudet edget pitää tehdä erikseen esimerkiksi Create-työkalulla.

Constraints to Edge
Tällä valinnalla varmistetaan se, että Move-työkalulla liikutettava vertex liikkuu pitkin edgeä.

Make Planar
Oikaisee polygonitasolla valitut polygonit niin, että ne liikkuvat samaan suuntaan esimerkiksi Extrude-työkalua käytettäessä.



Spline-mallintaminen ja Lathe (sorvi)


Autonrengas

1.       Piirrä Front-näkymässä autonrenkaan poikkileikkauksen neljäsosa Line-työkalulla (Create > Spline > Line). Initial Type ja Drag Type kannattaa klikata Smoothiksi (Create > Creation Method > Initial Type ja Drag Type). Mallikuva Spline.jpg löytyy Yhteiset/Animaatiotekniikka/Autonrengas-kansiosta. Sijoittele Spline Y-akselin oikealle puolelle ja X-akselin yläpuolelle.

Lisää Mirror-modifier ja siirrä peilauksen keskipiste Y-akselin päälle (Klikkaa Mirror-modifierin plusmerkkiä ja valitse Mirror Center ja siirrä sitten peilausakseli). Valitse ZX-akselit (Create > Parameters) ja klikkaa Copy-valinta päälle. Mallikuva Mirror.jpg  löytyy Yhteiset/Animaatiotekniikka/Autonrengas-kansiosta.

2.       Lisää Lathe-modifier. Valitse pyöräytyssuunnaksi X-akseli kohdassa Direction. Siirrä pyöräytysakseli autonrenkaan navan keskelle, eli tässä tapauksessa X-akselin päälle (Klikkaa Lathe-modifierin plusmerkkiä ja valitse Axis ja siirrä pyöräytysakseli).

3.       Lathe-modifierin ollessa valittuna pudota segmenttien määrä kymmeneen (Parameters > Segments) vähentääksesi polygonien määrää.

Klikkaa modifier-ikkunassa Line. Vähennä myös Splinen polygoneja aseta Steps –arvoksi 1 (Interpolation > Steps).

Klikkaa Lathe-modifieria hiiren oikealla ja valitse Collapse All.

4.       Lisää Edit Poly-modifier niin pääset lisäämään yksityiskohtia. Valitse autonrenkaan keskiön ympäriltä joka toiset polygonit. Klikkaa rengas-objektia hiiren oikealla ja valitse Bevelin ikkunaversio. Laita Height-kentän arvoksi kymmenen ja klikkaa oikeinmerkkiä. Lisää vielä TurboSmooth-modifier.


Tehtävä 2.


Mallinna vastaavalla tekniikalla joku muu objekti. Sinun pitää siis käyttää Spline-mallintamista ja Lathe-modifieria objektin tekemiseen.



Boolean- eli Loogiset operaatiot


Näillä voidaan tehdä uusi objekti kahdesta eri objektista esimerkiksi seuraavilla tavoilla:

Union             Yhdistää kaksi objektia yhdeksi uudeksi objektiksi.
Intersection    Tekee uuden objektin kahden eri objektin yhteisistä osista.
Subtraction     Tekee uuden objektin vähentämällä toisesta objektista toisen.

Tulitikkulaatikko

1.       Mallinna Top-näkymässä tulitikkulaatikon sisäosan muotoinen objekti Box-työkalulla (tunneilla on tulitikkulaatikko mallina). Mallinna toinen, Top-näkymässä katsottuna hieman pienempi objekti Box-työkalulla. Siirrä toista objektia esimerkiksi Left-näkymässä niin, että se on melkein kokonaan ensimmäisen objektin sisällä, sen pohjan yläpuolella.

Vaihda objektien tyypiksi Compound (Create > Compound Objects) ja valitse ProBoolean. Varmista, että ensin tekemäsi objekti, josta tulee tulitikkulaatikon sisäosa, on valittuna ja varmista että Boolean-operaatioksi on valittu Subtraction (Parameters > Operation > Subtraction). Klikkaa sitten Start Picking (Pick Boolean > Start Picking) ja klikkaa toista tekemääsi objektia.

2.       Mallinna vastaavalla tavalla tulitikkulaatikon kansiosa ja siirrä se sisäosan päälle niin kuin oikeassa tulitikkulaatikossa.

3.       Mallinna vielä yksi tulitikku kahdesta eri objektista, ja yhdistä ne käyttämällä Boolean-operaatiota Union.


Tehtävä 3.

Mallinna vastaavalla tekniikalla kiilamainen Emmental-juustopala. Mallikuva swisscheese.jpg löytyy Yhteiset/Animaatiotekniikka3/Boolean-kansiosta.

Tehtävä 4.

Mallinna vastaavalla tekniikalla huone, jossa on kaksi ikkunaa ja oviaukko.



Plane-mallintaminen


Tason avulla saa mallinnettua nopeasti ja helposti monenlaisia esineitä. Shell-modifier tekee objekteista kolmiulotteisia.

Miekka

1.       Tee  yhden segmentin Plane-objekti, joka on saman kokoinen kuin referenssikuva sword1.jpg (kuva löytyy Yhteiset/Animaatiotekniikka/Sword-kansiosta). Kuvan mitat saat vaikka Photoshopista (Image > Image Size).

Avaa Slate Material Editor.

Klikkaa keskiosassa (View1) hiiren oikealla ja tee uusi materiaali (Materials > Standard).

Klikkaa uudestaan hiiren oikealla ja tee uusi tekstuuri, joka on kuva (Maps > Bitmap). Valitse kuvaksi sword1.jpg.

Klikkaa tätä tekstuuria Slate Material Editorissa hiiren oikealla ja valitse Show Shaded Material in Viewport.

Yhdistä tekstuuri materiaalin diffuusikanavaan (vedä hiiren vasen nappi pohjassa tekstuurin oikeassa reunassa olevasta pienestä pallosta materiaalin Diffuse Color –palloon).

Tuplaklikkaa materiaalia jolloin sen määrittelyt näkyvät materiaalieditorin oikeassa reunassa.  Avaa Maps-osa klikkaamalla sanan vasemmalla puolella olevaa pientä plusmerkkiä. Tee materiaalista itsevalaiseva klikkaamalla Self-Illumination –valintakytkin päälle.

Yhdistä materiaali Plane-objektiin (vedä hiiren vasen nappi pohjassa materiaalin oikeassa reunassa olevasta pienestä pallosta Plane-objektiin).

2.       Yritä päätellä referenssikuvasta kuinka monta segmenttiä tarvitset miekan tekemiseen (etsi pysty- ja vaakalinjoja). Edge looppeja saa kyllä lisättyä mallintamisen aikanakin, joten ei haittaa jos segmenttejä on liian vähän.

Tee Plane-objekti, joka on hiukan suurempi kuin referenssikuva. Lisää Edge loopit. Klikkaa hiiren oikeata nappia ja valitse Convert To: > Convert to Editable Poly.

3.       Sitten vain siirtele vertexejä ja lisää tarvittaessa Edge looppeja, kunnes sinulla on referenssikuvaa vastaava miekka. Poista ylimääräiset polygonit.

Lisää Shell-modifier, joka tekee miekasta kolmiulotteisen. Paksuutta voi säätää kohdasta Parameters > Outer Amount.

Mallikuvia eri työvaiheista ja valmis miekka löytyy Yhteiset/Animaatiotekniikka/Sword-kansiosta.


Tehtävä 7.

Mallinna vastaavalla tekniikalla joku toinen esine.

tiistai 6. syyskuuta 2016

Drawing in Photoshop

NAV16AP

1. jakso lukuvuonna 2016-2017

Last time we used shapes as a tool to learn the basics in Photoshop. This time we are going to use different brushes and draw. I have drawn a rose in my example but you are free to choose your own  subject. It can be a character, an object or even a complete illustration of a scene if you're a fast drawer. Most important thing is that you draw yourself. Don't just copy something already existing, create something original.

First when you open Photoshop create a new document. It's easier to put in details if the size and resolution are big. Create a new layer and delete the background layer. The background layer is white and we don't want to use it as a base because it has no transparency.

Then you are going to do a rough sketch of your art piece. Choose a bright color that differs from what you are about to draw. This makes it easier to trace the sketch afterwards. Create a new layer under the sketch layer. Make the opacity of the sketch layer about 50%. This way you're able to see through the layer but you still have guidelines for the line art.



Draw line art for your piece. Make sure the lines are clean and precise. This can be done by zooming in and clearing up the lines. Another way to clean up the lines is to use the pen tool. Trace outside the lines and fill the path with black. Do this to every line in the scene.







Outlines are now done and it's time to start the coloring. Once again create a new layer. Move the layer under the line art layer. You can add color by using the pen tool and tracing the areas you want color in or using a brush tool and coloring the areas. 


I tend to use the brush to create the background color for my objects and then use the pen tool to do shadows and highlights. It's up to you which technique you want to use in your art. Be sure to put your shadows and highlights on different layers and use the clipping mask so that you don't draw over the basic color layer.


Another way to do the shadows is to duplicate the original color layer and then press ctrl + L to open the levels window. Put the values in so that the it's black. Now in the black layer choose the opacity for that layer. Test and see what type of shadows fits your artwork. Now with the lasso tool select spots you want to highlight. You can select multiple spot simultaneously by pressing the shift key. When you have selected all the highlights use eraser tool and remove the shadows from the highlight spots. This method is more suitable for cartoon styled art.





To soften the shadows and highlights it's good idea to use color mixer brush tool. This will soften the harsh edges and make the colors blend in properly. You need to merge the layers together to be able to blend the colors. Merging can be done by selecting all the layers you want to merge and right clicking them. This will open a window with a merge layers option. Another way to merge layers is to use hotkeys ctrl + alt + shift + E. This will create a new layer with all the layers in the project without destroying the individual layers.  Save the layered file under a different name than the merged file so that you can go back and start over if necessary. 

Use different kind of brushes with low opacity to add texture. Experiment with darker and lighter colors until you're satisfied with the result.


For the background use gradient tool. Choose colors and gradient type that suit your artwork best and use them. You can change the colors of the sliders and move their position. Again experimenting and testing various combinations is recommended. Don't use the same values as I have.





You can also add some texture to the background with the same method as used on the object you have drawn. After the final touches sit back and enjoy your newest masterpiece.



VIRTUAALISTUDIO

NAV15AP & NAV16AP


1. jakso lukuvuonna 2016-17



Virtuaalistudio

Virtuaalistudioksi kutsutaan kahta 90 asteen kulmassa toisiinsa nähden olevaa tasoa (plane), joiden keskipiste on samassa kohdassa, ja joiden tekstuurina on referenssikuva joka esittää kohdetta kuvattuna edestä ja sivulta. Huh!

Hankalasta määrittelystä huolimatta virtuaalistudiosta on paljon apua mallintamisessa.

Yritetään selventää asiaa. Vaikka autolla.

Auto

1.       Etsi netistä tai kuvaa itse tarvittavat referenssikuvat henkilöautosta. Niissä pitää näkyä kohde mahdollisimman selvästi ja samankokoisena edestä ja sivulta.

2.       Yhdistä referenssikuvat  Photoshopissa samaan neliönmuotoiseen kuvapohjaan ja varmista että ne ovat saman kokoisia. Oikaise myös mahdolliset vinoudet. Tallenna kuvasi.

Kuvasta tehdään neliö, koska tällä vältetään kuvasuhdeongelmat 3ds Maxissa.

Mallikuva MeterRef.jpg löytyy Yhteiset/Animaatiotekniikka/VirtualStudio-kansiosta.

3.       Käynnistä 3ds Max ja avaa Slate Material Editor.

Klikkaa keskiosassa (View1) hiiren oikealla ja tee uusi materiaali (Materials > Standard).

Klikkaa uudestaan hiiren oikealla ja tee uusi tekstuuri, joka on kuva (Maps > Bitmap). Valitse kuvaksi Photoshopissa tekemäsi kuva.

Klikkaa tätä tekstuuria Slate Material Editorissa hiiren oikealla ja valitse Show Shaded Material in Viewport.

Yhdistä tekstuuri materiaalin diffuusikanavaan (vedä hiiren vasen nappi pohjassa tekstuurin oikeassa reunassa olevasta pienestä pallosta materiaalin Diffuse Color –palloon).

Tuplaklikkaa materiaalia jolloin sen määrittelyt näkyvät materiaalieditorin oikeassa reunassa.  Avaa Maps-osa klikkaamalla sanan vasemmalla puolella olevaa pientä plusmerkkiä. Tee materiaalista itsevalaiseva klikkaamalla Self-Illumination –valintakytkin päälle.

4.       Tee Front-näkymässä Plane-objekti joka on neliö ja jossa on vain yksi segmentti.

Yhdistä materiaali Plane-objektiin (vedä hiiren vasen nappi pohjassa materiaalin oikeassa reunassa olevasta pienestä pallosta Plane-objektiin).

Käännä Top-näkymässä Plane-objektia Shift-näppäin pohjassa 90 astetta. Näin saat kopion Plane objektista.

Laita Shaded View päälle F3-näppäimellä ja laita Edged Faces päälle F4-näppäimellä ainakin niissä näkymissä joissa työskentelet.

5.       Virtuaalistudio on nyt valmis ja voit aloittaa mallintamisen (tässä harjoituksessa on tarkoituksena tehdä virtuaalistudio, autoja ei tarvitse mallintaa valmiiksi).

Näppäimillä Alt+X saat mallinnettavan objektin läpinäkyväksi ja voit nähdä virtuaalistudion referenssikuvat samalla kun mallinnat.

Mallistudio VirtualStudio.max löytyy Yhteiset/Animaatiotekniikka/VirtualStudio-kansiosta.

sunnuntai 4. syyskuuta 2016

PITCHING

NAV16AP

1. jakso lukuvuonna 2016-2017


Pitching

A Pitch eli pitchaus on 5-15 minuutin suullinen ja visuaalinen esitys ideasta. Pitchauksella pyritään saamaan rahoitusta tai muuta tukea idealle.

Tässä yhteydessä käsitellään pitchausta pelien näkökulmasta.

Täällä valmis pohja pitchauksen tekemiseen:

http://www.slideshare.net/bubbleguminteractive/indie-games-developer-pitch-deck-template

Täällä lisää pitchausohjeita:

http://www.gamasutra.com/view/feature/134571/how_to_pitch_your_project_to_.php?print=1

Pitchausohjeita suomeksi:

http://yle.fi/ylex/uutiset/hyva_pitch_tulee_kristallinkirkaana_sydamesta_-_arvioi_slushin_esitykset_livestriimista/3-8445762


Tehtävä 1.

Tehkää englanniksi 5 minuutin pitchaus kuvitteellisen yrityksenne kuvitteellisesta pelistä. Voitte käyttää valmista pitchauspohjaa (linkki yllä) tai tehdä esityksen itse.

tiistai 30. elokuuta 2016

Unity platformer - GUI bars

NAV15AP&NAV16AP

1. jakso lukuvuonna 2016-2017

This time you’re going to learn how to make different meters eg. health bar and collectible bar with NGUI.

First you need a global variable. This can be player health or things the player is going to collect in the game. Float will be the variable type since the NGUI fill uses float as its variable. Then you need graphics for the bar. This can be done in Photoshop. A simple rectangle will be sufficient for this assignment.


You’ll need to create atlas for the health/ collectible bar. Atlas is a container for all the sprites you need in your GUI. It packs them in a file where you can take individual sprites and use them when needed. Atlas can be done with atlas maker. Simply create new Atlas when a sprite you want to include is chosen. You can add sprites and update old ones any time you wish.


Then you’re going to create sprite from the NGUI tab in the top tool bar. Change the UI sprite type to filled. This enables the use of the float variable as the fill amount. From the UI sprite inspector, you can also change the sprite or atlas you’re using. Fill direction can also be chosen here. In this assignment you can use horizontal direction because the sprite is rectangle shaped. Radial fill direction works best on round shaped sprites.



Now add FSM to the newly created sprite. In the first state you need action called float changed. This will check if a specific float variable has changed and then send event to do another action in another state. In the second state you want to drag the UI sprite and set property for it. Use fill amount as property and your own global variable as fill amount. This FSM will update the fill amount every time the global variable changes eg. if you take damage or collect an object.




You’ll also need float add in the collectible you’re using in order the float changed action to work. Create action add float in the collectible before the state you’re destroying the object. If you want to use this method for a health bar, then use float subtract. The subtract action will decrease your health and then send the information to the health bar so that the player gets visual confirmation from taking damage.

Lastly you need to use the information from the GUI bar. If the collectible bar is full then something should happen. Also it the health bar is fully depleted the playable character will die. Add new state to the fill FSM. This time use float compare action. This will take the global variable used and compare it to a number. Create two events so that if the bar is not filled it goes back to the start state and if it’s filled it will go to the last state.