Saturday, October 29, 2011

Op een hellende vlak bewegen



Massa is het belangrijkste deel van onze game. Dus met deze spel maken we het verband tussen massa, oppervlakte en snelheid over hellende en horizontale vlakken duidelijk voor de spelers. De speler kan alleen invloed op de massa hebben (zwaarder of lichter makken tijdens het spelen) en vervolgens de gevolgen op de snelheid terug zien. In onze game speelt de zwaartekracht ook een grote rol, want wanneer je op het aardoppervlak bevind, is de aantrekking door de zwaartekracht constant en gelijk aan mg, waarin m de massa is van het voorwerp dat aangetrokken wordt en g de versnelling als gevolg van de zwaartekracht.

g = 9,8m/s2


Stel je voor dat de speler met de bal van een helling afgaat. De zwaartekracht is uiteraard omlaag gericht. Maar de normaalkracht staat loodrecht op de weg.

Bij een helling staan de normaalkracht en de zwaartekracht niet precies tegenover elkaar. Met de massa van de bal en de hellings hoek kunnen we de normaalkracht uitrekenen.

Hiervoor moeten we de zwaartekracht opsplitsen in twee delen(componenten). De eerste component evenwijdig aan het vlak, de twee loodrecht op het vlak.

De Fz(Fzwaartekracht) kun je berekenen door gebruik te maken van de tweede wet van Newton: F = ma. Dus Fz = mg.

Door gebruik te maken van sinus, cosinus en tangens kunnen we de loodrechte en evenwijdige componenten berekenen. Deze heeft natuurlijk dezelfde grootte als de normaalkracht.

F1 = Fz * sin a(hoek)
F2 = Fz * cos a(hoek)

Friday, October 28, 2011

Natuurkunde voor Dummies

Natuurkunde voor Dummies gaat over de natuurkunde, maar op een andere(makkelijke) manier uitgelegd. In plaats van het te schrijven vanuit het standpunt van de natuurkundige, schrijft de schrijver het vanuit het standpunt van de lezer wat gemakkelijk te begrijpen is.

De belangrijksten delen van dit boek voor onze project zijn:

Deel 1: Natuurkunde in beweging
Het beschrijven van beweging(versnelling, snelheid en verplaatsing)

Deel 2: De kracht van de natuurkunde
Actie is min reactie. verklaren wat er gebeurt wanneer er een kracht uitgeoefend wordt.

Deel 3: De energie om arbeid te verlichten
Je verricht arbeid, en die arbeid wordt de energie van het voorwerp

een goede tip: laat de wiskunde je niet afschrikken.

Hieronder wordt theoretisch beschreven hoe de bal in het game zal gaan bewegen.

Bewegen
In de natuurkunde gebruiken we altijd meter per seconde (m/s).
Op een bal die op een horizontale weg rolt werken de volgende krachten: de “duwkracht” vooruit en de rolwrijving en de luchtwrijving achteruit.



Duwkracht
de duwkracht wordt bepaalt in ons geval door playtesten. Door playtesten kunnen we erachter kommen of we een vaste of verwisselende duwkracht gaan gebruiken en ook hoeveel.

Rolwrijving (of schuifwrijving)
De wrijvingskracht werkt altijd in tegengestelde richting als de beweging. Wrijving leidt altijd tot "negatieve versnelling" ofwel: vertraging.

Fw,rol = μw * Fn

De letter μw betekent de wrijvingscoëfficiënt. Wrijvingscoefficient * normaalkracht geeft de maximale rolwrijvingskracht.

Luchtwrijving
Luchtwrijving is de weerstand die een voorwerp ondervindt als het zich voortbeweegt door de lucht. Bij hoge snelheid is de luchtwrijving evenredig met de snelheid in het kwadraat. Voor berekening van de luchtwrijving wordt de volgende formule gebruikt:

Fw,lucht = Cw * 1/2 * p *v2 * A

