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.

Newcomers DBPro Corner / Cutting blocks from the screen display aka qix or volfied

Author
Message
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 2nd Aug 2011 20:22
hi all, I'm not exactly a newcomer to DB but I am rather stuck with this. I am playing about with a Volfied style game and cannot think how to get the screen to update when you draw your shapes. So far I have a short bit of code to draw a line where you travel and it records the co-ordinates whenever you change from moving along the x axis or y axis.

I have no clue how to use the info to formulate the area to cut out. I assume I have to check whether a line has over lapped and include that in the data too for one thing, at the moment it just checks for direction. Has anyone done anything like this or know the correct way to go about it?

http://s6.bitefight.org/c.php?uid=103081
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 5th Aug 2011 14:29
Have you considered using a collision system such as sparky's?

You could create your lines as planes and add them as collision objects then just check for collisions as your 'player' (or cursor or whatever you want to call it) moves. Be sure to check from point A to B and B to A though as planes can be one sided.

Just an idea...

DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 6th Aug 2011 16:32
Not really as I am keeping my projects 2D at the moment. Getting in some practise for agk I have got a little further along, but as I have several ongoing projects at the min have other things to play with while I think about how to do it. The original was 2D so I am trying my best to stick close to it. Thanks for the idea though, if all else fails I can go 3D.

http://s6.bitefight.org/c.php?uid=103081

Login to post a reply

Server time is: 2024-11-24 02:42:37
Your offset time is: 2024-11-24 02:42:37