Jump to content
SubSpace Forum Network

JoWie

Member
  • Posts

    900
  • Joined

  • Last visited

Everything posted by JoWie

  1. The graphics have been done in html5 before (and it performed well), the issue was/is getting the networking right
  2. Naah, C, M, Y, K
  3. I did not really rewrite it, just fixed a bunch of bugs and added support for things like double barrel, asss 1.5. Mostly stuff I needed for my own project.
  4. but not that v
  5. I do not think it is a 3 line change, or else it would break the functionality of hosting a zone on multiple servers (you would only want a single directory listing). I have heard trenchwars had used this in more glorious days (but do not quote me on this).
  6. I assumed the zones were using this protocol (I have very little experience with subgame). Snrrrrrrrrrrrrrrrrrrub reverse engineered the peer protocol, it lets you list all players in the zone broadcast arena messages (like *zone) retreive the total player count, this count would report the actual numbers of players present on that server SubSpace Peer Protocol Author: Sharvil Nanavati sharvil.nanavati@gmail.com The information contained in this document is based entirely off of my own reverse-engineering efforts. SubSpace game servers can communicate with each other via the SubSpace Peer protocol. Unlike most other protocols in SubSpace, the peer protocol does not make use of the SubSpace Control Protocol. Rather, it uses lightweight datagrams and accepts packets based on a whitelist of the datagram source's (IP, port) pair. All packets have the following form: 00 01 <passwordHash (4)> FF <type (1)> <timestamp (4)> <payload> The passwordHash is a CRC32 of the password in server.ini. The payload depends on the type field and their formats are described below (type values shown in blue). Peer-to-Peer Protocol ------------------------------------------------------------------------ /01: Player List/ This packet is sent if SendPlayerList=1 and at least one player is in the zone. It lists all arenas in the zone with a list of all players in each arena. The list of players for a given arena is null terminated as indicated by the 00 field below. The arenaID field is a random 32-bit integer that is associated with each arena at the time of its creation. An arena maintains its arenaID until the arena gets re-created or manually recycled. { <arenaID (4)> <arenaName (asciiZ)> { <playerName (asciiZ)> } 00 } (repeated until end of packet) ------------------------------------------------------------------------ /02: Chat Message/ When a peer receives this packet, it broadcasts it as if it were a zone-wide message (*zone). <type:0 (1)> - currently ignored by subgame, can be anything <message (asciiZ)> ------------------------------------------------------------------------ /03: Unknown/Unused/ The format of this packet is known but not the format of the message. Perhaps the action associated with this packet is disabled in the current release of subgame. <unused (1)> <message (asciiZ)> ------------------------------------------------------------------------ /04: Player Count/ This packet is sent if SendPlayerList=0 or there are no players in the zone. The player count is the total number of players in the zone. <playerCount (2)> ------------------------------------------------------------------------ He also made an asss module
  7. There are workarounds for the missing feature that would not require modifying subgame. For example, you could write a directory client that uses the peer protocol to figure out the proper population.
  8. With a little effort the issue could be fixed
  9. Because he knows how to ask for help?
  10. He's using a different client-server model than what continuum uses. So its a bit more complicated than that.
  11. Basically, deamonize on linux means that when you run the application from the console it gives you back control after any initialization (detach). This way you can easily add it to initialization scripts (such as init.d) which are always detached. Most applications that can deamonize also let you write PID files, but this is not required (this can be provided by a wrapper). This is what you usually use in initialization scripts. Read the note next to --background http://manpages.ubuntu.com/manpages/intrepid/man8/start-stop-daemon.8.html Incase your server is written in java, I think there is a tool for it, not sure.
  12. make sure the server is able to daemonize
  13. when my free time returns
  14. Or just use 1 of the 100 java thread safe collections?
  15. Sometimes you have to make a trade off between security and lag. It would not be that hard to support a huge number of tile/object/part types efficiently (billions). I think richard already completed this http://www.subspace.co/topic/26030-map-editor/
  16. The random seeding continuum does, is a lot more interesting than encryption imo.
  17. Are you talking about the random stars and planets in the background? You would probably need a random number generator with low-discrepancy (quasi-random). Preferably you would want one that does not require you to keep a state, only a seed and an index. Like halton, van der Corput, etc. This way you do not have to store stars for the entire map
  18. And jitter when you hit a wall
  19. That's because the ship was already overlapping with the wall, inverting the velocity without moving the position to touch the wall would yield a collision each loop, making the velocity vector oscillate and thus getting stuck in the wall. You have to account for the difference between touching the wall and the amount of overlap, say delta x (dx) then invert the velocity of x, then add that dx * velocity x to the current position. That would give the correct position of the ship I showed this, but it had a typo: http://www.subspace.co/topic/25999-subspace-java-client/page__view__findpost__p__278325
  20. Collision in subspace is not that hard, everything is a rectangle. This is a basic way you can do bouncing bullets. Java syntax with imaginary classes and instances It uses centisecond precision, just like subspace (100x per second) // Part of some kind of update loop import javax.vecmath.Tuple2d; public class Weapon { public static final long TILE_SIZE = 16; public int type; // enum public Map map; public Tuple2d position; public Tuple2d velocity; public Centiseconds lastUpdate; public Weapon(Map map) { this.map = map; position = new Tuple2d(0,0); velocity = new Tuple2d(0,0); } public void update(Centisecond now) { Centiseconds deltaTime; int a; if (!lastUpdate) { lastUpdate = now; return; } deltaTime = now - lastUpdate; if (type == Weapon.BULLET) { for (a = deltaTime.intValue(); a > 0; --a) { moveVertical(); moveHorizontal(); } lastUpdate = now; } } // returns true if it hit a tile private boolean moveVertical() { Tile tile; double newY; Tuple2d newPosition; long tileX, tileY; position.y += velocity.y; tileX = (long) position.x / TILE_SIZE; // get rid of the point number (not the same as floor() ) tileY = (long) position.y / TILE_SIZE; tile = map.getTile(tileX, tileY); if (tile && tile.isSolid()) // hit a wall { // move the bullet so that it is right in front of the tile, but not ON the tile if (velocity.y > 0) { // moving towards the east position.y = tileY * TILE_SIZE - 1; // position is now at the end of the previous tile } else { // moving towards the west position.y = (tileY + 1) * TILE_SIZE; // position is now at the start of the next tile } // bounce velocity.y = -velocity.y; return true; } return false; } // returns true if it hit a tile private boolean moveHorizontal() { Tile tile; double newX; Tuple2d newPosition; long tileX, tileY; position.x += velocity.x; tileX = (long) position.x / TILE_SIZE; tileY = (long) position.y / TILE_SIZE; tile = map.getTile(tileX, tileY); if (tile && tile.isSolid()) { if (velocity.x > 0) { position.x = tileX * TILE_SIZE - 1; } else { position.x = (tileX + 1) * TILE_SIZE; } velocity.x = -velocity.x; return true; } return false; } }
  21. why the separation between map/tileset and lvz?
  22. LinkedList seems both easier and faster in this case. All you are doing is adding to the head and removing from the tail. No need to move all the array elements or to allocate new arrays.
  23. I've used lwjgl for 2D stuff and it is not incredibly hard. Anyhow, the big thing to avoid in java is massive object creation in hot spots.
  24. to respawn destroyed tiles, everyone needs to reenter the arena. All you can do is some hackery with bricks
  25. Wouldn't the correct name be "GS-2 Godsend Beacon"? The Ion Cannon is a network of satellites
×
×
  • Create New...