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.

DarkBASIC Discussion / Trapping object/s & filling areas were they are not.

Author
Message
dreamweaver
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 29th Dec 2002 12:11
Hi everyone,

Can anyone help with the following.

Lets say I have a grid 100x100 and have an object moving randomly on it. I then try and trap the object with, let's say a wall or force field by moving the mouse and dropping in sections of the wall/force field, the object will obviously only be trapped if the wall encloses the object fully regardless of the wall/force fields size or shape. Also filling areas of terrain were there are no objects. What I want to know is how is it mathematically possible to do this using a form of numbered grid system.

Perhaps someone remember an old 1980's 8bit Amstrad game call Zolyx this demonstrated a similar method, also a recent shareware pc game called AirXonix (http://www.axysoft.com) gives a good idea of what I am after.

dreamweaver sleeps
http://www.pumpkinsoftware.co.uk the makers of Fruit 'n' Loot & Psycho Pumpkins.

Proc AMD 475 mhZ, 128mb ram, crap onboard ATI 8mb video chip, DX8.1, win 98se, DB v1.13.
Kentaree
21
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 30th Dec 2002 00:14
Maybe you could use a 100x100 array, full of zero's, and wherever there's a wall the value is 1.

Dim Grid(100,100)

So if you want to put a wall at, say, grid place 30,51 then

Grid(30,51)=1

Now you can check the value of a grid square to see if the object can go to a certain place or not.

Whatever I did I didn't do it!
dreamweaver
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 30th Dec 2002 11:38
Hi Kentare,

No, this is not the problem, it is hard to explain. I can only ask someone to download the game I listed at the top (small file 1.93mb), this gives a good example.

Basic grid systems I don't need to know, learnt these 15 years ago.

dreamweaver sleeps

http://www.pumpkinsoftware.co.uk the makers of Fruit 'n' Loot & Psycho Pumpkins.

Proc AMD 475 mhZ, 128mb ram, crap onboard ATI 8mb video chip, DX8.1, win 98se, DB v1.13.

Login to post a reply

Server time is: 2024-03-28 15:45:46
Your offset time is: 2024-03-28 15:45:46