lördag 1 januari 2011

Dagbok

21/1: Finally, a functioning demo where the dude floats around until he's colliding with a planet. The collision detection is super light weight, the dude has a public field radiusLightWeightCollision and so does all the planets.

So... what will happen at collision? Well, the dude's state will be "running" or "attached" or something similar, the physics will be replaced with the behavior of running about on a planet, so why not change the components to reflect that? Which components will be necessary? Firstly, user input takes a very different form: an arrow will be painted on top of the dude, starting in his center and pointing towards the point where the finger is on the screen. Secondly, the dude will have an elaborate way of moving, which must be calculated. Hmmm....
1) Extract the point where the finger is, and deal with multiple points of contact.
2) Calculate the distance to the point, translate that to a force.
3) project that force onto the tangent that is defined by the circle of the planet and the point on the circumference where the dude is.
4) Calculate the resulting angular velocity, and from that the resulting position.
5) Propagate the dude.
6) Draw the arrow, proportional to the non-projected force.

14/1: I almost have a player floating around, there's just one problem: how should I work with physics? In Replica Island he's using stuff like impulse, acceleration and stuff but it might be overkill.

9/1: Ok nu finns ett referenssystem, så målet är uppnått. Nu har jag börjat lägga till en player. Det rör upp en massa frågor. Hur ska vi lösa gravitationsfrågan? Det är ju inte spikat hur det ska fungera med fysiken. ObjectRelationSystem får hjälpa till här med men jag vet inte riktigt hur ännu.
Kollision och animation: Ska vi ta hela systemet med RenderComponent, AnimationComponent och SpriteComponent med hull och hår? Hur löser vi faktumet att bilder ska rotera i spelet? Så är det ju inte i Replica Island.
Hm. Så här måste det nog bli tills vi har bilder att animera: Låt dude bestå av en enda animation frame, med sfärisk kollisionsvolym. Ge planeterna sfäriska kollisionsvolymer de med. Det blir en bra början!

Nästa mål, alltså:
Hitta på en enkel lösning för gravitation.
Tillverka dude och planeter med en enda frame och med sfäriska kollisionsvolymer. Utnyttja DynamicCollisionSystem eller vad det heter, och fånga upp eventet att de kolliderar.

6/1: Har fastnat i vinkelvolten. Så många system, nånstans måste jag börja!! Nu finns en blogpost som ska sammanfatta alla delsystem. Idag är målet: Få en planet att stå stilla, en annan att kretsa kring den första, och en tredje att kretsa kring den andra.

4/1: Johan och Bagarn träffades och pratade framtiden. Förslag: skriv en affärsplan och ta med den till Venture Cup, bara för att få lite feedback.

I vilken form vill vi arbeta, hur vill vi tjäna pengar? Samarbeta med t ex Cybercom, som kan ragga stora kunder, och kanske iPhone-app-studios? Dvs agera outsourcing-företag, ta beställningsjobb? Eller vill vi satsa på egna appar och spel helt och hållet?


1/1: Just nu sitter jag och lägger upp ramverket för att läsa fram en level ur en fil. Den stora frågan just nu: Hur får man med bilder på ett snyggt och snabbt sätt?

Under julen städade jag i koden, fick bort en hel del Replica Island-grejer.

Inga kommentarer:

Skicka en kommentar