Popular Post Xandy Posted December 30, 2017 Popular Post Posted December 30, 2017 (edited) NOTE: TOPIC HAS BEEN MERGED TO HERE: MapIt Quest I am currently developing NPCs they cannot yet be added. Items only exist in database. Enemies only in sprite. Spoiler This project has been on the shelf a couple years. I decided to learn DLLStruct at the beginning of this project. I'm not sure if using them was a good idea or not. I'm open to converting them to pure array and Enum. Developing multiplayer system UDP clients / server. I'm looking for some advice on how to setup the packets. I was thinking the best way was to convert packets to Hex and convert back at the destination. That's probably the way I have it setup. Anyhow they all talk to each other, clients and server. Where the avatars appear on screens doesn't work. Spoiler expandcollapse popup; Received in Server from Client: -------------------------------------- DW;51;201;0;0;1;Test_Player;10;2;20;30;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0; From Client Sent to Server: Player : Name : Bytes ------------------------------------------------------------------------------------------------------------------------------- $packet_data = $gPacket_key & $gPacket_Seporator ; 1 Key ; 2 $packet_data &= $gNet_sequence_frame & $gPacket_Seporator ; 2 Sequence Frame ; 1 $packet_data &= $ePacket_type_connect_player & $gPacket_Seporator ; 3 Command Type ; 1 $packet_data &= $player.iX & $gPacket_Seporator & _ ; 4 X ; 4 $player.iY & $gPacket_Seporator & _ ; 5 Y ; 4 $player.iWorld_cur & $gPacket_Seporator & _ ; 6 World ; 1 $player.caName & $gPacket_Seporator & _ ; 7 Name ; 64 Bytes $player.iLvl & $gPacket_Seporator & _ ; 8 Lvl ; 1 $player.iClass & $gPacket_Seporator & _ ; 9 Class ; 1 $player.iXp & $gPacket_Seporator & _ ; 10 XP ; 4 $player.iGold & $gPacket_Seporator ; 11 Gold ; 4 Enum $ePlayer_item_id, $ePlayer_item_quanity, $ePlayer_item_durability, $ePlayer_item_mod_1, $ePlayer_item_mod_2 ; Inventory Items For $i = 0 To $player_item_max - 1 For $ii = 0 To $player_item_data_max - 1 $packet_data &= $aPlayer_item[$i][$ii] & $gPacket_Seporator $ePlayer_item_id $ePlayer_item_quanity $ePlayer_item_durability $ePlayer_item_mod_1 $ePlayer_item_mod_2 Next Next ; From Server: Send header: : Name : Bytes --------------------------------------------------------------------------------------------------------------- $packet_data = $gPacket_key & $gPacket_Seporator & _ ; 1 Key ; 2 $gSequence_frame & $gPacket_Seporator & _ ; 2 Sequence Frame ; 1 $iPlayer_source & $gPacket_Seporator & _ ; 3 Player Source ; 1 $gaPlayer[$iPlayer_source][$ePlayer_x] & $gPacket_Seporator & _ ; 4 X ; 4 $gaPlayer[$iPlayer_source][$ePlayer_y] & $gPacket_Seporator & _ ; 5 Y ; 4 $iCommand_type & $gPacket_Seporator ; 6 Command Type ; 1 ; From Client: Send header: : Name : Bytes --------------------------------------------------------------------------------------------------------------- $packet_header = $gPacket_key & $gPacket_Seporator & _ ; 1 Key ; 2 $gNet_sequence_frame & $gPacket_Seporator & _ ; 2 Sequence Frame ; 1 $cmd_type & $gPacket_Seporator & _ ; 3 Command Type ; 1 $player.iX & $gPacket_Seporator & _ ; 4 X ; 4 $player.iY & $gPacket_Seporator ; 5 Y ; 4 My Enums are used for data members of arrays. I exclude the 'g' even though they are all Global. I put the array names they describe in the Enum: ePlayer_x. In some cases I abbreviate the array name; aWorld_info probably has: aWorld_info[eWi_layers] Most gaming things are done better with a nice engine: GameMaker, Unity, Unreal. My buddy made a time machine in BASIC. I know you can make a better time machine in other languages, but there is something to be said for doing it in BASIC. Many things are ugly with this, just broken, or extraneous blocks of code I threw together for some one-off task. I put this here to see if it generates interest. I'm happy to change this thing around. I do many things in favor of speed, but I know some of it's crap. Package contains a Server and a Map Editor. The Map Editor is meant to be able to add and edit: World Files, worlds have 2 layers. 0.txt background 1.txt forground. The files are formatted with a header: width, height, and the largest tile number. The largest tile number is used to pad the world files. So that the world files could be edited by hand. Spoiler WorldN Tile X_Y.txt (a subset cord of tile to specify frame): World Tile X_Y is stored in a separate file per layer so that the world layer files remain pretty. Spoiler World Directory Structure: Example: World_1_Overworld. Spoiler World_2_Aliahan is the same structure but has different resource tiles. Both world root folder names are just the number. In folder above we can notice only layer 1 has a Tile_X_Y file. This is because atm only trees use the system and trees are foreground. Areas: areas are to subdivide worlds in effort to section the worlds and divide lists for: hotspots, NPCs, Items, and area properties such as: Out-of-Bounds: Destination and Repeat Tile, enemy encounters, etc.. Areas have: Global Enum $eArea_x, $eArea_y, $eArea_w, $eArea_h, _ ; Area World Bound Rect $eArea_ob_tile, $eArea_ob_world, $eArea_ob_x, $eArea_ob_y, _ ; Out of Bounds Repeat Tile and World Destination if Out of Bounds $eArea_hotspots, $eArea_items, $eArea_NPCs ; Total Hotspots per Area, Items and People Spoiler Hotspots: hotspots are locations on the board that relocate the player Global Enum $eHotspot_x, $eHotspot_y, _; the spot in world that moves player $eHotspot_dest_world, $eHotspot_dest_x, $eHotspot_dest_y; the destination world and position Board: A rectangle of world tiles is pre-drawn on aBoard[layer_max] centered on player, you can change the size to consume less RAM but requires drawing world to board more often. Animated Background: Before anything is drawn a moving BG image is drawn. Creating beautiful water AI. So if no tiles are drawn from world, BG water animation is shown. Map Editor should be able to test all of the systems of the game: Player, Worlds, Areas, Hotspots, NPCs, Items, Shops, Battles, Netplay, etc.. (Not all systems exist yet) Download site: http://songersoft.com/programming/dw3_remake/dw3_remake_about.phtml It's going to say that the files might be malicious. Probably b/c of the DLLs and I hosted an unmoderated forum from the site years ago were people posted malicious links. Let me know if it's malicious! PS: I tried posting the source but I keep getting errors. I think the source might be too large to post. 6308 lines. Idk. Edited January 25, 2019 by Xandy Multiplayer packet field description argumentum, Danyfirex, TheSaint and 3 others 6 Human Male Programmer (-_-) Xandy About (^o^) Discord - Xandy Programmer MapIt (Tile world editor, Image Tile Extractor, and Game Maker)
TheSaint Posted January 2, 2018 Posted January 2, 2018 As always Xandy, you continue to impress. Great work! Xandy 1 Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)
DynamicRookie Posted January 3, 2018 Posted January 3, 2018 16 hours ago, TheSaint said: As always Xandy, you continue to impress. Great work! Wish i could say the same. On 30/12/2017 at 3:32 PM, Xandy said: The GUI of the game, the game itself, doesn't load the GUI correctly. It crashes right after loading a black image. Still, seems like a incredible project that my toaster can't handle it's awesomeness Good job for those 6901 lines Xandy 1
Moderators JLogan3o13 Posted January 3, 2018 Moderators Posted January 3, 2018 7 hours ago, DynamicRookie said: Wish i could say the same. If you look back through the OP's record of work on this forum you will see a constantly high level of intellect and coding acumen, which led to @TheSaint's comment (which I happen to agree with). Just curious what astounding contributions you could point to, that you feel it is okay to disparage a long time member of this forum? Xandy, CosmicDan and argumentum 3 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Xandy Posted January 3, 2018 Author Posted January 3, 2018 (edited) 22 hours ago, DynamicRookie said: The GUI of the game, the game itself, doesn't load the GUI correctly. It crashes right after loading a black image. Do you receive any output in the console? I output some lines that might help me see where it breaks or at least how far it might have gotten before crash. I probably need to add more output lines. I kind-of posted with just whatever source I had atm. Map Editor is using: 192 MB RAM. I've tested it on different machines to make sure the file system is stable and independent of my machine. I don't have any toasters to test with. I'm happy to try to fix this problem. Note: I had posted an invalid zip file. It has been fixed. Thank you for helping me find my mistake. I appreciate the positive reflection JLogan, it means a lot to me; thank you. To be fair my history also includes me messing up the webspace links almost every time. Just ask Jabbers or MeSale xD. Edited January 4, 2018 by Xandy Human Male Programmer (-_-) Xandy About (^o^) Discord - Xandy Programmer MapIt (Tile world editor, Image Tile Extractor, and Game Maker)
Somerset Posted January 3, 2018 Posted January 3, 2018 1 hour ago, Xandy said: Map Editor is using: 192 MB RAM. My 286 chocked, crashed, and died. Keep up the good work. Xandy 1
Xandy Posted January 3, 2018 Author Posted January 3, 2018 Oh jeeze it is broken Human Male Programmer (-_-) Xandy About (^o^) Discord - Xandy Programmer MapIt (Tile world editor, Image Tile Extractor, and Game Maker)
Xandy Posted January 3, 2018 Author Posted January 3, 2018 (edited) I found the problem. All of the data files / folders were not in the zip. I had zipped only one of the necessary folders, instead of the root folder. I corrected the zip, really sorry. Please delete old and download new if interested. (same link) Download site: http://songersoft.com/programming/dw3_remake/dw3_remake_about.phtml Edited January 3, 2018 by Xandy Human Male Programmer (-_-) Xandy About (^o^) Discord - Xandy Programmer MapIt (Tile world editor, Image Tile Extractor, and Game Maker)
TheSaint Posted January 3, 2018 Posted January 3, 2018 9 minutes ago, Xandy said: I found the problem. All of the data files / folders were not in the zip. I corrected the zip, really sorry. Ha ha ha happens to the best of us. I only read what you wrote and watched the video, because as you know my current system can't handle your demanding games ... and they don't need to be too demanding before my Netbook spits the dummy. But hopefully only a couple more months before I am cooking with gas again. Xandy 1 Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)
TheDcoder Posted January 5, 2018 Posted January 5, 2018 Impressive work Xandy! I downloaded the zip and ran the Map Editor, works very well indeed! I should make time to look and study your code, keep up the good work TheSaint and Xandy 2 EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time) DcodingTheWeb Forum - Follow for updates and Join for discussion
Xandy Posted January 5, 2018 Author Posted January 5, 2018 Thank you for trying it and confirming it works. Best present I could get this morning TheDcoder 1 Human Male Programmer (-_-) Xandy About (^o^) Discord - Xandy Programmer MapIt (Tile world editor, Image Tile Extractor, and Game Maker)
Somerset Posted January 8, 2018 Posted January 8, 2018 Your map editor has done nothing for my d&d. Xandy 1
DynamicRookie Posted January 8, 2018 Posted January 8, 2018 (edited) On 1/3/2018 at 7:47 AM, JLogan3o13 said: If you look back through the OP's record of work on this forum you will see a constantly high level of intellect and coding acumen, which led to @TheSaint's comment (which I happen to agree with). Just curious what astounding contributions you could point to, that you feel it is okay to disparage a long time member of this forum? I never meant to say that. I mean that it didn't ran in my PC. Edited January 8, 2018 by DynamicRookie Xandy 1
Xandy Posted January 8, 2018 Author Posted January 8, 2018 16 hours ago, Somerset said: Your map editor has done nothing for my d&d. Dungeons and Dragons? You could swap out the tiles. Human Male Programmer (-_-) Xandy About (^o^) Discord - Xandy Programmer MapIt (Tile world editor, Image Tile Extractor, and Game Maker)
Somerset Posted January 8, 2018 Posted January 8, 2018 3 hours ago, Xandy said: Dungeons and Dragons? You could swap out the tiles. I tried, but all it did was eat my +1 mace, and slapped the dungeon master. Xandy 1
Xandy Posted January 8, 2018 Author Posted January 8, 2018 That's what you get. Human Male Programmer (-_-) Xandy About (^o^) Discord - Xandy Programmer MapIt (Tile world editor, Image Tile Extractor, and Game Maker)
Xandy Posted January 25, 2019 Author Posted January 25, 2019 (edited) NOTE: TOPIC HAS BEEN MERGED TO HERE: MapIt Quest NOTE 2: Post was made (instead of edit) so that Topic followers would be alerted. Edited January 25, 2019 by Xandy Human Male Programmer (-_-) Xandy About (^o^) Discord - Xandy Programmer MapIt (Tile world editor, Image Tile Extractor, and Game Maker)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now