User Tag List

Results 1 to 3 of 3

Thread: Lacewing help - Shooting and enemy AI

  1. #1
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    mrknd94's Avatar
    Join Date
    Jun 2017
    Location
    United Kingdom
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lacewing help - Shooting and enemy AI

    Hello,

    I'm trying to make a game, and I'm trying to make an online, endless mode experience. I've done the chat room and the player control and the peer controls working with two people. The thing is, however, I am getting stuck on the enemy AI and the shooting mechanics.

    This project has been in planning for four years. This is a kinda new idea (the online mode), but I thought it would be cool because the game series I'm working on does new things with each new game.

    I'm even thinking of making it commercial too. I don't know if I'll do it though, but it is highly likely. So, we can talk about the royalties (because I'm broke right now), and I want this online mode done and completed and I don't know how.

    If you reply to this thread, and then Discord me at: knd94#8718 , then that'd be great and greatly appreciated.

    Thanks,

    - JSG

  2. #2
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    mrknd94's Avatar
    Join Date
    Jun 2017
    Location
    United Kingdom
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    And your name in the credits.

    - JSG

  3. #3
    Clicker

    Fusion 2.5 (Steam)Fusion 2.5+ DLC (Steam)

    Join Date
    Jan 2021
    Posts
    67
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think the easiest thing to do is to have the enemies logic all run on the host machine (the machine that first joined the game or started the game) and send messages to the other player(s) machines via a separate channel. That way you don't have to worry about concurrency and merging changes from multiple machines. There will be some enemy lag, but there already is going to be some lag for the players anyway.

    Another trick to keep in mind if you can't make all the logic run on one machine is that if you seed a random number generator with the same seed on every machine, every call to random() will return the same numbers in the same sequence. Of course this has to be done carefully and only used for enemy behavior, for instance, but might be a partial way to get logic to run on two machines and appear "smart" within it having to actually talk between them. Then all you do is send periodic state packets from the host to the other machine(s) to overwrite each enemy's state (health, position, etc.) and assume that it will continue to make the same decisions because it's still running from the same seed (you may have to re-seed the random number generator with a timestamp every time you send one of these updates in case the machines get out of sync).

    Kind of high level ideas I know, but hopefully they can help you a bit.

Similar Threads

  1. Need help. Enemy not shooting for some reason
    By Graystripe2000 in forum Fusion 2.5
    Replies: 13
    Last Post: 10th December 2020, 10:28 PM
  2. Enemy Shooting Timing Issue
    By Zgoro in forum Fusion 2.5 Free Version
    Replies: 4
    Last Post: 27th March 2019, 07:57 AM
  3. 360 Degree Enemy Shooting Problem
    By Uber_Bob in forum Fusion 2.5
    Replies: 2
    Last Post: 3rd July 2016, 04:03 PM
  4. Replies: 5
    Last Post: 22nd October 2014, 02:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •