Monday 9 July 2012

Busy.....Doing nothing

So I haven't updated this in a while as I was busy ...doing nothing. To be perfectly honest I lost my self in an MMO again! Also I found that I could not be bothered as it was summer holidays I generally wanted to have fun but as they say "This should be fun for you, it is after all what you want to do for the rest of your life".


Over the course of the last month I have had many ideas for the project I am working on but not had the motivation to put them into practice. So after just sitting around today I decided "Why the hell not start my project"


So with my music blasting in my headphones I set to work, I say work, every time I program I remember why I love it so much, so before I knew it I had set up the basic framework for the project.



Cyan Block - Player
Green Blocks - Ledges
Red Block - Lava
Black/Red Bar - Rising lava level bar

So the codename for this project is project_climb, dumb I know but its a place-holder at the moment. This is being created for Android and is using the 2.2 SDK purely as it is the most widely used version of android used. Had I decided to opt for the use of 4.0+ I would be eliminating a wide variety of potential players. Also the design of this project does not require any of the advanced features that have been placed in the later versions of android, so yeah 2.2 is where I want to be.


Okay on to the  project, simple in design really, the idea is for the player to jump from ledge to ledge as efficiently as possible attempting to keep up the pace to outrun the lava, which is indicated by the bar at the side. If the player does not optimize his jump correctly it will slow him down in the long run, allowing the lava to catch up on him.


The ledges were made at the moment with simple array and randomiser implementations :-


1:      private Random randomX = new Random();  
2:       private Random randomY = new Random();  
3:       private int minX = 0;  
4:       private int maxX = 320;  
5:       private int minY = -200;  
6:       private int maxY = 480;  
7:       private int shuffleX = 0;  
8:       private int shuffleY = 0;  
9:    
10:         
11:       public foothold(){            
12:            for (int i = 0; i < NUMOFFOOTHOLDS; i++) {  
13:                 shuffleX = randomX.nextInt(maxX - minX + 1) + minX;  
14:                 shuffleY = randomY.nextInt(maxY - minY + 1) + minY;  
15:                 base[i] = new RectF(shuffleX, shuffleY, shuffleX + 20,  
16:                           shuffleY + 5);  
17:            }  
18:       }  


I am well aware that this method is far from a efficient design as the ledges are randomised on start-up it would be insane to expect anyone to complete the level or expect them to get to any of the ledges. This randomiser was put in for quickness sake as I had fifty ledges that I was not willing to hard code until I had the specifics of the players jump down, which will prove a necessity when placing the ledges. Currently working on a way to optimise the ledges with minimal hard coding.


I also had the idea to introduce gravity at the standard 9.81m/s^2 , nothing fancy at the moment. This will add an extra element to the project in that originally the player was to jump from ledge to ledge and never fall but now if I decide to add gravity there will be the danger of missing a ledge and falling to their death. Which in turn also means more advanced controls than originally proposed but still simple enough.


As stated before this is only the framework, what is seen in the image above are place-holders, so as it may not look the part at the moment, it will nearer completion. Trust me I am also the art guy on this project .


I'll continue update this blog with my progress on both my projects, I just hope my next entry isn't so far in the future.





No comments:

Post a Comment