in de formule is ρ de dichtheid van de lucht, v de snelheid in m/s en A het frontale oppervlak in m 2 . Het getalletje Cw is een weerstandscoëfficiënt.


Nettokracht
Voor berekening van de nettokracht wordt de volgende formule gebruikt:

Fnetto = Fduw - Fw,rol - Fw,lucht

Versnelling
De versnelling is de mate waarin de snelheid verandert. Je kunt dit uitrekenen met de volgende formule:

a = Fnetto/m

a = de versnelling

Snelheid
Alles wat beweegt heeft een snelheid. De snelheid geeft aan hoeveel weg een voorwerp af legt in een bepaalde tijd. Je kunt dit uitrekenen met de volgende formule:

v = v + a * dt

v = snelheid
a = de versnelling
dt = tijd in seconde

Afgelegde weg

s = s + v * dt

Monday, October 24, 2011

DEV - Physics, Hyves API and Gameplay

The physics are still kind of problematic for me. I'm beginning to grasp some of the stuff, but it's still hard for me to use it in the right way. On a flat terrain, my ball is rolling smoothly and when I place my ball on top of a hill, it starts rolling down using a percentage of the gravity. However, the ball is unable to go back up the hill, because it doesn't keep track of it's directional force yet. I wrote down some kind of idea to do that, but I just felt like I had to work on other stuff first or I'd go mad.

So I thought I'd work on the Hyves API, that didn't seem too hard. Well, think again. It's not very well documented. At least, not for a Hyvertising game. They want me to get a logintoken and use my consumer key and secret to generate a unique signature so I can get my authorization token...
Wait, what? How do I get that logintoken? Well, yeah, it's in your iFrame, good luck. Right, iFrame, got it, they hid it in the link... So, how do I calculate this signature of yours? More importantly, why isn't Unity getting any response from the Hyves API? It's done the call, but I don't see any response. I don't see any errors either, so it must be good, right? What if I'd try to use the call directly in my browser? Error...
So why isn't Unity doing anything? Well apparently, in a web player, Unity is only allowed to make a call to pages on the same site as the web player is hosted. Ah. Well, that sucks. So I have to call a web page on the same site which in turn calls the Hyves API and sends the result back to Unity. Fair enough, done that.

By the time I finally got this done, the Hyves API was driving me crazy, so I decided to do something more useful for now. Create gameplay. That's what I've been doing these last two days and finally things are going well. You can grab a key, you can capture points and you can almost bump into each other and rob him of the key. So once that's done, we can finally start playtesting with my gameplay and Gor's physics.

ART: Environment Design

Last week I begun working on the environment. I started with some color key thumbnails to explore different directions we could go with the game and to see which would go well together.




After alot of thought and looking at gameplay options we decided to go with the green plant and rock environment. So the next step was to do variations on that, so I came up with the idea to have the race in a giant canyon thats been overgrown by all these weird and amazing plants.





We want the game to be very colorful so I made sure that there was alot of color in our plants, because we are gonna be filling the environment with them and alot of them are gonna have gameplay fuctionality too.

Players will be able to bounce on/off some of the plants and other plants might even catapult the players when the ride over them!




Wednesday, October 19, 2011

One page design v1



Ik heb hier de eerste versie van de one page design gemaakt. Kijk of het allemaal duidelijk is en of er misschien iets er bij moet of aangepast moet worden.

Thursday, October 13, 2011

Wednesday, October 12, 2011

ART - Adding some spice to the soup

Last weeks post I talked about doing some style exploration to spice our characters up abit. Of the 6 characters that I showed last week we chose style number 2. I did a few costume variations on it and felt quite comfortable with it.



I really like how its a racing suit, but then with an animal theme to it.


The next step was to put the other animals into the racing suits but the truth was that I wasnt really happy with how they looked. If u just looked at the animals they didnt really make u laugh, smile or anything. So I started resketching them, just doing the heads first.. and then choosing one of those and adding different types of bodies to it.

This process is working pretty good for me and the characters that are coming out are alot more fun to look at.

Monkey


Cat


Mouse Lemur