x3Darkie Wrote:Welcome to the forums! We also have a unofficial "official" Discord channel where quite a couple of us are active on it. If you need a quick reply, that's probably the fastest way to get one.
Now as for your questions:
1. You can change your signature after you've at least made 10 posts.
2. You can upload SWFs and people can play them directly from the forums, not sure about FLAs.
3. No. You alone (/however you do your copyrights) own whatever you created. Additional forum rules are located here.
And I have no idea about the project you linked. You'll probably get a better answer from a moderator.
maximilianos Wrote:The same goes for sending messages, you need atleast 10 posts (accepted by mods). The restrictions are there to stop bots from making accounts and pm:ing everyone och posting walls of ads everywhere.
/another max
x3Darkie Wrote:I've neglected to mentioned a couple mods are also on the discord channel, so I edited my original post. But here's another mention in case you missed it.
I don't know if anyone knows action script/flash are active on the discord channel (Zeus may, but I don't think he's active on it for a couple months now), but one of us know C# and I personally can provide another eye/critique for art (as an artist) or general game design stuff. I mean, no harm in checking it out. There's no pressure if you don't wanna be in the channel anymore either, so yeah.
WE NEED MORE FRESH BLOOD
TheWrongHands Wrote:hello, welcome to the forum. i wouldn't exactly call my self and expert on flash but i might be able to answer some programing questions you have. i also didn't know about the discord, so i guess i'll be joining it.
MaxTheDark Wrote:Cool, biggest problem I have now is how to make a hitscan weapon in flash. Any suggestions?
TheWrongHands Wrote:MaxTheDark Wrote:Cool, biggest problem I have now is how to make a hitscan weapon in flash. Any suggestions?
that's more of a physics question, but what you want to look into is ray casting.
this looks like it might be helpful, although it's not written in flash: https://rosettacode.org/wiki/Ray-casting_algorithm
TheWrongHands Wrote:well how hit scan weapons work is you pull the trigger and the game will do a ray cast test from the gun (or your camera) in the direction you're facing. if the ray cast hits something then that is the object you're shooting.
TheWrongHands Wrote:i don't know what you mean by line object and without seeing your code i can't really go into specifics, but a ray cast test is usually a function you run and not an object in the world.
// Calculate Distance
distanceX = _root.StageMap.player._x - _x;
distanceY = _root.StageMap.player._y - _y;
//Pitagoras
distanceTotal = Math.sqrt(distanceX * distanceX + distanceY * distanceY);
//Calculate Movement
moveDistanceX = turnRate * distanceX / distanceTotal;
moveDistanceY = turnRate * distanceY / distanceTotal;
//Increase Speed
moveX += moveDistanceX;
moveY += moveDistanceY;
//Total Move Distance
totalMove = Math.sqrt(moveX * moveX + moveY * moveY);
//Easing
moveX = speed * moveX / totalMove;
moveY = speed * moveY / totalMove;
//Move!
moveFollow(moveX, moveY);
//...and rotate
_rotation = (Math.atan2(moveY, moveX) * radians) + 90;
MaxTheDark Wrote:TheWrongHands Wrote:i don't know what you mean by line object and without seeing your code i can't really go into specifics, but a ray cast test is usually a function you run and not an object in the world.
Essentially draw a projectile stretching from character to outside the screen, an object in the shape of a straight line, then calculate what it collides with, then calculate which is closest. Not the most elegant solution, I know. I heard about ray casting before, wondering if the code for it would be similar to my code for enemies following player from a different project:
TheWrongHands Wrote:MaxTheDark Wrote:TheWrongHands Wrote:i don't know what you mean by line object and without seeing your code i can't really go into specifics, but a ray cast test is usually a function you run and not an object in the world.
Essentially draw a projectile stretching from character to outside the screen, an object in the shape of a straight line, then calculate what it collides with, then calculate which is closest. Not the most elegant solution, I know. I heard about ray casting before, wondering if the code for it would be similar to my code for enemies following player from a different project:
no, a ray cast takes a ray (which is made up of a position vector, direction vector, and distance) and then checks all objects that it could be hitting to see if it hits them using math. now there are a number of methods for testing which objects your ray is hitting but a good method would be to create an axis-aligned bounding box for your ray and for all your objects and then make a list of every object's bb that collides with your ray's bb. you then take that list and check every object in it to see if your ray actually passes though their bb and then add them to a new list. you'd then go though every object of that list and compare the ray to every pixel of that object to see if it goes though and if it does then you'd have a 3rd list that not only stores the object but the closest pixel that is hit. your function would then return that 3rd list.
maximilianos Wrote:Using my name to annoy people (Heresy!)... In my case no one ever bothers to say or write my entire name -.-' (I usually end up as max/maxi)
MaxTheDark Wrote:I see your point. I don't know how to draw said vector in AS2 tho, hence using object to act as one. The rest seems right, but will be a while before I know what I need.
x3Darkie Wrote:Now as for your questions:
1. You can change your signature after you've at least made 10 posts.
2. You can upload SWFs and people can play them directly from the forums, not sure about FLAs.
3. No. You alone (/however you do your copyrights) own whatever you created. Additional forum rules are located here.
berserkerhorn Wrote:GREAT, NOW THERE'S TWO OF YOU I HAVE TO DISTINGUISH BETWEEN!
*insert temper tantrum rant here*
TheWrongHands Wrote:MaxTheDark Wrote:I see your point. I don't know how to draw said vector in AS2 tho, hence using object to act as one. The rest seems right, but will be a while before I know what I need.
again i'd need to see your code to give you specifics, but i think this might do it
endPoint = startPoint + (normalizedDirection * distance)
root.moveTo(startPoint.x, startPoint.y);
root.lineTo(endPoint.x, endPoint.y);
Users browsing this forum: No registered users