Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Genusis

Members
  • Posts

    38
  • Joined

  • Last visited

    Never

Genusis's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Genusis

    Runtime Error 91

    If you have not already added this then make sure you add Set TempPlayer(Index).Buffer = New clsBuffer to the Sub ClearPlayer as that will initialize the buffer for use.
  2. Genusis

    Sockets

    SocketWrench is just a C++ wrapper of winsocket and web protocols given by another library.
  3. Genusis

    Sockets

    If you want to know a base explanation of what winsocket is this best describes it. http://searchwindowsserver.techtarget.com/definition/Winsock Basically no matter what you plan on using unless you have something that can do I/O on the low end you are stuck using winsocket. Even lidgren uses winsocket for windows. It simply just wraps around winsocket and sets the socket protocol to use UDP instead of TCP. Lidgren simply adds their own security features and reliability features to UDP which normally does not have those types of features. UDP is faster than TCP but in most cases you should not use UDP for perfect reliability as if you use something like lidgren you may end up wasting extra bandwidth trying to get a packet from one point to another if the packet did manage to get dropped as UDP is very susceptible to this. For more information on UDP and TCP look to these links http://searchsoa.techtarget.com/definition/UDP http://searchnetworking.techtarget.com/definition/TCP UDP can be good if the packet can make it all the way through the first time as it can have a single large packet compared to multiple packets split up into the size of the computers MTU. This means TCP can have more overhead than UDP, but with TCP you are guaranteed that packets arrive in order and they have a smaller chance of being dropped by a server.
  4. Genusis

    Yuko banned.

    "you stoles it, the precious!"
  5. Genusis

    Map Converter

    @'Xlithan': > TILESHEET_WIDTH = 224 pixels for the tilesheet im using. Or do I divide 224 by 32 to get the correct TILESHEET_WIDTH? > > * * * > > Still get subscript out of range with this code. first of all 7 *32 is 224\. also make sure those maps exist in the folder before trying to read them and what line is the subscript out of range happening on exactly? if all else fails it might not be reading the data into the map so you may need to break point debug it to insure the data exists. If you need help with this i can help you.
  6. Genusis

    Map Converter

    youforgot to redim the oldmap tiles as well. just add this to it. ReDim oldMap.Tile(0 To MAX_MAPX, 0 To MAX_MAPY) also the 224 should be 7 as that's what the original amount of tiles there where in a tile sheet originally. other wise the math will not turn out correct. since the x and y are done by tile index rather than by actual size. so math wise ground being lets say 5 5 / 7 = 0 because of rounding. * 32 = 0 5 mod 7 = 5 * 32 = 160; now with what you did 5/224 = 0 becuase of rounding but 8/224 = 0 as well when it should equal 1 after rounding. while also 5 mod 224 = 5 but 8 mod 224 = 8 when it now when you do it like this with the new numbers 8 mod 7 = 1 * 32 = 32 8 / 7 = 1 * 32 = 32 which is the correct number of pixels to the tile's square. Though you can simply remove *32 to keep just the tile position then times it by 32 later that way you can make the x and y a byte
  7. Genusis

    Map Converter

    to get the Y you will need to do (Map.Tile(X, Y).Ground \ TILESHEET_WIDTH) * PIC_Y to get the X you will need to do. (Map.Tile(X, Y).Ground Mod TILESHEET_WIDTH) * PIC_X those based on the map tile position setup are how ground, mask and fringe are used within the old mirage based system. also sorry i thought you where converting from a map style which migth have had the variable names as ground and mask but has a x, y. I forgot the old mirage had a set integer for pixel position. oh and also ou have to set the array before you can load data into the array like Tile(0 To MAX_MAPX, 0 To MAX_MAPY) As TileRec otherwise you need to use a realloc on the tile to set it to its dimension before trying to load the data into it. ='] otherwise the tile index's are none existent on either side.
  8. Genusis

    Map Converter

    ignore this post I thought he was using a post that had ground set as a struct to x, y and tileset.
  9. Genusis

    Map Converter

    you will need to do something like if x < old_maxx and y < old_mapy then NewMap.Tile(x, y).Layer(1).x = OldMap.Tile(x, y).Ground NewMap.Tile(x, y).Layer(1).y = OldMap.Tile(x, y).Ground NewMap.Tile(x, y).Layer(3).x = OldMap.Tile(x, y).Mask NewMap.Tile(x, y).Layer(3).y = OldMap.Tile(x, y).Mask NewMap.Tile(x, y).Layer(7).x = OldMap.Tile(x, y).Fringe NewMap.Tile(x, y).Layer(7).y = OldMap.Tile(x, y).Fringe NewMap.Tile(x, y).Layer(1).Tileset = 1 NewMap.Tile(x, y).Layer(3).Tileset = 1 NewMap.Tile(x, y).Layer(7).Tileset = 1 NewMap.Tile(x, y).Type = OldMap.Tile(x, y).Type NewMap.Tile(x, y).Data1 = OldMap.Tile(x, y).Data1 NewMap.Tile(x, y).Data2 = OldMap.Tile(x, y).Data2 NewMap.Tile(x, y).Data3 = OldMap.Tile(x, y).Data3 else NewMap.Tile(x, y).Layer(1).x = OldMap.Tile(x, y).Ground NewMap.Tile(x, y).Layer(1).y = 0 NewMap.Tile(x, y).Layer(3).x = 0 NewMap.Tile(x, y).Layer(3).y = 0 NewMap.Tile(x, y).Layer(7).x = 0 NewMap.Tile(x, y).Layer(7).y = 0 NewMap.Tile(x, y).Layer(1).Tileset = 1 NewMap.Tile(x, y).Layer(3).Tileset = 1 NewMap.Tile(x, y).Layer(7).Tileset = 1 NewMap.Tile(x, y).Type = 0 NewMap.Tile(x, y).Data1 = 0 NewMap.Tile(x, y).Data2 = 0 NewMap.Tile(x, y).Data3 = 0 end if
  10. Well glad that you are feeling better about yourself and I hope everything will get even better for you from here on out.
  11. @'Dialectics': > I'm not even going to bother addressing you. Honestly, educate yourself before you say something quite so dense again. > > Here's how you can convert a 32 bit integer into a byte array (big endian): > > byte[] byteArray = new byte[4]; > for (int i = 0; i < 4; i++) { > bytes _= (byte)(integerToConvert >>> (i * 8)); > } > > You could also simply use Java's ByteBuffer class. > > I admit I was wrong. I forgot that Java supported bit manipulation. > anyways, its not worth doing this because the Java compiler automatically does this for you anyways.[Edit] > > Anyways the above code would be more efficient if you pre-created the buffer set a size to lets say a power of 2 and then checked that buffers size to what data is being added into it then resized to the next power of 2 and so on. its inefficient to resize or create a new array each and every time you need to add something into the array._
  12. @'Dialectics': > These comments are cringe inducing. > > Why are you using the PrintWriter? Just pack the data directly into a byte array using simple bitwise and shift operators. bitwise and shift operators only work on the bit level. This wont do you any good if you are trying to add data into a byte array. The closest thing you could do to get this to work in to use a memcpy function which can copy each byte into the array of data: https://gitlab.com/ascendingcreations/swift/blob/master/net/source/buffer_stream.c#L162
  13. that is also true as well marsh. Though a majority of the time most things can be private without breaking anything especially if you programmed it that way to begin with. I do however suggest to use private whenever possible. And also if your referring that to googles changes they made at one point. Those never broke anything. Oracle just through a fit because Google made certain functions private in the java libraries that was not being used directly, which did increase overall security of java on androids. Funny thing Oracle won the lawsuit and google was forced to change it back. Oracle never made those changes themselves. It is one of the few reasons i dislike Java and tend to not ever install it unless i have to to help someone or to play a game that uses java.
  14. Also to add the fact that making code private that should be rather than making everything public adds extra protection for your program. The public everything idea is one reason why Java is red flagged as a huge security hole. It is also a reason why Google when making android wanted to private functions to prevent known security holes from occurring. My advice is to do what PeRV did Panda and learn how to use modifiers how they should be and the reasons behind them if your going to program in any Language.
  15. In terms of language wise it probably isn't worth a majority of peoples time to even bother…. My honest opinion its not worth wasting money on a vb6 game. especially that much money.
×
×
  • Create New...