Project 137

A forum to show of the stuff you did for your server.

Moderators: osRose dev team, ospRose dev team, osiRose dev team, Moderators

Re: Project 137

Postby PurpleYouko on Fri Apr 15, 2016 8:14 pm

So I decided to work on putting limits on where monsters can go and where they can't.

First thought was to do it by loading in all the height maps from the client files but I quickly discarded that idea on the grounds that it's a pain in the ass to work with those files and because it would have only given me a heightmap in the end anyway when what i really wanted was to define area where they can and can't go

I came up with the idea of hijacking lmame's grid system to make a massive X,Y grid by the name of "collisions" for each map
Basically each point in the grid represents 1 meter (as displayed on the minimap)
Each point contains an X, Y coordinate that translates directly from the Position.coords values by subtracting the X and Y minimums (as defined in the existing grid system) and a value to define which monsters (if any) can go there.
0 is a no go for any monster
1 is basic land for pretty much any monster
2 is water so just fish and aquatic monsters for that.

I plan to add more terrain types later. maybe sand for beaches and desserts, heavy grassland and so on.

So how do I get these fancy shmancy grids into place? that's the tricky bit.
It was trivial to actually build and implement the structures so that the server loads the grids but they are all empty :(

"So what happens if I use a character to run around the maps recording the locations and then save it from the server"? i think to myself.
So i did it. Added some new config stuff and a couple of GM commands along with a new save routine that only saves maps that I've actually modified. (otherwise it takes WAY too long to save)
OK so that gives me the outlines, rings around trees and buildings and stuff. Now what? I can't physically run over every single square meter of ground in every map. That would take years.

Let's load it into excel and display all the 1s and 2s and 0s in a nice easy to see spreadsheet.
Yeah... That was a smart idea :?
99% of the spreadsheet is empty and there are a few skinny little lines of 1s and 2s in a massive sea of zeroes, and it's really hard to see where the non-zero values are.
And even then, HOW to fill in all the huge spaces between the edges that I had recorded?

To cut a long story short, I built some cool little macros that re-color the cells whenever a value is changed, made all the cells square and zoomed way the hell out so I could see a significant chunk of the map.
Then I spent a couple of hours designing a flood-fill algorithm, during which i had to code a method to actually use a stack in VBA.
VBA doesn't have any stackable structures like Vectors. It has to be done with arrays and movable pointers. It was a pain in the ass but I finally got it done.

I now have a complete map of Adventurer's plains that loads into the server (along with all the other empty maps)
Now to do the others.....
And then start modifying AIP so that it can actually work with my new system.

Dynamic spawning will be along pretty soon :D
The worst of the groundwork is done now.
Need to lookup information on NARose items, skills, quests?
Now featuring a newly completed skill tree for all classes
Formatting fixed for different resolutions
Image

"A Gazelle is nothing but a giraffe plotted logarithmicaly"
User avatar
PurpleYouko
Rose Guru
Rose Guru
 
Posts: 4733
Joined: Fri Aug 10, 2007 2:05 pm

Re: Project 137

Postby XxXshidoXxX on Sat Apr 16, 2016 2:52 pm

You better not take out the flying fish.
I love the flying fish.
I'll track you down.
My collection ( Tools, clients sources...)
https://mega.nz/#F!AdcFnQDL!sKp3O9tWGGdWvLEj_EYfwA
osrose mobile project
viewtopic.php?f=34&t=5787
OsRose Mobile development + Titan Rose redesign
https://github.com/shid0x
XxXshidoXxX
osiRose dev
osiRose dev
 
Posts: 445
Joined: Mon Aug 27, 2007 11:44 am

Re: Project 137

Postby PurpleYouko on Mon Apr 18, 2016 2:26 pm

if you want fish to fly then all you would have to do is modify their "environment limitation" value which will be added to the STB. I'm thinking of adding 3 or 4 columns for that so if you want flying land fish just set one of those columns to 1 :D
Need to lookup information on NARose items, skills, quests?
Now featuring a newly completed skill tree for all classes
Formatting fixed for different resolutions
Image

"A Gazelle is nothing but a giraffe plotted logarithmicaly"
User avatar
PurpleYouko
Rose Guru
Rose Guru
 
Posts: 4733
Joined: Fri Aug 10, 2007 2:05 pm

Re: Project 137

Postby Raven0123 on Mon Apr 18, 2016 5:29 pm

I hope your taking good notes on how you did all of this because quite a few of these features are on the wish list for osirose 2.
User avatar
Raven0123
osiRose dev
osiRose dev
 
Posts: 379
Joined: Tue Sep 11, 2007 11:06 pm
Location: USA, NJ

Re: Project 137

Postby L3nn0x on Mon Apr 18, 2016 6:06 pm

Ahah true enough, even if I'm pretty sure I don't want to work with the cvs formatting thing :ugeek:

I'm sure there's another way to do it. Something like a bot maybe ?
L3nn0x
osiRose dev
osiRose dev
 
Posts: 111
Joined: Wed Oct 21, 2015 8:22 pm

Re: Project 137

Postby PurpleYouko on Tue Apr 19, 2016 2:22 pm

Running a bot would be no different than running regular monsters as I see it.
It would still need to be able to tell where it's going and decide where to place limits.

And I'm not using csv files either. This is a custom format. ;)

Best way to incorporate this stuff into osirose would be to compare sources with winmerge or something like that.
The actual changes are fairly well modular with just a few function calls in some of the main parts of the program.
Didn't have to make any major changes.
Need to lookup information on NARose items, skills, quests?
Now featuring a newly completed skill tree for all classes
Formatting fixed for different resolutions
Image

"A Gazelle is nothing but a giraffe plotted logarithmicaly"
User avatar
PurpleYouko
Rose Guru
Rose Guru
 
Posts: 4733
Joined: Fri Aug 10, 2007 2:05 pm

Re: Project 137

Postby L3nn0x on Wed Apr 20, 2016 9:49 am

True enough, I will need to give it more thoughts to find a viable solution.

I'm not sure about winmerge as we are redoing everything from scratch... (And it's slowly coming together too! ;) ) And it's more fun to do it ourselves too
L3nn0x
osiRose dev
osiRose dev
 
