Raycasting

New releases and general discussions.

Post » Tue Nov 27, 2007 11:07 pm

MMMm :D Excellent idea with bullet movement that will do just fine for a LOS check. Stupid me to not think of that solution, thanks for the tip/suggestions all.

I guess a ray can still be useful but most likely there are more important/urgent matters to deal with.
B
1
G
5
Posts: 2
Reputation: 1,229

Post » Sun Dec 02, 2007 6:30 pm

Instant hit bullet movements can calculate line of sight very well (yes it's floating-point 360 degree so it will always hit). However I think there's still place for a line of sight plugin - or perhaps movement - because even with instant hit bullets it's slightly more tricky to write a single condition like 'Player has line of sight to X'. I suppose you could add the 'Line of sight' movement (which doesnt actually move the object) but has conditions such as 'Has line of sight to object' or 'Has line of sight to X,Y'.

As a sidenote, I was thinking of renaming 'Movements' to something like 'Addons' because of this - their scope is not limited to just moving stuff... they're very flexible :)
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,590

Post » Sun Dec 02, 2007 11:23 pm

[quote="Ashley":2tjxinw2]As a sidenote, I was thinking of renaming 'Movements' to something like 'Addons' because of this - their scope is not limited to just moving stuff... they're very flexible :)[/quote:2tjxinw2]

Not to mention things like Selection Box, Drag and Drop, and Wrap aren't really movements so much as functions.

But anyway, how about "Prefabs?" "Addon" sounds a little too much like "Plugin."
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Mon Dec 03, 2007 4:55 am

i can't think of a good name for them yet but all of the ones mentioned so far don't really capture what they are. hmmm ... this could be tricky because they really are more than just movements and encompass so many possiblities!
B
2
S
2
G
5
Posts: 293
Reputation: 2,236

Post » Mon Dec 03, 2007 5:00 am

Prefab is the best one so far, if you ask me. :)
B
2
S
1
G
5
Posts: 50
Reputation: 1,500

Post » Mon Dec 03, 2007 5:15 am

It's a difficult one to name. 'Addons' would almost certainly confuse with 'plugins', and 'Movements' doesnt capture everything they can do. I don't know about anyone else, but the word 'Prefab' conjures images of manufacturing and inanimate objects like prefab houses. Movements and other things like wrapping are more of a capability or behaviour than an object. But maybe I just have weird associations ;)

'Capabilities' could work but might be non-intuitive (giving an object the capability 'Car movement'... does it sound right?). Maybe 'Behaviours'?
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,590

Post » Mon Dec 03, 2007 5:18 am

I was just about to suggest "Behaviours" too. :)
B
2
S
1
G
5
Posts: 50
Reputation: 1,500

Post » Fri Jan 11, 2008 2:16 pm

Behaviours is an excellent name. Implies something pre-built but with some customization available. And since it's applied to objects, behaviours describe, well, behaviours.
B
1
G
4
Posts: 2
Reputation: 1,029

Post » Fri Jan 11, 2008 4:34 pm

[quote="Ashley":y8prbue0]It's a difficult one to name. 'Addons' would almost certainly confuse with 'plugins', and 'Movements' doesnt capture everything they can do. I don't know about anyone else, but the word 'Prefab' conjures images of manufacturing and inanimate objects like prefab houses. Movements and other things like wrapping are more of a capability or behaviour than an object. But maybe I just have weird associations ;)

'Capabilities' could work but might be non-intuitive (giving an object the capability 'Car movement'... does it sound right?). Maybe 'Behaviours'?[/quote:y8prbue0]

Behaviors sounds about right. 'Physics Behavior', 'Bullet Behavior', 'Drag/Drop Behavior', 'Wrap Behavior', it all fits.

And speaking of prefabs, when you spawn an object with stuff set with it as a container, would it also spawn that stuff with appropriate positioning?
I know you can use the 'Spawn relative to object' but I already have 127 events and multiple event sheets bugged out, so it's a little cluttered in there :(
I'm asking this because I want to make a map editor for Phys-Box' final version/s (where it will be more of a game than a plain old sandbox) and prefabricated objects without the clutter of a bunch of events would help greatly.
I also need to work out some I/O stuff with the File/Zip functions to export maps right (I'd like to allow importing of sprites and use File to create the map file (plain text, just lists appropriate co-ordinates) and then use ZIP to wrap up the map file and sprites, then save it with an appropriate filename, and when you load a map it accesses the zip of that name, extracts it to a temp directory, loads the mapfile and associated sprites and then removes the temp directory when the program closes, but I might not be able to do all that :) plus I'd have to write a way to parse the map files myself, but that would mostly be a bunch of GetToken-ing to construct the map from its file, and I'll probably skimp on the sprite importing and ZIP stuff at first since it could get rather overcomplicated)
B
3
S
2
G
4
Posts: 130
Reputation: 1,735

Post » Fri Jan 11, 2008 6:40 pm

[quote:i1nzxdwt]when you spawn an object with stuff set with it as a container, would it also spawn that stuff with appropriate positioning?[/quote:i1nzxdwt]
When you spawn or create an object which is part of a container, the whole container is created, ie. all the other objects are spawned too - but the other spawned objects aren't spawned to any particular coordinate yet, in fact, I think it's left undefined. So the other objects will most likely spawn offscreen. This ought to be fixed - spawning relative coordinates is a good idea!
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,590

PreviousNext

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 2 guests