Coly010 Posted January 21, 2011 Share Posted January 21, 2011 i'm thinking of creating a 2d tiled game but i want to know how would you make it online and how would you pull the map from a text file or should i do it via database. i think doing it via text file would be easier as i could just do stuff like 10111110 11111111 00000000 11100111 22114110 but then how do you make it so that you can see other users? i know neab has sumthing like this but i want to do this from scratch. then i would need to learn collision lol but it would be worth it and also if it was to be fight anyone you see anywhere do you think that the game might be slow for all users. or should i just create certain areas for fights. and then create dungeons which would require loading up new levels. so tell me what you think anyway thanks Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted January 22, 2011 Share Posted January 22, 2011 That's a lot of question in little space :D Anyhow: Having it in a database is the way to do, however you should somehow compress your data (RLE is what I use). Collision detection between what? 2 players? Keep in mind some people could just leave their PC on to block some path an annoy others, that's why we don't make any collision between players inside NEaB. PvP is not something every players want, or maybe not all the time, so some area of PvP is the way to go for me. For being able to see others on the map, we do use a memory table and an ajax loop to update the position of the players. Quote Link to comment Share on other sites More sharing options...
Coly010 Posted January 22, 2011 Author Share Posted January 22, 2011 So could you send me hints and tips and little snippets of cOde for how to do the multiplayer part the collision which would be between say the player and a wall of a house. What does Rle compress? I'm going to use nappy or tiled qt to create my maps but how do you have it in mappy so that u can have more than one tile block showing? Everytime I go to add a tile it changes the one I have up. When I finish my map should I export it as a .MAP file or a text file? Lol this is a lot of questions but I need to understand the basics before delving further. One more question. How do you pull the map data from the database? Thanks again Coly010 Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted January 22, 2011 Share Posted January 22, 2011 Nope sorry will not give you all that info. RLE => search with google. Multi player interraction => search AJAX Collision? Some tiles are walkable some not. Quote Link to comment Share on other sites More sharing options...
Coly010 Posted January 22, 2011 Author Share Posted January 22, 2011 Ok thanks , should I search collision in php 4 the collision? Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted January 23, 2011 Share Posted January 23, 2011 No PHP have nothing to do with collisions... all this must be done in JS if you want to have your game usable. Quote Link to comment Share on other sites More sharing options...
Coly010 Posted January 23, 2011 Author Share Posted January 23, 2011 Ok, Would you create a function like function touchingwater { //js code } so how do you have the players character respond to clicking somewhere on the map? or should I have it respond to keys pressed? Would you need js for all that too? thanks Quote Link to comment Share on other sites More sharing options...
a_bertrand Posted January 23, 2011 Share Posted January 23, 2011 yes you need javascript for all. Or you can do it in flash, java or silverlight Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.