This is so stupid that it is easy this is c++.
/*
Name: Water demo
*/
#include "Main.h"
// let the compiler know we're using the AGK namespace
using namespace AGK;
#include <vector>
using namespace std;
// declare our app
app App;
vector<int> list;
vector<int>::iterator listitr;
void app::Begin ( void )
{
// load our image
agk::LoadImage ( 1, "blob.png" );
agk::CreateSprite ( 1, 1 );
agk::SetSpritePosition(1,-10,-10);
agk::SetSpriteSize(1,16,16);
agk::SetPhysicsWallBottom(0);
agk::SetPhysicsWallLeft(0);
agk::SetPhysicsWallTop(1);
}
void app::Loop ( void )
{
agk::Print(agk::ScreenFPS());
int copy=agk::CloneSprite(1);
list.push_back(copy);
agk::SetSpritePhysicsOn ( copy, 2 );
agk::SetSpriteShapeCircle(copy,0,0,1);
agk::SetSpritePosition(copy,200,400);
agk::SetSpriteColor(copy,0,100,200,200);
agk::SetSpritePhysicsVelocity(copy,-50,-200);
//for(int xcnt=
for(int xcnt=0;xcnt<list.size();xcnt++)
{
if(agk::GetSpriteX(list[xcnt])<0)
{
agk::DeleteSprite(list[xcnt]);
list.erase(list.begin()+xcnt);
}
if(agk::GetSpriteY(list[xcnt])<0)
{
agk::DeleteSprite(list[xcnt]);
list.erase(list.begin()+xcnt);
}
//listitr++;
}
// this function gets called on a continual basis, use this to update your
// game logic and deal with input and other events
// we call agk::Sync to update the screen, when this happens our sprite
// will get drawn on screen
agk::Sync ( );
}
void app::End ( void )
{
// this function gets called when the game ends, in here you can clean up
// all resources and deal with things like saving game data
}
just make a round ball 16 by 16 pixels that is fuzzy.
Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps. Developed the tiled map engine seen on the showcase. Veteran for the military.