I was woundering if I added more dir's to the .dmi icon file. Would I be able to create custom dir= value's from that .dmi icon file's new dirs?
Some details:
.dmi files are setup so they can either take 1,4, or 8 directions.
dir default = SOUTH I think any who.
SOUTH I think = 0 Tell me if Im wrong.
NORTH = 1, East = 2,West =4 SOmthing like that I think.
Then the other dir's. I think it's some kinda binary setup. Any info on this topic would be cool?
Any way what Im saying is if I added more dir's to the .dir file.
Could I define new Dir values and have them work?
ID:268692
Oct 19 2004, 3:13 pm
|
|
Oct 19 2004, 3:48 pm
|
|
You can do that, but using seperate icon_states. I made a system to have 16 working dirs, it could easily be 360 dirs. You just need to program that yourself, it's not hard.
|
In response to Crashed
|
|
Crashed wrote:
You can do that, but using seperate icon_states. I made a system to have 16 working dirs, it could easily be 360 dirs. You just need to program that yourself, it's not hard. So for your 16 dirs it would be just two icon states each with 8 dirs right? Then just change the icon state along with the dir? |
In response to Green Lime
|
|
Actually, it was just 1 icon_state with 1 dir. It was a top-down graphic, so I generated the dirs automatically.
|
In response to Crashed
|
|
Crashed wrote:
Actually, it was just 1 icon_state with 1 dir. It was a top-down graphic, so I generated the dirs automatically. O.O so you made 16 icon states each with 1 dir? Then just changed the icon state instead of the dir? Would that be more laggy than the 2 icons states with 8 dirs? |
In response to Green Lime
|
|
No, I generated all the dirs when the world is created. I then added them to a list, and everytime needed, I took it from the list. It was simple, and a lot less work.
|
In response to Crashed
|
|
Crashed wrote:
No, I generated all the dirs when the world is created. I then added them to a list, and everytime needed, I took it from the list. It was simple, and a lot less work. But doing that would be the same as making 16 icon states each with 1 dir or 2 icon states with 8 dirs right? Only difference is the work part. I wounder, would generating them when the world is created have any difference in the rsc file than the 16 icon states? If so is generating the dirs when created better and cause less lag time than pre made dirs or more? Cause when you create a dir its just added to the resource right? |
In response to Green Lime
|
|
It's a lot less on the RSC load. BUT, it does take about 2 seconds to completely generate 16 directions. So less than 2 seconds of loading at world/New() beats 4 minutes of loading.
|
In response to Crashed
|
|
Crashed wrote:
It's a lot less on the RSC load. BUT, it does take about 2 seconds to completely generate 16 directions. So less than 2 seconds of loading at world/New() beats 4 minutes of loading. Umm lets say I had 2000 objects each with 32 dirs It would be better to do it rsc wise then right? Cause the loading time in world/New() would be too great. |
In response to Green Lime
|
|
Woah, you have 2000 DIFFERENT objects? I haven't even come close to that in any of my projects.
|
Green Lime wrote:
I was woundering if I added more dir's to the .dmi icon file. It can't be done. Lummox JR |
In response to Lummox JR
|
|
Lummox JR wrote:
Green Lime wrote: Actually I tested it this morning at 8:32. It gave a strange byond bug error thingy. :) Thanks for posting though Lummox JR :) |
In response to Crashed
|
|
Crashed wrote:
Woah, you have 2000 DIFFERENT objects? I haven't even come close to that in any of my projects. Ive been working on it for 3 months. Then all of a sudden my comp died. Good thing I had a lot on paper. Currently Im in the stages of re doing it. Im around 98% sure my objects will reach into the 2k range. Speeking of object range. Would you happen to know the limit for byond on objects? Also have any clue whether it would be better for 2k objects with that many dir to be loaded when loading the rsc file than on world creation? |
In response to Green Lime
|
|
following this thread I found no info excpet that it can be done. Well first off, what is the view of the game? If it's top down (directly overhead) you really don't (i believe) need to make all those directions. Look up the Turn (icon) proc. make say NORTH be your 0. then break down 360 into how many directions you want. Let's take 32. that's broken down into degrees of 11.25(not fun...) Using turn you can then just turn the icon. In a top down view, the icon will still look the same. Then in the move proc(this would be the hard part) adjust the move based on the angle(you'd have to do the math) There is a vehicle move demo out there that has 90 (I think)( different diretions you could move in. Check out the demo section. |
In response to Crashed
|
|
Crashed wrote:
It's a lot less on the RSC load. BUT, it does take about 2 seconds to completely generate 16 directions. So less than 2 seconds of loading at world/New() beats 4 minutes of loading. It may have a much smaller rsc file, but connected clients still need to download all the icons that you generate at runtime. In the end, the connected client eats the same bandwidth either way. If it takes a while to render your extra icons, it's probably best to pre-render them and include them in your resource file. You can write a short BYOND program to do all the processing and use the ftp() proc to export the final result as a dmi file that you can include in your project. If you set preload_resources properly, they won't need to download them until they see them, but the first time a player sees something with a resource that isn't downloaded, they won't be able to see it until the resource downloads. |