Collision detection plugin

This forum is meant for announcing new plugins, downloading other people's plugins, posting questions, etc.

Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support

Collision detection plugin

Postby juhuwoorps » Sat May 01, 2010 11:37 am

After a sleepless night, tons of cigarettes and a lot of frustrating moments I was able to make the Collition detection plugin.
I have made this plugin for puzzlegames like the slider puzzles where you have to move out a tile from box.
The plugin is easy to handle, but it have some limitations at the moment:

- The first hotspot you set, the small site of the hotspot sets the size of the movement.

- There are limitations for the hotspot sizes and coordinates:
the small site of the hotspots has to be dividable by 2 and the long site of the hotspot has to be a multible of the short site.
For example:
If you have a lenght of 50px for the short site, the longer site must have a size of 100(*2) or 150(*3) or certainly 50 (*1)

If you have a lenght of 6px for the short site, the longer site must have a size of 12, or 18, or 6 ....

-The hotspot coordinates of top and left have to be dividable by the short site of the hotspots


This sounds a bit difficult, but as when you run the demo for this plugin you'll see what I mean and you'll see that it's easy to handle.

If you have placed your hotspots well, just activate the plugin on each hotspot and select the allowed movements.


Zhe zip file includes the plugins and a projectfolder with the demogame http://wuttiggames.com/downloads/collitiondetection4.zip

I hope this plugin is helpful for your game creations and I would be glad to see some minigames with this plugin!

Oh, please note: If you have activated the plugin in a hotspot, it detects collitions to all hotspots in the frame!


Have fun
greetings juhuwoorps
Last edited by juhuwoorps on Sun May 02, 2010 4:45 pm, edited 1 time in total.
juhuwoorps
Code Master
 
Posts: 622
Joined: Tue Jul 08, 2008 3:13 pm

Postby Lyberodoggy » Sun May 02, 2010 10:36 am

Lyberodoggy's Old post wrote:Thanks! :)
I 'm gonna test, tweak and provide feed-back within the next few hours.


EDIT: I 'm working on the code already. Trying to fix some things


here's an updated version. Please don't use the join feature as it is still under development and doesn't work properly yet.

In the updated version some code has been deleted as it wasn't needed, a bug concerning an unregistered variable was fixed and hotspots collision detection can now work even if hotspots aren't on a grid or the same size.
Attachments
collisiondetection3.zip
(1.29 KiB) Downloaded 383 times
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby juhuwoorps » Sun May 02, 2010 10:56 am

Sorry but your modification doesn't run properly.
Sometimes I can't get the hotspot to move, although there should be move possible. Also the movement of the full size of the longer site isn't good to make puzzle.

Can you say which variable wasn't registered?
juhuwoorps
Code Master
 
Posts: 622
Joined: Tue Jul 08, 2008 3:13 pm

Postby Lyberodoggy » Sun May 02, 2010 12:49 pm

I think it was the all_hotspots

Found the bug too. I 'll try to kill it.
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Re: Collition detection plugin

Postby Mystery » Sun May 02, 2010 1:24 pm

juhuwoorps wrote:After a sleepless night, tons of cigarettes and a lot of frustrating moments

If you add 10 cups of espresso, then it could be me finishing up a game :lol: :lol: :lol:

Thanks for all your work juhu! :D

And I like the co-operation on plugins with fixes and further developments Doggy :)

I'll have a look at the plugin when it's fixed, I'm curious how it looks like - is it easy to use?
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby juhuwoorps » Sun May 02, 2010 4:42 pm

I have updated my first version of the plugin because I had some issues as I tried to make a demogame with the plugin.
I also added a second plugin where you can set your escaping variables in the frame properties.

The zipfile includes both plugins and the project folder with the demo game.

http://www.wuttiggames.com/downloads/collitiondetection4.zip

To help you with setting the hotspots to the rigth place I have made another plugin!
At my personal opinion it's neccesary for this sort of minigames, that you have your hotspots at the right place so that you all can get smooth and well working.
But placing HS in AM can be a ****** work.

I have made this plugin special for the slider puzzles which are able with the collition plugin, but i think you will have also a need for other stuff.

Ok Let' see how it works:

This is a picture of my frame out of AM
Image

You see the hotspots are messed up.

If you now test your frame. you will see something like this:

Image

It's the same as in the editor!

If you are using the automatic_hs_placement plugin in the frame properties it looks like that:

Image


Hope this helps you with your games :)
Attachments
collitiondetection4.zip
(348.07 KiB) Downloaded 387 times
juhuwoorps
Code Master
 
Posts: 622
Joined: Tue Jul 08, 2008 3:13 pm


Return to The Plugins Corner

Who is online

Users browsing this forum: No registered users and 0 guests