Virpoja's Recent Forum Activity

  • lamar, sorry I was not precise enough.. What i need is the angle of motion, which in this case is not the same as the actual "heading" or the objectAngle. Also I am not using bullets etc for this, for several reasons.

  • 99Instances2Go: Thank you for your answer, the thing is that all the objects are moving only one direction at the time, so they only need one collider (which has to be in the right direction) and this is what I am trying to achieve. I have this kind of system working on the grid based game and it`s very light solution. (it`s just harder to pull of with pixel perfect movement) I do not think performance is a real issue here. And its more precise than using imagepoints. Also container works great for picking, as you mentioned.

    X = 16*cos (AngleOfMotion)+ Sprite.X

    Y= 16*sin(AngleOfMotion)+ Sprite.Y

    gives me the result i need for setting up the correct position for collider. Problem is that on collision the Sprite stops and my return value for "AngleOfMotion" glitches for 1 tick and messes up the collision testing. This is a problem I don`t have on grid based version.

    Also the actual project is using FPS view with raycasts and if collision detection is not spot on, you will be able to see through walls etc.

  • Thanks for your answers guys. lamar object angle won`t work since sprite can move other directions that it is facing...

    99Instances2Go: Your solution is nice, its actually same principal that I am using on my actual project atm.. However the point why I am trying to figure out the actual direction object is facing is because I want to be able to go any direction (strafe etc) and always have the Collision Detector on the correct position. I should have implemented other directions to my example but I got lazy

    So using several ImagePoints is my plan B, but since I intend to use similar collision detection for AI, I would like to have a very "clean" solution that won`t rely on inputs but rather to actual movement angle. I know I can work around this but I just want the cleanest implimentation..

    Anyway thanks alot, any other suggestions?

  • Hello guys! I have a problem which is driving me nuts....

    I need to figure out a way to determine which direction / angle object is heading. I know several ways to achieve this but not the way I need it to work atm.

    So the thing is, I DO NOT want to use behaviors on the object (so this counts out using bullet, 8 dir, physics... to determine angle of motion.) Object is moved just with *dt pixels... and this is how i need it to work on this project.

    I can get value using: "angle(Sprite.LastX , Sprite.LastY , Sprite.X , Sprite.Y)"

    Basically I have created instance variables to store sprite position on previous tick and compare that to current position. So this kind of works, BUT when object stops the value updates to 0. I am guessing it only does this for one tick, but it`s enough to render this unusable. (since I use this method for collision testing)

    sample capx: https://dl.dropboxusercontent.com/u/137 ... otion.capx

    Hope some one can help!

  • Hi, I am not sure what exactly are you asking for? Since in my mind you cannot get much better than actual working source code for reverse engineering and tinkering around.

    Besides the capx file is well formated and commented and consist everything you have asked for. Just start experimenting and you should have a good understanding on each event and the processes pretty soon.

    Good luck

  • Hi Ken95, Is this what you are looking for? http://dl.dropbox.com/u/5426011/examples%208/lazer.capx

    Created by awesome https://www.scirra.com/users/r0j0hound

  • Multiplayer Shooter Template — Now for sale in the Scirra Store!

    https://www.scirra.com/store/royalty-free-game-templates/multiplayer-shooter-template-2846

    <p>Online Peer to Peer real time multiplayer game with:</p>

    • Fully functional Platformer style controls and mouse aiming.
    • Platformer style animation control in multiplayer environment.
    • Damage system with line of sight and impenetrable obstacles.
    • Visual effects such as hitting enemy or wall, muzzle fire and shells.
    • Respawning system with smart camera and player control.
    • Smooth scrolling camera and zoom system.
    • Weapon system with weapon swapping and stats such as damage and rate of fire.
    • Over 300 events and sh** loads of trial and error.

    <p>Notification! Construct 2 personal or business edition required.</p><p>Also, Capx is well commented, but it`s fairly complex so you have to be well familiarized with multiplayer examples in construct 2.</p>

    Use this topic to leave comments, ask questions and talk about Multiplayer Shooter Template

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • ISSUE SOLVED!

    Basically problem / bug was something completely different. (one event was missing peer.peerid = multiplayer.myID)

    • This caused peer and host to overlap positions on the peer side.

    Reason why I thought the problem was multiplayer ID, because i had set text string to show Id in the wrong way... (showed host id for everyone)

    So.... completely irrelevant "HOW DO I" post... Sorry about that

  • Also I forgot to ad. When the problem occurs, on the peer game instance both peer and host are shown in the same position. (because of identical multiplayerID). However when you refresh the browser window and log in again, everything works. It works like this every time.

    Whats the difference between first & second peer login? Maybe this helps...

  • Hello!

    I am having a big problem on my multiplayer project: https://www.scirra.com/arcade/multiplay ... team6-5795

    For what ever reason game instance for Peer doesn`t set peers multiplayer ID correctly. It some times leaves it complately unassigned and sometimes it sets same multiplayer for peer and host. It used to work fine. I set peerid`s the same way that they are set in multiplayer real time game example.

    Has anyone run to this kind of problem or knows a work around? Maybe something like "forcing" game instance to set multiplayerID?

    I don`t know what broke it, only guess I have is that when you have enough events in your multiplayer project events does not fire of correctly for everything to be set in the right way when connection is established or something... Does this make any sense?

    I know that without posting capx its difficult to give me a specific answer, but I mostly asking if anyone has pumped in to this problem before.

  • Thanks for your response gumshoe2029. I will PM you for more info!

  • Thanks for the info fm4fanAt.

    ATM. I am not intressed of running my own hardware. Mainreason being that I live outside of the city lights so to speak and there for I do not have access to really stable web connections (or even electricity for that matter).

    There for i would need a web hosting... So I still are in need of good entry level web host and some guidance how to start configuring my rented server? Again I only need to be able to run browser tabs on the server, nothing more. (I am guessing I need alot mor to actually do this tho)

Virpoja's avatar

Virpoja

Member since 1 Jan, 2013

Twitter
Virpoja has 131 followers

Connect with Virpoja

Trophy Case

  • 11-Year Club
  • x2
    Popular Game One of your games has over 1,000 players
  • x2
    Famous Game One of your games has over 10,000 players
  • Viral Game One of your games has over 100,000 players
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

18/44
How to earn trophies