Multi-exe communications

Discussion in 'Work in Progress' started by lolslayer, Jun 26, 2016.

  1. lolslayer

    lolslayer Member

    Joined:
    Jun 23, 2016
    Posts:
    690
    As of a few days ago, I've started to make a project where I can let multiple executables communicate with eachother in real-time

    I won't keep the trick secret anymore because of the fact that somebody guessed it already, I parse information to eachother with the help of an ini file shared by all the applications, it's as easy as that ;)

    Here is a video showing what I can excactly do at this moment:


    PS, no I'm not using a server for this, it's completely offline, the worst case scenario for communication is a lag of one frame (excluding the cases that it crashes)
     
    Last edited: Jun 28, 2016
    Lukan, Xer0botXer0, faissaloo and 3 others like this.
  2. Dengar

    Dengar Member

    Joined:
    Jun 21, 2016
    Posts:
    285
    im confused. is the communication just them sharing there location onscreen? like a single grid that each executable is reading. if im right, then it is rather interesting.
     
  3. lolslayer

    lolslayer Member

    Joined:
    Jun 23, 2016
    Posts:
    690
    Yeah, that's excactly what's happening, I've got one grid with booleans, every executable can read and write shared information on that grid, but also on loose variables

    Based on the booleans of the grid the executables know where every other executable is and this way I can create a primitive collision system
     
    Dengar likes this.
  4. Dengar

    Dengar Member

    Joined:
    Jun 21, 2016
    Posts:
    285
    hmmm, interesting idea indeed. would be kool to see pathfinding done in this fashion. executables moving around eachother on the desktop :)
     
  5. FrostyCat

    FrostyCat Member

    Joined:
    Jun 26, 2016
    Posts:
    4,549
    If it isn't done with a server listening on 127.0.0.1, then it's probably done with named pipes.

    Suggestion: If the latter is what you're after, consider adding support for stdin, stdout and stderr while you're at it.
     
    Opticrow likes this.
  6. Dengar

    Dengar Member

    Joined:
    Jun 21, 2016
    Posts:
    285
    I bet you a nickel all the exacutables are saving there locations in the same ini or txt file. like saving/loading a game, but far more dynamic.
     
  7. lolslayer

    lolslayer Member

    Joined:
    Jun 23, 2016
    Posts:
    690
    You hit the hammer on the nail! That's excactly what I'm doing and it works perfectly fine! :D

    Also, I tried to start up multiple applications automatically with a batch file today, I accidently set the loop on 100 times so my laptop nearly frigging crashed, but it was hilarious ;D

    Somehow wierd stuff happens when I open too many applications at once, I hope that I can fix that, it would be much easier if I provide a batch file with a finished desktop platformer game which automatically opens the amount of applications you need
     
  8. Dengar

    Dengar Member

    Joined:
    Jun 21, 2016
    Posts:
    285
    lol, that's great. I love moments like that
     
  9. lolslayer

    lolslayer Member

    Joined:
    Jun 23, 2016
    Posts:
    690
    Me 2 :p
     
  10. Lotias

    Lotias Member

    Joined:
    Jun 20, 2016
    Posts:
    87
    Wouldn't this be more easily achievable using a local server? You'd need one program hosting it, but after that it's more simple than the INI solution, imo.
     
    elementbound and Opticrow like this.
  11. lolslayer

    lolslayer Member

    Joined:
    Jun 23, 2016
    Posts:
    690
    That would work aswell, but for understanding purposes this is the easiest way to do it, it also works fine so I don't see a reason why to change this idea
     
  12. lolslayer

    lolslayer Member

    Joined:
    Jun 23, 2016
    Posts:
    690
    [UPDATE]
    with the help of helpful members of the stackoverflow site I made a little progam that automatically opens up a couple of applications, so you don't have to open them all up manually

    I used a batch file to get this to work

    I'm thinking of making a little map editor for a desktop platforming game, after finishing your map you will be able to create a batch file that automatically loads up the applications on the right locations on the screen

    Don't expect much of the platformer, it will probably only feature blocks (probably all with the same sprite), a player and basic enemy types, remember that I made this program to make a communication system between applications, not a platformer :p
     
  13. Dengar

    Dengar Member

    Joined:
    Jun 21, 2016
    Posts:
    285
    im looking forward to this a lot :)
     
  14. lolslayer

    lolslayer Member

    Joined:
    Jun 23, 2016
    Posts:
    690
  15. Xer0botXer0

    Xer0botXer0 Member

    Joined:
    Jun 29, 2016
    Posts:
    670
    Lmao,

    I had this idea but I was thinking of using networking and buffers, yet it's as simple as sharing an ini file lol. What a realization.

    I dont know if this adds to the discussion, but imagine multiple clients for an mmo, depending on the client you run you can play a different role in the game.
     
    Opticrow likes this.
  16. lolslayer

    lolslayer Member

    Joined:
    Jun 23, 2016
    Posts:
    690
    Yeah right, it was indeed fairly simple xD

    That idea is fun, but the fact that I don't have a lot of time to work on projects, especially on big ones like that, it will be up to you guys to make something like that ;)
     
  17. lolslayer

    lolslayer Member

    Joined:
    Jun 23, 2016
    Posts:
    690
    Work on the map editor started as of today, it's still too early to release anything about it

    I won't include any demo maps when I launch this project, this is because everybody's screen resolution, and thus the map size is different, you'll have to make maps yourself if you really want to play anything, but I think that you guys are more interested in the code ;)



    PS: When this project is finished, I'll release the map editor and the project downloads on this forum post and on the marketplace FOR FREE! So yall will be able to get your hands on it and fiddle around with the code, as long as you credit me for the idea ;)
     
  18. icuurd12b42

    icuurd12b42 TMC Founder GMC Elder

    Joined:
    Apr 22, 2016
    Posts:
    1,839
    use sockets man!
     
    Opticrow and Paolo Mazzon like this.
  19. lolslayer

    lolslayer Member

    Joined:
    Jun 23, 2016
    Posts:
    690
    You can't tell me what to do!
     
  20. lolslayer

    lolslayer Member

    Joined:
    Jun 23, 2016
    Posts:
    690
    Just a little sneak-peak for the editor:
    multi-exe map editor preview.png
     
    Yambam likes this.
  21. lolslayer

    lolslayer Member

    Joined:
    Jun 23, 2016
    Posts:
    690
    If somebody is wondering why I didn't make any progress the last week or something, this is because a week filled with tests starts today and I've to learn a lot for it (It's called: "Proefwerkweek" in Dutch), I don't have much spare time because of that so for the coming week or so there won't be much progress :/
     
  22. Opticrow

    Opticrow Member

    Joined:
    Jun 21, 2016
    Posts:
    48
    Constant writing to the hard drive will quickly wear it out, especially if it's an SSD. Not to mention the game cannot progress until the write / read command has finished. Depending on the hard drive's speed, this could impact performance quite heavily.

    As many other people have mentioned, using a local server would most likely be a much better option!
     
  23. Dengar

    Dengar Member

    Joined:
    Jun 21, 2016
    Posts:
    285
    poke poke. hows the progress on this?
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice