Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK .NET / Hex grid snap code for a bust a move like clone

Author
Message
StOrM3
20
Years of Service
User Offline
Joined: 24th Sep 2003
Location: Cyberspace
Posted: 16th Apr 2010 20:10
Hello,

Just wondering if someone could show me an example on how to place the balls you shoot up to the top of the screen in a bust a move clone, in a hex grid fashion.. I know you have to offset like every other line, half the size of the balls, but I have some errors, like once the balls are placed, sometimes they overwrite a ball that is already there, even when using collision detection.. Any code snippets that I could run on a ball that has been shot, and on collision or before collision, that I could call to help place the balls correctly, would be greatly appreciated..

Thanks,

Ken

[PKE] Pain Killa Entertainment(tm) [PKE]
Pain Brings Reality...
[PKE] Pain Killa Entertainment(tm) [PKE]
APEXnow
Retired Moderator
20
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 16th Apr 2010 23:28 Edited at: 17th Apr 2010 12:29
StOrM3,

One suggestion would be to use an array which allows you to place ball position, and maybe a ball colour or texture ID?

I'll put together a small sample for you to illustrate what I had in mind.

Give me an hour ans I'll post it up for you.

[Not forgot, will have something this afternoon, was a long day Friday and I fell asleep]

Paul.

StOrM3
20
Years of Service
User Offline
Joined: 24th Sep 2003
Location: Cyberspace
Posted: 21st Apr 2010 07:03
APEX any chance of me snagging that example?

[PKE] Pain Killa Entertainment(tm) [PKE]
Pain Brings Reality...
[PKE] Pain Killa Entertainment(tm) [PKE]
APEXnow
Retired Moderator
20
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 21st Apr 2010 22:36
Yep, I have started on this for you, I'll get a copy of it over to you asap.

Paul.

APEXnow
Retired Moderator
20
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 22nd Apr 2010 21:33
StOrM3

If I have misunderstood your request, then I apologise, but please find attached, a sample DarkGDK.NET project that illustrates my ball positioning code. I've not added any ball movement for your cannon ball or anything, but if this is something that needs to be done, I can probably help in this respect.

A screen shot is also attached to show you what it looks like. Very simple obviously, but the ball list can be used for collision functions etc.



You may need to re-reference the DarkGDK/DGDKLib and DGDKPlugins dll files as my version is slightly different to yours.

Paul.

Attachments

Login to view attachments
StOrM3
20
Years of Service
User Offline
Joined: 24th Sep 2003
Location: Cyberspace
Posted: 27th Apr 2010 06:55
did you make the balls 3d / or 2d? Either way I guess it will work, I haven't had a chance to look at your code yet, i just remembered you were working on it for me... I have been busy installing all my plugins and stuff, setting up my dark physics etc.. I thought about maybe using 3D Balls, instead of 2D Sprites, but the way I was planning on doing it was simply using 2D Sprites and pixel perfect collision detection... I will hit you back, I'm sure, as I would like to find out the movement and actual collision routines you used..

thanks again, apex...

[PKE] Pain Killa Entertainment(tm) [PKE]
Pain Brings Reality...
[PKE] Pain Killa Entertainment(tm) [PKE]
StOrM3
20
Years of Service
User Offline
Joined: 24th Sep 2003
Location: Cyberspace
Posted: 27th Apr 2010 07:28
I keep getting this inner exception, and I have no idea how to fix it, I tried, changing the references to my references, which I have my reference dll's in the same folder that you do, so I have no idea why it keeps complaining about them not being there???

[PKE] Pain Killa Entertainment(tm) [PKE]
Pain Brings Reality...
[PKE] Pain Killa Entertainment(tm) [PKE]
APEXnow
Retired Moderator
20
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 29th Apr 2010 03:59
StOrM3,

Ok, I totally understand. I need to sort this towards the weekend as I work during the dsy, but I will modify the sample to help you with this.

Paul.

Login to post a reply

Server time is: 2024-03-28 19:20:36
Your offset time is: 2024-03-28 19:20:36