lennaert's Recent Forum Activity

  • If you have a user login status with PHP or something, manually add the checks to the exported index.html document and change the extension to .php.

    You could add the check at the top of the file, something like

    ie

    if($userloggedin = 1){

    //rest of the original html file content

    } else {

    header(location: http://someURL);

    }

  • you position the background on 0,0

    Most likely, the origin point of your image is in the center.

    Double click your sprite, and change the origin point 0 to 0,0, or change the positioning to 480,480

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ah, okay! So could I do it like this?

    No super hosts; whenever a player moves into a layout, that player becomes the 'peer host' of that layout, and anyone else who enters the layout will enter the peer host's version.

    So when a player enters the "Dangerous Cave" layout, the game pings the signaling server to see if anyone else is currently hosting the 'dangerous cave' layout, and if so it connects them, and if not that player becomes the first 'peer host' of the 'dangerous cave' layout. That will work?

    And then for syncing global variables, I could use WebKit or something like that for syncing the global variables from a simple data file I host on a server somewhere? So, for example, if the world has a day/night cycle, that will sync up across all players playing the game through a separate mechanism than the multiplayer object?

    Exactly !!

    And for the mmorpg part of things ...

    Use PHP /mysql back end with ajax.

    I used it for my first version of tankwars (even the movement) and with a good approach in php you can make certain transaction safe enough, the vast majority of mmorpgs run on php/mysql

    For the game side of things, it really livens things up ...

    ie

    mysql database having a table wit player info, and rooms/wordparts.

    The player table should contain a reference to in which layout it resides atm. (current location)

    Player starts app and ajax request ID info, if ID exists, send info from player etc.

    If does not exist, create ID etc.

    Now, if you move to another layout piece, simple ajax your way to the db and update player current location.

    This will make you peers optionally available if they are offline too

    Or, imagine sending someone a message ... store in DB, and when they come online, they check the db through ajax for messages.

  • Wait, my players have to be *on the same layout*? This is a huge, huge problem.

    My plan for multiplayer (a zelda-y world that players can move freely around in) was:

    -Every screen of the world is a separate layout (makes life easy in a number of ways)

    -Players only sync data with other players in the same layout as them (so if you're the only player in a given layout, you're not syncing with anyone)

    -Global world variables (is it day or night? Are there orcs attacking the castle?) sync globally once every five seconds (for low bandwidth consumption)

    This seems like it would be low data while still allowing the feeling of a 'permanent' world (with most things including character save data handled by the client, at least at first, I'm not a professional operation I don't feel the need to move everything server-side).

    But according to what you're saying, this extremely simple vision would be impossible?!

    Ugh.

    No your players do not have to be on the same layout.

    As long as you do not want a single host determining everything, you should be in the clear.

    ATM it is like, every single layout, requires at least 1 host. Be it peer or a 'super host'

    DatapawWolf, how about writing up your own javascript version of the server side, and use node.js with the web RTC module to communicate with the peers ?

    That should be definitely possible, and , if your any good at programming, you can make the host run without the need of a browser.

    You would just have to write up the host side of things in a code only set up. Tough, do-able though.

  • lennart I don't want to have multiple tabs open OR have palyers acting as the server in any way at all. The game isn't specifically for 2 people either. I don't know how many people will be in the game and what maps they will be on.

    Even if you have a server running a single tab in a browser ... isnt it capped with connections ?

    I believe the browser has 256 soft cap on connections, not sure how it is with webrtc.

    I am guessing is that if you want to have a single server running something as host, you will have game instances around that number per window.

    I think the smartest approach with this is to have to have players act as a host for a rooms where other peers can join.

    Thats how the mechanic of the current plug in is set up and works fine.

    You can toy around with instance names and room names and find nice ways to manipulate them to simulate some sort of world with entries and exits everywhere leading you to another layout where you automatically join existing rooms or create on one the fly.

  • layouts as levels.

    a sprite somewhere, which is the entrance to the cave, .. upon overlaps, set room name cave_layout, autojoin room.

    Another player pops over the sprite, room name set to cave, and pops in the cave as well joining whoever joined it first.

    Would not require a server, just a player indicating an available room.

    Say you want to make it a quest requiring 2 players ..

    player overlapping cave sprite entrance, set boolean on cave entrance

    pick players cave entrace boolean true

    picked count = 2

    for each player boolean cave entrance is true send tag entercave message "caveroomname"

    on message received "entercave", set room name to multiplayer.message, autojoin room

    voila 2 man enter for quest

  • Use peer messaging peers for commands/controls

    Eliminating Host control / logic needed.

    Only use host functions to determine active rooms so players can join.

    Effectively one of the peers would still be host, but would not be fulfilling host duties.

    You can use ajax / php / mysql to store various info.

    Chop up huge layouts into smaller.

    Switching layouts is basicalyl just loading a new layout once all players are already in the room.

    Upon loading the new layout, all players get created again.

    Just make some back and forth checks if all the players are on the new layout and ready.

  • Add second instance variable, indicating which click/touch cycle it is in.

    Have a global or dedicated object var increment upon releasing mouse button or on touch end, combine with the add 1 to age, and you will have have sets of ages.

    on touch/click end add 1 to global var clickcycle.

    on line create, add 1 to line.age, plus set line.clickcycle to clickcycle.

  • You do not have permission to view this post

  • Check around for rex plugin manager.

    It has lots of plugins and behaviors able to be added through the manager .

  • All definitely possible.

    But, I will carefully say to not underestimate the skills needed to create any game with any tool or code.

    It generally requires experience and or lots of trial and error work.

    As for coding, I could easily make a similar game like ghost with a bit of html and php.

  • Just give them instance variables.

    ie

    line1.linenum

    linenum instances variables could be 1,2,3,4,5,6,7,8 etc

    And for the other matter

    Add pathfinding to the vars

    searchvariable = 1

    function "findpath"

    event

    pick all line1,

    pick by eval line1.linenum = searchvariable

    action

    find path line1.X line1.Y

    event

    on path arrived

    action

    add 1 to searchvariable

    call "findpath"

    event

    on path found

    action move along path

    Simply call "findpath"

    and it will find paths to the line1's in consecutive order based on their instance variables

lennaert's avatar

lennaert

Early Adopter

Member since 8 Oct, 2013

Twitter
lennaert has 13 followers

Connect with lennaert

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • RTFM Read the fabulous manual
  • x2
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

25/44
How to earn trophies