Physion

  • Increase font size
  • Default font size
  • Decrease font size
Welcome, Guest
Username Password: Remember me

Virus 2.0 by Lynxx
(1 viewing) (1) Guest
  • Page:
  • 1
  • 2

TOPIC: Virus 2.0 by Lynxx

Virus 2.0 by Lynxx 6 years, 6 months ago #105

  • Lynxx
  • OFFLINE
  • Gold Boarder
  • Java/C#-Developer
  • Posts: 223
Virus reworked, now with cellgrowth and some more goodies.

Virus2.0.scene

Infinity is vast, especially near end.
bye, Lynxx
Last Edit: 6 years, 6 months ago by Lynxx.

Re: Virus by Lynxx 6 years, 6 months ago #106

  • Dimitris
  • OFFLINE
  • Administrator
  • Posts: 218
Nice work Lynxx!

I liked the idea of "mutating" child's "OnUpdate" based on mother's "OnUpdate"
 
circ.OnUpdate = this.OnUpdate.replace("spawncount = "+spawncount, "spawncount = " + rnd);
 


By the way, how did you render the scene? Did you use some desktop recording software or did you use ffmpeg (as described here)

I also added your video in the video section

Re: Virus by Lynxx 6 years, 6 months ago #107

  • Lynxx
  • OFFLINE
  • Gold Boarder
  • Java/C#-Developer
  • Posts: 223
admin wrote:
By the way, how did you render the scene? Did you use some desktop recording software or did you use ffmpeg (as described here)

No, i tried with ffmpeg, but i always only got some ugly pink videos ..
I used VirtualDub, works execellent, just open the first frame and will recognize it as a Image Sequence.

BTW: It seems it's not possible to use removeBody in the onUpdate/onContact-Functions.
I tried something like:
this.Brush = other.Brush;
world.removeBody(other);
 

which works a few times, but then Physion crashes.
It seems the other objects/functions of the other-obj are still in some queue.
Infinity is vast, especially near end.
bye, Lynxx

Re: Virus by Lynxx 6 years, 6 months ago #116

  • Dimitris
  • OFFLINE
  • Administrator
  • Posts: 218
Hey Lynxx,

I *think* that you cannot remove the "other" object during OnContact.I should search that a little bit in Box2D forums though...

I updated the Rendering a Scene article and I added VirtualDub as an alternative method for producing the final video.

Thanks

Re: Virus by Lynxx 6 years, 6 months ago #202

  • Lynxx
  • OFFLINE
  • Gold Boarder
  • Java/C#-Developer
  • Posts: 223
admin wrote:
Hey Lynxx,

I *think* that you cannot remove the "other" object during OnContact.I should search that a little bit in Box2D forums though...


Found anything about it?

I've update Virus to V2.0.
Infinity is vast, especially near end.
bye, Lynxx

Re: Virus by Lynxx 6 years, 6 months ago #205

  • Dimitris
  • OFFLINE
  • Administrator
  • Posts: 218
Found anything about it?
I think I did.

When two bodies ( A, B ) collide their corresponding "OnContact" will be evaluated. Now if you delete body B from the "OnContact" of body A then the script engine will call a method of a null object (B.onContact). Sometimes, as you're saying, this may not happen if for example you remove A from B.OnContact

What you just read was an intro to officially verify that this...

BTW: It seems it's not possible to use removeBody in the onUpdate/onContact-Functions.
I tried something like:
Code:
this.Brush = other.Brush;
world.removeBody(other);

which works a few times, but then Physion crashes.


... is a bug
  • Page:
  • 1
  • 2
Moderators: Glenn555
Time to create page: 0.13 seconds