Blober engine update

Post your Construct-made creations, announce your websites, etc.

Blober engine update

Postby QuaziGNRLnose on Sun Oct 05, 2008 12:31 am

well ive been working on my quazi blober game for a week or so and so far ive come up with this, it still has no legs and the gun is lacking animation, but its coming along nicely and im quite proud of it

im gonna release this open source, but it will likely be one of the last open source releases of this project, its uncommented cause im lazy.

ive added quite a few things, and changed how the gun looks considerably

test 'er out and tell me what you think

http://www.mediafire.com/download.php?t1jgdtmggdj

PS: why isnt there an uploader for this forum?
Image
User avatar
QuaziGNRLnose
 
Posts: 872
Joined: Sat Aug 02, 2008 3:26 am
Location: CANADA!

Re: Blober engine update

Postby BROO on Sun Oct 05, 2008 12:42 am

You can upload your files only in the "Upload" section.
Code: Select all
X: (((Sprite15.x+((Sprite14.x-Sprite15.x)* ('t')))+(((Sprite14.x+((Sprite.ImagePointX(5)-Sprite14.x)* ('t')))-(Sprite15.x+((Sprite14.x-Sprite15.x)* ('t'))))* ('t')))+((((Sprite14.x+((Sprite.ImagePointX(5)-Sprite14.x)* ('t')))+(((Sprite.ImagePointX(5)+((Sprite.ImagePointX(4)-Sprite.ImagePointX(5))* ('t')))-(Sprite14.x+((Sprite.ImagePointX(5)-Sprite14.x)* ('t'))))* ('t')))-((Sprite15.x+((Sprite14.x-Sprite15.x)* ('t')))+(((Sprite14.x+((Sprite.ImagePointX(5)-Sprite14.x)* ('t')))-(Sprite15.x+((Sprite14.x-Sprite15.x)* ('t'))))* ('t'))))* ('t')))

Y: (((Sprite15.y+((Sprite14.y-Sprite15.y)* ('t')))+(((Sprite14.y+((Sprite.ImagePointY(5)-Sprite14.y)* ('t')))-(Sprite15.y+((Sprite14.y-Sprite15.y)* ('t'))))* ('t')))+((((Sprite14.y+((Sprite.ImagePointY(5)-Sprite14.y)* ('t')))+(((Sprite.ImagePointY(5)+((Sprite.ImagePointY(4)-Sprite.ImagePointY(5))* ('t')))-(Sprite14.y+((Sprite.ImagePointY(5)-Sprite14.y)* ('t'))))* ('t')))-((Sprite15.y+((Sprite14.y-Sprite15.y)* ('t')))+(((Sprite14.y+((Sprite.ImagePointY(5)-Sprite14.y)* ('t')))-(Sprite15.y+((Sprite14.y-Sprite15.y)* ('t'))))* ('t'))))* ('t')))

Angle: angle( lerp(lerp(Sprite15.x, Sprite14.x, 't'),lerp(Sprite14.x, Sprite.ImagePointx(5),'t'),'t') , lerp(lerp(Sprite15.y, Sprite14.y, 't'),lerp(Sprite14.y, Sprite.ImagePointy(5),'t'),'t') ,   lerp(lerp(Sprite14.x, Sprite.ImagePointx(5), 't'),lerp(Sprite.ImagePointx(5), Sprite.ImagePointX(4),'t'),'t') , lerp(lerp(Sprite14.y, Sprite.ImagePointy(5), 't'),lerp(Sprite.ImagePointy(5), Sprite.ImagePointy(4),'t'),'t') )

Hope you hadn't much debugging this stuff because it looks kinda messy. Sure it looks flawless, but I think you should pay more attention to documenting your code.
PV - private variable
obj('myVar') - PV named 'myVar' belonging to 'obj' (usually sprite)
ACE - actions, conditions, expressions (you build events with them)
SOL - selected object list (some ACEs modifies list of objects that are affected by actions)
User avatar
BROO
 
Posts: 204
Joined: Thu Aug 30, 2007 7:03 pm

Re: Blober engine update

Postby QuaziGNRLnose on Sun Oct 05, 2008 12:50 am

well yah bezier curves tend to be reallly messy code, and theres not much i could do about it

but i have a saved cubic curve file in word that i use, then all i have to do is replace all the inputs which are :1:,:2:,:3:,:4: and :t: with whatever id like them to be, so it doesnt take much time to debug.

right now im just feeling out how to do things,order tends to really matter in this thing since all the parts and movements have to be layered so that they dont jitter ect, and i cant plan for things which i havnt created yet (like legs), after i do that i simply group my events and rename all the sprites, i prefer to work as i go, but i do pre plan in my head and on paper for some stuff.

i really hate that bezier code, it clogs up the event sheet and it gets really confusing

it took me 5 tries to get my intial code to work, i was planning on uploading the example i had made, maybe later
Image
User avatar
QuaziGNRLnose
 
Posts: 872
Joined: Sat Aug 02, 2008 3:26 am
Location: CANADA!

Re: Blober engine update

Postby deadeye on Sun Oct 05, 2008 12:51 am

Woah, that hose is awesome :shock:

How the hell did you even do that? Oh:

BROO wrote:
Code: Select all
X: (((Sprite15.x+((Sprite14.x-Sprite15.x)* ('t')))+(((Sprite14.x+((Sprite.ImagePointX(5)-Sprite14.x)* ('t')))-(Sprite15.x+((Sprite14.x-Sprite15.x)* ('t'))))* ('t')))+((((Sprite14.x+((Sprite.ImagePointX(5)-Sprite14.x)* ('t')))+(((Sprite.ImagePointX(5)+((Sprite.ImagePointX(4)-Sprite.ImagePointX(5))* ('t')))-(Sprite14.x+((Sprite.ImagePointX(5)-Sprite14.x)* ('t'))))* ('t')))-((Sprite15.x+((Sprite14.x-Sprite15.x)* ('t')))+(((Sprite14.x+((Sprite.ImagePointX(5)-Sprite14.x)* ('t')))-(Sprite15.x+((Sprite14.x-Sprite15.x)* ('t'))))* ('t'))))* ('t')))

Y: (((Sprite15.y+((Sprite14.y-Sprite15.y)* ('t')))+(((Sprite14.y+((Sprite.ImagePointY(5)-Sprite14.y)* ('t')))-(Sprite15.y+((Sprite14.y-Sprite15.y)* ('t'))))* ('t')))+((((Sprite14.y+((Sprite.ImagePointY(5)-Sprite14.y)* ('t')))+(((Sprite.ImagePointY(5)+((Sprite.ImagePointY(4)-Sprite.ImagePointY(5))* ('t')))-(Sprite14.y+((Sprite.ImagePointY(5)-Sprite14.y)* ('t'))))* ('t')))-((Sprite15.y+((Sprite14.y-Sprite15.y)* ('t')))+(((Sprite14.y+((Sprite.ImagePointY(5)-Sprite14.y)* ('t')))-(Sprite15.y+((Sprite14.y-Sprite15.y)* ('t'))))* ('t'))))* ('t')))

Angle: angle( lerp(lerp(Sprite15.x, Sprite14.x, 't'),lerp(Sprite14.x, Sprite.ImagePointx(5),'t'),'t') , lerp(lerp(Sprite15.y, Sprite14.y, 't'),lerp(Sprite14.y, Sprite.ImagePointy(5),'t'),'t') ,   lerp(lerp(Sprite14.x, Sprite.ImagePointx(5), 't'),lerp(Sprite.ImagePointx(5), Sprite.ImagePointX(4),'t'),'t') , lerp(lerp(Sprite14.y, Sprite.ImagePointy(5), 't'),lerp(Sprite.ImagePointy(5), Sprite.ImagePointy(4),'t'),'t') )



Ughhhhhh my poor brain. It shuts down just from looking at that code. :(

And "lerp" is the sound my guts make when I think about trying something like that myself.
User avatar
deadeye
"I'm on here way too much"
 
Posts: 3485
Joined: Sun Nov 11, 2007 6:44 pm

Re: Blober engine update

Postby QuaziGNRLnose on Sun Oct 05, 2008 1:15 am

its not that conusing :lol:

edit: LOL conusing, i mean confusing
Image
User avatar
QuaziGNRLnose
 
Posts: 872
Joined: Sat Aug 02, 2008 3:26 am
Location: CANADA!

Re: Blober engine update

Postby Ashley on Sun Oct 05, 2008 1:43 am

Nice engine, I love this effect :) Would definitely make for a creative game.

Does this help simplify the math?

From the wiki... wrote:Qarp(a, b, c, x)
Quadratic interpolation. Returns lerp(lerp(a, b, x), lerp(b, c, x), x)
User avatar
Ashley
 
Posts: 4046
Joined: Mon May 21, 2007 6:00 pm
Location: UK

Re: Blober engine update

Postby QuaziGNRLnose on Sun Oct 05, 2008 1:55 am

how can i use qarp for cubic curves?

is this for that?
"Quadratic interpolation. Returns lerp(lerp(a, b, x), lerp(b, c, x), x)"

im unsure what lerp is tho plz explain ill check the wiki 2

and is x the time value

a number from 0 to 1
Image
User avatar
QuaziGNRLnose
 
Posts: 872
Joined: Sat Aug 02, 2008 3:26 am
Location: CANADA!

Re: Blober engine update

Postby Drasa on Sun Oct 05, 2008 8:29 am

QuaziGNRLnose wrote:how can i use qarp for cubic curves?

is this for that?
"Quadratic interpolation. Returns lerp(lerp(a, b, x), lerp(b, c, x), x)"

im unsure what lerp is tho plz explain ill check the wiki 2

and is x the time value

a number from 0 to 1


Cubic curves would be... lerp(lerp(lerp(a, b, x), lerp(b, c, x), x), lerp(lerp(b, c, x), lerp(c, d, x), x))

In other words... lerp(qarp(a, b, c, x), qarp(b, c, d, x))

You should use this instead of self-made expression since it performs faster and is looks cleaner :).
Whew.
Drasa
 
Posts: 262
Joined: Tue Jun 05, 2007 11:07 am
Location: Finland

Re: Blober engine update

Postby David on Sun Oct 05, 2008 11:15 am

Very nice :D Small suggestion : Make the set y of sprite this:

Sprite2.y+('y')+ min(0,(sin(Sprite.angle)*40))

Makes the arms not move away as much and looks better when facing down. I presume u'll limit the directions so if it passes 90 degrees it turns around etc.

The maths for the pipe was a real mind f***
The Aussie Guy
User avatar
David
Site Admin
 
Posts: 566
Joined: Mon May 21, 2007 5:58 pm
Location: Australia

Re: Blober engine update

Postby alee on Sun Oct 05, 2008 12:19 pm

Agh I hate bezier curves. I used them for the beta dead reckoning on Eden back in the day. They are pretty genious though. And that game is looking ridiculously nice. Nice work!

PS. Comment that code!
Play Lucidity! currently featured on gamejolt :)

Fight my brute, "Nobflesh" :D
alee
Harbinger of Doom
 
Posts: 391
Joined: Sun Nov 04, 2007 7:33 pm
Location: UK

Next

 • Print view • A/a

Return to Your Creations

Who is online

Users browsing this forum: Aeal5566 and 1 guest