Monday, 30 May 2011

particles 5

Bitmask problem solved all i needed to do was set the bitmask as glcolor(1,1,1)
then set glcolour as the particle's colour to draw the main texture

        glPushMatrix();


       
         glColor3f (1,1,1);


        glTranslatef (parts[i].Xpos, parts[i].Ypos, parts[i].Zpos);
        glRotatef (parts[i].Direction - 90, 0, 0, 1);


        glScalef (parts[i].Scalez, parts[i].Scalez, parts[i].Scalez);


        glDisable (GL_DEPTH_TEST);
       glShadeModel(GL_SMOOTH);
        glEnable (GL_BLEND);


        glBlendFunc (GL_DST_COLOR, GL_ZERO);
        glBindTexture (GL_TEXTURE_2D,  texture1[0]);


        glBegin (GL_QUADS);
        glTexCoord2d (0, 0);
        glVertex3f (-1, -1, 0);
        glTexCoord2d (1, 0);
        glVertex3f (1, -1, 0);
        glTexCoord2d (1, 1);
        glVertex3f (1, 1, 0);
        glTexCoord2d (0, 1);
        glVertex3f (-1, 1, 0);
        glEnd();






            glColor3f (parts[i].Red,parts[i].Green,parts[i].Blue);
           
        glBlendFunc (GL_ONE, GL_ONE);


        glBindTexture (GL_TEXTURE_2D,  texture1[1]);


        glBegin (GL_QUADS);
        glTexCoord2d (0, 0);
        glVertex3f (-1, -1, 0);
        glTexCoord2d (1, 0);
        glVertex3f (1, -1, 0);
        glTexCoord2d (1, 1);
        glVertex3f (1, 1, 0);
        glTexCoord2d (0, 1);
        glVertex3f (-1, 1, 0);
        glEnd();




        glEnable(GL_DEPTH_TEST);




        glPopMatrix();





Whoa

Blending functions are interesting , also 10,000 particles

Particles 3

I have turned the particle generator into something more colourful, and now which  has made a bit-masking problem become apparent hence many of the particles are surrounded by blocks of colour that should not be visible.


Sunday, 29 May 2011

Black Jack lab

An application i created for experimenting with simple card counting systems, it allows you to create and store custom counting systems.






Despite being a simple calculator like App was surprisingly difficult to create as i had to learn how to use sqlite as i was building the application, the alternative would have been to use a text file for storing systems but i think that would have made things more difficult in the long run.










A caution to anyone that would try to use this in a casino that it is likely illegal wherever  you are. And probably a good way to get your shiny new smart phone mercilessly  stepped on.

Saturday, 28 May 2011

Particles 2

http://www.gnu.org/s/hello/manual/libc/CPU-Time.html#CPU-Time and using the clock function i have managed to make the program run more smoothly regardless of the number of particles ...though it is a bit of hack the way i have done it for now.

Thursday, 26 May 2011

Particles

Spent a bit of time converting this http://www.swiftless.com/tutorials/opengl/particles.html C particle system into a C++ program with particles classes in the hopes that doing so would give me a good idea of how it works(and perhaps allow its use in a future project), most of it went easily with 2 exceptions. The first was that i created a bottleneck by transfering the particle text within repeatedly within the draw function which brought my Computer to a grinding halt , the second was an imagined problem once i had removed the bottleneck the program was running so (when only 100 particles where in use unlike the 500 in the aforementioned tutorial) that it appeared to be going slow, as a result i spent most of my time looking for a nonexistent problem,i'll be adding a function to check the cpu clock and then i'll put up the code.

Wednesday, 11 May 2011

Whack a Taoiseach

http://www.appbrain.com/app/whack-a-taoiseach%28admob%29/lawless.wackT

I made this just around the time  the government decided to spend a week announcing we don't need a bailout and then promptly  took a huge bailout loan.
I was looking for a game Idea and figured why not make something for people to vent some anger into?

The game features the faces of both Cowen and Bertie, I used paint.net at the time to turn the images into PNG's with some areas being transparent, The hole in the background is the one left by the undeveloped Chicago spire http://en.wikipedia.org/wiki/Chicago_Spire, the fist image is mine.





For time between Christmas and some of January this game surprised me, while its use has dropped of a lot it was briefly being used about 1000 times a day assuming admobs reporting  is accurate.




The game wasn't without errors of course,luckily a friend led me to the android clock function which allowed me to make the speed a bit more consistent across multiple devices,and i spent some time trying to figure out gesture detection.



And im currently still dealing with an error that crops up if the user quickly leaves and try's to start another round of the game, hopefully AsyncTask will allow me to fix this.

An image of the menu here with different difficulty settings.

Friday, 6 May 2011

QuickshopCalc

This Application is just a simple calculator with some modifications to the GUI and functions, it was attempt to make a calculator specifically for people to use while shopping.

Since shops often price items in ways to make the product seem cheaper while getting the most money from our purchases we often seem items priced at 4.99 or  6.96 both of these may as well be 5.00 and 7.00 ,but taking that cent or three off is enough to remove the sting of overcharging for something while keeping a good profit margin.

Thats why this application is built with buttons like "99" or ".99" instead of most normal calculators with "123456789".


It also uses to text displays, the one on the bottom is for displaying the overall total the one on the top is for displaying the current price of the item being added.

I consider this application moderately a success as it seems to have been downloaded much more than my previous applications.

Thursday, 5 May 2011

Logcat

Got my first introduction to Logcat, through a bug in an older program , brilliant

pomodoro

The pomodoro technique may just be the only thing that can curb my procrastination