New account registration is temporarily disabled.

[RM2K3 DYNRPG] LINE OF SIGHT PLUGIN REQUEST

Posts

Pages: first 12 next last
Nightowl
Remember when I actually used to make games? Me neither.
1577
While I generally prefer doing things myself instead of being a script kiddie myself, coding a DynRPG plugin is out of my league.
I'm requesting a line-of-sight plugin. I suck at explaining stuff, so here's a picture:

The green blob represents the areas the player can see from his/her current location, like the picture explains. (Okay, well, it's not technically line-of-sight. Let's call it goop-of-sight.)

If anyone has extra time and isn't busy making another plugin, I'd be glad if someone could whip up something like this.
Until the time someone can make such a plugin, you could take a look at this tutorial.
It might also be a bit tricky, but can give you some pointers on how to do this without a DynRPG plugin.

Basically it involves copying a couple of common events from the demonstration project into your own, and then work with those common events.
The first section of the tutorial deals with how to use these common events, and the last section deals with how to make a stealth system, which is based on the line of sight principle as request by you here. You can safely skip the part about creating a ring menu.
Nightowl
Remember when I actually used to make games? Me neither.
1577
I guess I'll take a look at the trigonorrheametry thing until someone makes a plugin.
Trihan
"It's more like a big ball of wibbly wobbly...timey wimey...stuff."
3359
trigger nom a tree
I prefer the way of save coordinates of hero and the other event, and save the hero coordinates with +1 of x, -1 of x, +1 of y, -1 of y

and make a comparison with a conditional branch
author=gadesx
I prefer the way of save coordinates of hero and the other event, and save the hero coordinates with +1 of x, -1 of x, +1 of y, -1 of y

and make a comparison with a conditional branch


Works quite poorly if you want to take terrain into account, and still have it actually be a "line of sight".

Besides, you're still using coordinates of the hero and the other event as well as branches using the method suggested in the tutorial, you're just using an alternative way of figuring out which tiles to check for.
(And a plugin for this, would be written in a very similar manner to the one suggested in tutorial as well).
You can do it by making a guard position thing where there's an X/Y range, but if the monster is less than a certain Y (or X) they basically aren't far enough forward to see past the wall. This works for corners, but not really for small objects like trees. Just finished 1 of five such events.

I all but failed trig. I hate you, Kaze. :)

Cherry has a math plugin, might this help?
Not really @Math Plugin
The plugin gives you the option to use trigonometric functions, but you still need to know how you can use them for it to be of any benefit.

In this sense, it's not really that much different from the suggested tutorial solution, since the demo project supplies you with common events which will allow you to use trigonometric functions yourself.

In the tutorial I also somewhat try to explain the particular property of trigonometry that we're interested in. It shouldn't be that tricky to understand, but if you've read it and still don't get the mathematical aspect behind it, I could give it another go in terms of explaining it.
It ended up being quicker working with ranges and stuff (one-two page per guard, vs many many pages of angle work). Which, perhaps not coincidentally was just about where we got in math anyway, working on graphs with ranges (I think it was called limits). We brushed on tan, cos, sin, but I've long since forgotten how to use them effectively (nine years of not using them at all).
If we made this comment-based we could produce broader applications than simply line of sight. I just thought of a ton of comment-commands in my spare time. Now if only someone would program this.

(Bleh I'm taking my code away here)
Nightowl
Remember when I actually used to make games? Me neither.
1577
Anyone?
*crickets*
use the tutorial. it works just fine and you don't really have to understand how it works. just copy and paste stuff. maybe change variables to unused ones.
Link, if the tutorial was efficient (it uses two or three pages plus a rather massive event, and tons of variables that I have to reassign) people wouldn't be asking for this plugin. Just like ideally, I'd like to run turn based without a massive load of common events (though this at least has an upside of customizing).



This is a "cone." @xy_hero X1, Y1, X2, Y2, switch (forms a box where if the hero is inside, the parameters activate the switch) Basically, you just reuse this making different dimensions, saving about four conditions per, and lines and lines of code. As the monster passes they run through all of this code in about a millisecond, and "spot" the character if within the space range.

@xy_event EventNumber, X1, Y1, X2, Y2, switch

You can also create a vertical/horizontal offset (which can be used for something like firing arrows at critters). But, as I say, I don't fully understand the namespace system. Oh hell, I'll just try it, and release it for people to finish.

http://rpgmaker.net/media/content/users/3388/locker/line_of_sight_still_unfinished.rar

I know you all are hanging around waiting for people to do this for you and mooch the benefits.
But I dunno how to save the Hero x to to something in C code (not even a normal RPG variable, which this code is trying to avoid). So if you can get it assigned to the correct namespace, it's yours.

In order to make best use of this, you check for the monster's facing and current X/Y (as in, "if guard 1 is >= 24 X on the screen" you change the zone, to account for various changes in terrain) but doing this without a ton of extra variables (and yes, most of that code actually works, you don't need to create RPG variables in order to use RPG Maker processes, you just need to compare them to it) and extra lines (this saves 5 lines at least, each time) means the complication is taken off your shoulders. Oh, sure, you can do it with high level math (tangents and such). But this is overthinking the problem, and the average person will not be able to use it.
so, instead of using the tutorial that he didn't create...he should use your solution that he didn't create. because waiting around for someone to create a plugin for him is lazy?