Posts: 111
Joined: Wed Oct 21, 2015 8:22 pm

Re: Project 137

Postby Raven0123 on Wed Apr 20, 2016 12:55 pm

L3nn0x wrote:True enough, I will need to give it more thoughts to find a viable solution.

I'm not sure about winmerge as we are redoing everything from scratch... (And it's slowly coming together too! ;) ) And it's more fun to do it ourselves too


He's referring to using winmerge on the client source. :P
User avatar
Raven0123
osiRose dev
osiRose dev
 
Posts: 379
Joined: Tue Sep 11, 2007 11:06 pm
Location: USA, NJ

Re: Project 137

Postby Hazuki on Fri Jun 10, 2016 1:17 pm

How's the project going mate? :)
Image
Hazuki
Smoulie
Smoulie
 
Posts: 62
Joined: Wed Aug 08, 2007 10:09 pm

Re: Project 137

Postby PurpleYouko on Fri Jun 10, 2016 3:31 pm

not much happening right now.
Real life and work is getting in the way ;)
Need to lookup information on NARose items, skills, quests?
Now featuring a newly completed skill tree for all classes
Formatting fixed for different resolutions
Image

"A Gazelle is nothing but a giraffe plotted logarithmicaly"
User avatar
PurpleYouko
Rose Guru
Rose Guru
 
Posts: 4733
Joined: Fri Aug 10, 2007 2:05 pm

PreviousNext

Return to Pimp My Rose

Who is online

Users browsing this forum: No registered users and 3 guests