Blobmonster

Previous topic - Next topic

Kitty Hello

Nice. Here's my first idea:

mentalthink

Hi I try a simple modification, but I like too much, on Alphamode, I think is for polyvertor apply a velua about 0.7 or 0.8, well you have a cool effect like a gum, it´s like seem a viscosity fluid, the effect is really cool. Try it, in my opinion a Like more than the original, but it´s only my personal opinion.

Kind Regards,
Iván J.

Hatonastick

Kitty:  That Wii mini-game is a surprising amount of fun I always thought.

Albert:  That's seriously cool.  I love the little guy.  Reminds me a bit of some of the 'fish' you find in the deeper parts of the ocean with luminescent bits.
Mat. 5: 14 - 16

Android: Toshiba Thrive Tablet (3.2), Samsung Galaxy Tab 2 (4.1.2).
Netbook: Samsung N150+ Netbook (Win 7 32-bit + Ubuntu 11.10).
Desktop: Intel i5 Desktop with NVIDIA GeForce GTX 460 (Win 8.1 64-bit).

Albert

Change part of the the main code to this:
Code (glbasic) Select
//create a blobMonster object
GLOBAL test AS blobMonster

test.Create(10, 10)

SETLOOPSUB "GLB_ON_LOOP" // - GLBasic V11 calls this at the END of "main"


//main loop
@SUB GLB_ON_LOOP: // this is called by the framework after the "main" init module
//update and draw the blobmonster
CLEARSCREEN
test.Update()
test.Draw()

SHOWSCREEN
ENDSUB


Compile to HTML5 and you get this:

https://dl.dropboxusercontent.com/u/292449/blobmonster.html

Albert

For a little HTML5 benchmark test modify tha main code again to this:

Code (glbasic) Select
//create a blobMonster object
GLOBAL test[] AS blobMonster
CONSTANT numBlobs=10
REDIM test[numBlobs]

FOR i=0 TO numBlobs-1
test[i].Create(RND(300), RND(300), RND(1000))
NEXT

SETLOOPSUB "GLB_ON_LOOP" // - GLBasic V11 calls this at the END of "main"


//main loop
@SUB GLB_ON_LOOP: // this is called by the framework after the "main" init module
//update and draw the blobmonster
CLEARSCREEN
FOR i=0 TO numBlobs-1
test[i].Update()
test[i].Draw()
NEXT

SHOWSCREEN
ENDSUB


and blobMonster.Create to this:
Code (glbasic) Select
//function that returns a new blob monster object. Blitzmax equivalent (kind of)
//of a constructor in C++/Java
FUNCTION Create AS blobMonster:inX#, inY#, inTime#
DIM self.tail[self.segments]
//starting point of the blob monster
self.x = inX
self.y = inY
self.time = inTime
//give the tail some coordinates, just make them the same as the main x and y for now
FOR i = 0 TO self.segments - 1
self.tail[i].x# = inX
self.tail[i].y# = inY
NEXT

RETURN self
ENDFUNCTION


And you got this:
https://dl.dropboxusercontent.com/u/292449/blobmonster30.html