alee's Recent Forum Activity

  • huge score on the multiple previews! Now i can start dev

    Thanks

  • You could use subevents, although i don't know what you mean by offset.

    Dude overlaps tile-

    subevent { - Offset is greater than 100,

    + Offset is less than 200,

    subevent - { Offset is greater than 40

    + offset is less than 80}}:

    Stuff happens here.

    Not entirely sure what you're doing but i think that would work?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Gah i wish Bespectacled's was a bit more clear. Its nice though!

  • [quote:2hc0w47c]Events can happen in both directions, obviously. In the case of a DoT the client will receive an event that they have a DOT which does X damage over Y interval (display the debuff icon, duration, graphic, etc). The client could then simulate that effect with just the one packet send from the server. It could be broken up based on the tick duration too (multiple packets), but somehow I'd think they would resolve the damage ahead of time and let the client simply display the results over the course of the spell however it sees fit, rather than waste packet overhead simply on that.

    So you're saying its up to the player to change his own health in this time. What if the DoT kills the player? That means that its up to the client to decide when the dot has killed him (of course insecure). The only secure way is if the server checks ever DoT tick if the player has been killed.

    But anyhow, my game is far from pixel perfect, there are no collisions or physics. I'm gonna see if I can mock something up and show you what i mean later...

    On the subject of object picking, isn't it best if the server dishes out a unique ID to each player that is permanent while they are online, then when you send a movement packet to the server, it affixes your ID to the packet, then sends it to all clients near you (in my game, it would be all clients in your sector). When they recieve the packet, they use events to pick the correct Player instance (Player.Value('ID') = IDinPacket]) or something? (we could pass the contents of the packet to construct using a function with parameters. Or can we do all this in python now without having to pass anything to construct's events?)

  • Maybe you missed my point, but I meant that if you're going to go through the trouble of duplicating all of Construct's helpful events and what not into python, why not just write everything from scratch to begin with?

    There are so many events that need not be duplicated into the server. My game is just a graphical representation of some maths. (For example, Player 1 shoots player 2 and does 20 damage each second. The server will take 20hp from player2 each second, however on the client screen it will appear to be an epic battle with thousands of bullets or whatever. Another example is shooting a missile. The server will decide whether it hits and how much damage it will do and roughly how long it will take to hit player 2. However on the game screen the missile will fly and curve around etc.)

    I won't have any physics. Interpolation is done client side (ofc) and If I choose to trust the client with his own movement, i'll have the server check if his movements are in the realm of possibility and disconnect him if not.

    [quote:q6aizjtt]

    ....,647. Try to imagine how long it would take to exceed that. At 10,000 connections a day, which ain't bad for most websites, that's 214,748 days until that number fills up. Or 588 years. Of course a malicious user who writes a connect/disconnect bot will make your server throw an exception rapidly.

    Secondly, and probably more realistically, you should be using a guid. In which case, the concern isn't really valid to begin with. If you're going to send 4-8 bytes anyway, it may as well be a unique identifier. This might lend some security as well, if you use the first method and only that, objects will always be the same ID, which could give sniffers an advantage (hard to imagine how, but scripting would be much easier).

    This is exactly what I was talking about. I don't want the list to ever "fill up", it has to be robust so it cannot be exploited in this way. I figure when clients disconnect i'll just replace them in the list with "empty", then when a new client connects it either goes in the earliest empty slot, or if there are no empty slots, we'll add him to the end of the list.

    Why exactly is it necessary to use a GUID/UUID? These IDs are only there so we can pick the correct player to update positions of on the client when we receive new movement vectors etc. I don't see why it needs to be anything other that just a short,simple value?

    [quote:q6aizjtt]

    Well, PodSixNet is a connection based library... You'd just send directly to their connection. You might organize that into a set of containers (channels, for example), in which case, if you just want to talk directly to clients you could keep a "master" copy container (dictionary) for convenience. If I recall, that's how the author of PodSix does it, although he uses WeakRef (which is probably cleaner at the end of the day).

    Try not to overthink it too much, in most cases, you'll be sending a response to the client directly so you'll know which channel to reply to at the moment of receiving their request (try to think of an event-based networking system -- this is how WoW does it).

    Ok this is fine. So basically PodSixNet doesn't handle any of that for you. We have to make our own "channel" system using a dictionary etc.

    As to the response based communication. What about in WoW in the case of DOTs (damage over time attacks) for example. The server needs to keep updating the health of the victim even when there is no "event". Perhaps I misunderstand this part? But in these cases, the server will need to send updates to the clients of their health/damage done etc. even when there is no event or packet sent to the server from the client.

    Thanks a lot for the help so far man! Hope i don't sound like I'm arguing, I often find challenging something I don't understand is the easiest way of understanding it

  • I plan on writing a server that is purely maths (made in code) anyway. So it wouldn't be too different writing the server purely in python.

    Couple of questions about the tut.

    1) It seems you use lists to give each player a unique ID (based on their location in the list). In a MMO style situation, you'd want to make sure that everyone has a unique ID that stays the same for the whole time they are online. Lists would work fine, however, when user 2 disconnects, we want the next user who logs in to take his place, this way we don't end up with a huge list (because the list re-uses empty entries). I assume this is the best way to do it? How do you do this in python, or is there a more appropriate way?

    • also, wouldn't each client need a unique "ID" so you can send messages directly to certain clients from the server?

    2) I couldn't quite work out how channels work. Can we send messages to all players on a channel? And can channel names be strings? Surely its important to ensure that we can send messages to certain groups of clients, but not everyone connected?

    Just thought i'd ask so I understand these more fully. Thanks again scidave, seems to work really well!

  • oh my word this is excellent!

  • epic

  • Can you not add an option (for example on the plugins that are 1 based) to change it to 0 based, but have it by default 1 based to make sure apps don't break?

  • Eden - http://www.edenofficial.com

    <img src="http://edenofficial.com/wp-content/uploads/2010/08/screen6.png">

    <img src="http://edenofficial.com/wp-content/uploads/2010/08/screen5.png">

  • haha sweet! Definitely should have tried that... cheer man

    EDIT - This works if you run the layout first, then debug second. HOWEVER, they run the same file. I want to run my 2 different programs that i have open in different instances of construct.

  • Hi,

    Currently, you cannot have more than one preview of your game. This isn't usually a problem, but even if you open a second instance of construct, you cannot run both previews at the same time. This is very annoying for developing networking stuff, as you often need to make changes to client and server, and its a bit of a hassle having to export the .exe every time.

    Also, what is the harm of being able to open multiple previews anyway? I don't really mind not being able to open multiple previews of one game, but it would be very nice if I could have 2 constructs running, and have both running previews.

    Can this be done?

    Thanks

alee's avatar

alee

Member since 4 Nov, 2007

None one is following alee yet!

Trophy Case

alee has no trophies yet!

How to earn trophies