efficient doesn't always mean less code. efficiency would be determined by comparing the features provided by the code and the amount of code, and i guess the time it takes to setup. the features far outweigh the relatively small amount of code that sustains it, it would take a while to reassign all variables tho.

i would rather take a few extra minutes to copy/paste Kazesui's common events and reassign variables for 2 reasons. 1 - his method actually accounts for walls being in the way.(does yours?) and 2 - all that code can be used for many other features like bullet projectiles, ring menus, and more.

i'm not saying your solution sucks, and maybe it uses less code, but it in the end it does a LOT less and is imperfect(i'm assuming that it doesn't detect walls). it doesn't make sense to shelve a game until someone makes a better solution for something that already has a decent solution. or to use an inferior one.
Nightowl
Remember when I actually used to make games? Me neither.
1577
I wouldn't mind if I had to just use Kazesui's method, I'm just asking if anyone has time to whip up a plugin like this.
If not, m'kay, that's cool, go on.

Although I AM having some difficulty with understanding how the heck the damn thing works and where the fuck does it get all the results etc.
Heck, I'm willing to pay 20€ for a working line of sight plugin that also detects terrain.
author=Link_2112
so, instead of using the tutorial that he didn't create...he should use your solution that he didn't create. because waiting around for someone to create a plugin for him is lazy?

efficient doesn't always mean less code. efficiency would be determined by comparing the features provided by the code and the amount of code, and i guess the time it takes to setup. the features far outweigh the relatively small amount of code that sustains it, it would take a while to reassign all variables tho.

i would rather take a few extra minutes to copy/paste Kazesui's common events and reassign variables for 2 reasons. 1 - his method actually accounts for walls being in the way.(does yours?) and 2 - all that code can be used for many other features like bullet projectiles, ring menus, and more.

i'm not saying your solution sucks, and maybe it uses less code, but it in the end it does a LOT less and is imperfect(i'm assuming that it doesn't detect walls). it doesn't make sense to shelve a game until someone makes a better solution for something that already has a decent solution. or to use an inferior one.


Efficient apparently means cheating off people you don't honestly understand, creating a code you can't actually work with.

It detects whatever you want it to detect. Stop being a naysayer.

You've making zones (basically a range of xy), not corners, but you're varying it based on the guard location and direction facing.

This is the equivalent of what you're doing.

(bear with me, I'm a shitty artist)





(Hero X/Y is defined elsewhere, to compare to this. Based on Guard X, you get to design a bunch of zones telling you the exact range of squares. If it does different wall spaces, you make overlapping zones. No, it doesn't care about corners, but you can have it not notice you if you're hiding behind a wall.)



These multiple squares represent multiple zones, some of them when the quard is at a different position (or facing another direction). If I were to make these squares myself (oh wait, I did) it would be an annoying chore, largely because I have to make several at once for parts where the wall is shorter in one area that another. And yes, you can make this a tree, have a small safe zone and another box a little back from the tree.



Do you need a master's in mathematics? No. Yet somehow that guy around the corner stays safe. Assuming that's what you want, if not, just extend the zone and he's caught.

Btw, by turning on switches based on overlapping zones, you can do stuff like a minor spot (the character goes "huh? I though I saw something" and doubles back around adding to a suspicion variable) versus a major spot where stuff overlaps alot ("I've caught you, get back to your cell.")

...So that's it, huh? All the plugin involves is making a range around an event, which could help people (including me, which is why I'm so pissed because I lack the key part to finish) from anything from mouse clicking to LOS detection to certain puzzles that involve areas you can/can't go to. And nobody wants to help. Link just "what's wrong with Kazesui's demo" and wants to mooch. What's wrong with Kazesui's demo? Kazesui's comments about it.

author=Kazesui
Until the time someone can make such a plugin, you could take a look at this tutorial.

author=Kazesui
The plugin gives you the option to use trigonometric functions, but you still need to know how you can use them for it to be of any benefit.

In this sense, it's not really that much different from the suggested tutorial solution, since the demo project supplies you with common events which will allow you to use trigonometric functions yourself.

You said so yourself, you're not really using the math, you're just swiping and reassigning variables. Also, from what I saw, "line of sight" was just a short range cone, not a full "I can see halfway down the hall, and once I pass that statue, I can see around that corner." What I have right now works, but if I could do four ranges and the switch as a single process, it would save me a lot of work. And Kazesui. And Nightowl. And even you.

Good achievements go with knowing how it would help the self first, not how it help "the common good." It helps the common good, because once the original user has what they want, they have no problem releasing it.

Actually, it's worse than being lazy. Lazy people mind their own business and be lazy by themselves. By telling people "what's wrong with what we had before, we don't need this" you're actually being obstructive.


Nightowl
Remember when I actually used to make games? Me neither.
1577
Just to let you peeps know, I'm still offering 20€ for a working line of sight plugin (that also has terrain detection)
(If you can get this one working, you don't need terrain detection, you just set the terrain zone as if there is a solid object in the way, by making one area of the zone short, and those around it longer)



The enemy (red) cannot see you because of the mountain. You, on the other hand, can see them, for the same reason. Or vice versa, I'm not sure about have terrain works.

But the point is, it's in your hands, rather than preprogrammed. All you need is the coordinates.
Nightowl
Remember when I actually used to make games? Me neither.
1577
The thing is, I need the line of sight for a shooter system, mostly so that players can't shoot what they can't see.

So manually placed static terrain zones won't probably help.
Pages: first 12 next last