Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Januario

  • Rank

Personal Information

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hey! Whatever the writing mistakes there could be, I think the point was very clear for 99.99% of the people that answered this post, the algorithm's goal is to explore the entire array of 100x100 in the possible efficient way, having in consideration that there are obstacles (you have the A* function for this) and fog of war (which means that you can't simply setup the waypoints so you basically have to explore the entire thing)....
  2. Ohhhh yeah! I think this is exactly what I'm doing now, as I said before in the #2 thing I've seen so far, it looks like the most efficient way to do it so far. Thank you for sharing your thoughts!
  3. This sounds juicy! What do you mean with 'mark fog sections' exactly? I used to create a lot of bots before but I never had to deal with fog of war before... Because I could explore the map myself then save the explored map, but in this new kind of games, maps change and are re-created regularly (just as Diablo dungeons worked back then), so I need to have quite a decent explorer for this. Multiple things require exploration, gathering resources and so forth... The maps are also quite big so small tweaks in efficiency have a huge impact on the required time to achieve such result ;P
  4. Hello guys! thank you for answering me... 1) I got the nearest tile function already and it works pretty nicely to discover stuff like the nearest mob, or to discover the nearest resource when doing basic exploration. 2) Got it too. 3) This is the thing, of course, tiles separately can either be revealed or not, but the map being 300x300 or whatever, it could not be the same to try to explore "top" (when there's only 20x to be explored there) or explore "bottom" where the map could be 50% unexplored in that direction... that's the algorithm I'm trying to improve a bit. Nope haha... Here's what I've been trying to do: 1) What I just quoted (it works, but is very inefficient and sometimes it takes too long to explore. 2) I've been seeing people applying the circular formula or the checksum of the surrounding square of a tile to get the "sum" of the entire area around it, so you can know which tiles have the most "fog of war" around it, it is much more efficient than #1 because it will hardly choose cornered tiles and such, but feels like there's probably a fast enough way to do something like this but with much bigger area than 20x20. To illustrate what I'm trying to achieve a little bit better I just drew the picture from above. Black being unexplored and green explored, given that situation, the algorithm should be able to detect that going south is a preferred unexplored tile to go
  5. Hey guys!, So, I'm basically working on an explorer right now. It should, as the name suggests, explore the entire thing, the most efficient way possible. Your character has vision around you, of, 10x10. The map is much bigger, 100x100. However, it can't just go straight from a corner to another, because: The tiles can be an occupied, or un-occupied one. You can add weights to the tiles, so feel free to use this in your advantage (let's say, adding an extra weight to a visited tile so you can compare visited against non-visited ones). You can use the Pathfinder I'm using, based on the A* algorithm. So, I could be wrong, but by basic logic, I assumed that the "fastest way" to explore the entire thing, is answering the question "What is the nearest tile that I can walk in, that is not occupied and that can reveal as much fog-of-war (unvisited tile) as possible?"... My questions are: 1) Is my question correct? is that really the best way to explore the entire map? 2) If so, what's the best way to know "which is the tile that could reveal the most fog of war"? Once I get the tile that reveals the most fog of war possible, then I just throw the pathfinder to it. But I'm having problems doing a good way to achieve that :'( I hope you guys can help me on this one! Thank you
  6. You are incredibly awesome man... THANK YOU!
  7. Sweet! So, in a summary: - For the browser, stay with TCP because UDP will require way too much tweaking and weird stuff. - Keep small maps separated using Z axis (or maps_id, which in theory is pretty much the same). - "Cache" as much as possible when you are loading map entities and use what you have for subsystems, only reload if required. But how I should deal with tiles is still confusing for me. Let´s say I have a 100x100 map with living grass, water, dirt that comes into grass, and so forth... When loading the map, should I create AND "cache" (keep on memory server, not in the DB) every single tile as an object? So basically my 100x100 map is an array of tile objects that themselves have their own "type" and so forth... Inside every single object, they are running their own "ticks" to know if they should decay, turn into something else or whatever... And of course items and players can interact with these objects restarting the ticks, changing the type or whatever, but yeah, is just an array of 100x100 objects. Despite it sounding like a lot of objects and ticking inside, it sounds MUCH more efficient than looping every X seconds between ALL the tiles and checking if a tile needs to decay (change the type) or whatever... correct? So, is this how it should be (as the first array of objects method suggests)? or is there another way I'm not talking about here?
  8. Thank you so much for answering! Regarding to question 2 and 3, is all clear now!, however, this being just a learning experience I'd like to share it with a community that I got already, which being kinda sandboxing project, I'm sure they'd be glad to test and follow, so it really needs to be on the web, so, having the options that I already got, are all pretty much the same? or is there any you'd recommend specifically? 1) Yup! I've built games in the past, but more importantly worked deeply on the core of some private-servers (written in C++) which gave me an idea about how to structure this whole thing, but this being a more specific game, as you say in #4, there are some specifics I need to resolve now... ... Like the map thing one. I understand the current scenario filled with variety, but could you please name a few methods I can search and get into? is going to be a 2d sandbox probably with different maps through the Z axis (pretty much like pokemon), so, I've been suggested two options but I just can't believe these are the only ones, they sound so bad! a) Store every single tile on the DB then do queries every X amount of time checking all the tiles and the last-decay time, or whatever last-update effect you are trying to do, then proceed to do the changes on the tile if required. This sounds sooo heavy for the server and gives me the feeling that there will be constant lag-spikes on every round. b) Make every tile an object and just start dealing with the effects through individual timers on object creation. What do you think of those? are these really the only ones we've got?, if so, which would you recommend?. It would be good to hold between 100 and 300 players online (per server). Thank you again for everything man, that was a nice answer and you're doing the same in every post 👍
  9. Hey! Awesome community right here, I'm pretty new, hopefully, we'll get along together Here we go: 1) I've been wanting to learn GoLang for a while and I've been involved in some sandboxes lately, so I thought, why not? Let's make a basic game as a learning experience and I thought about doing the server in GoLang, what is your opinion on this? (The server is pretty much a web-app, could possibly build an app for it too in the future). 2) Regarding to networking, just readed an answer from hplus0603 suggesting to stay away from socket.io and WebSockets, even though the suggestion was made for a fighting game, I find it as a good signal to ask this question, in fact, I'm playing a game right now that uses WebSockets and the connection is honestly not as good, should I stay away from it too?, is there any architecture you'd advise for this?. 3) Regarding to server-scripting, in the future, it would be good to outsource it and let other people do the job, so I'll have to eventually add some kind of scripting to the game. How hard is it to implement LUA scripting in a GoLang engine? Is this just too much? 4) Lastly, a living map. A problem I've frequently encounter in MMORPGs that I've been playing on the web (indie games) is that they deal very bad with complex living maps and creatures, sometimes it looks so bad that I literally think that the server is doing a loop through all the monsters and check if any of those can attack a nearby player or something (it really feels that bad, monsters re-load the pathfinder like once a second, which is too slow...). Not only this issue regarding creatures but also the map, let's say you'd have a living map (grounds decaying, plants appearing, etc...) which is pretty common in sandbox games... which would be the proper way to reload all this? how should I keep track and update every single tile in an asynchronous way? And that's it for now! I'll be anxiously awaiting for your answers, opinions, and suggestions! Thank you so much in advance
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!