DesktopX Object Collision detection

edit: I've reworded this post and categorized under DesktopX - I'm hoping to spark some interest from DesktopX developers.
For fun of course!


Using dxCanvas by LittleBoy we have access to a flexible in memory image map within DesktopX.
This opens up a number of collision techniques used often in simple game development.

I've done some testing and created some videos and interactive DesktopX objects to experiment implementing these techniques.
I'll keep updating the list below and hopefully get some discussion going from interested DesktopX developers.

What would this be useful for? Maybe small DesktopX based games? Better object/object interaction?
I for one will be trying to get a couple small games out.

All files are in my public skyDrive under the dxCanvasCollisions:

https://skydrive.live.com/redir.aspx?cid=ff1faf74706c5bbc&resid=FF1FAF74706C5BBC!152

  • collision.swf - pixel based collision which respects alpha channel of objects - uses dxCanvas overlay masking
  • collisionDemo.exe - a shoddy but working interactive DesktopX gadget - rectangle based collision
  • collisionDemo2.swf - pixel based collision - uses dxCanvas pixel lookup methods

Hope this sparks some interest/new ideas.

7,897 views 7 replies
Reply #1 Top

Ok, I saw it, I don't get it. But I can be a tad dense at times....shut up Yrag. 

Reply #2 Top

Bounding box collisions are easily doable in DesktopX.
But sometimes pixelbased collisions are useful for games - or other image-image interactions.

DesktopX has no way of doing this, except now with dxCanvas I can use the in memory rendering methods it exposes to rapidly do image composition.
dxCanvas also exposes a pixel array which lets you check every pixel in a range for a particular colour combination.

It's really a 'tech' demo - to show it can be done in DesktopX without it being too slow and useable.

There's an 'interactive demo' now called 'collisionDemo.exe' on my skyDrive - I just cobbled it together as quickly as possible to test some collision methods.
It also doesn't demo the pixel collision too well, sometimes the collision occurs before the 'draw' of the object and it looks like box collision is all that is at play.

Maybe you'd like to make a DesktopX game RND?

 

 

Reply #3 Top

Well, I might....If you can get this hillbilly mind to understand, lol.  ;)

Reply #4 Top

That's fantastic. I had some ideas for pixel-pixel collision once. My problem with dxCanvas is the need to turn on UAC on Vista, but this is definitely worth exploring.

+1 Loading…
Reply #5 Top

Turn on? or Turn off?

Reply #6 Top

Quoting sViz, reply 4
My problem with dxCanvas is the need to turn on UAC on Vista, but this is definitely worth exploring.

I remember the original version had problems working on certain computers (with UAC off), but I thought I fixed it a long time ago. Are you still having problems with it?

Reply #7 Top

Yeah, no go with UAC off. Nothing shows up. First error in the stars script, for example is canvas.width is null. Once I turn on UAC everything works fine. (But I dislike UAC.)