Blober engine update

Post your Construct-made creations!

Post » Sat Oct 04, 2008 11:31 pm

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?
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Sat Oct 04, 2008 11:42 pm

You can upload your files only in the "Upload" section.
[code:1r6s8h2j]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') )[/code:1r6s8h2j]
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.
B
6
S
3
G
6
Posts: 219
Reputation: 3,013

Post » Sat Oct 04, 2008 11:50 pm

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
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Sat Oct 04, 2008 11:51 pm

Woah, that hose is awesome :shock:

How the hell did you even do that? Oh:

[quote="BROO":1zll5md5][code:1zll5md5]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') )[/code:1zll5md5][/quote:1zll5md5]


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.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sun Oct 05, 2008 12:15 am

its not that conusing :lol:

edit: LOL conusing, i mean confusing
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Sun Oct 05, 2008 12:43 am

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

Does this help simplify the math?

[quote="From the wiki...":iot4sxv8]Qarp(a, b, c, x)
Quadratic interpolation. Returns lerp(lerp(a, b, x), lerp(b, c, x), x) [/quote:iot4sxv8]
Scirra Founder
B
358
S
214
G
72
Posts: 22,946
Reputation: 178,333

Post » Sun Oct 05, 2008 12: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
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Sun Oct 05, 2008 7:29 am

[quote="QuaziGNRLnose":1838oa40]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[/quote:1838oa40]

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 :).
B
3
S
2
G
5
Posts: 263
Reputation: 2,201

Post » Sun Oct 05, 2008 10: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***
B
4
S
2
G
5
Posts: 641
Reputation: 3,011

Post » Sun Oct 05, 2008 11:19 am

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!
B
2
S
2
G
5
Posts: 448
Reputation: 2,546

Next

Return to Your Creations

Who is online

Users browsing this forum: No registered users and 2 guests