• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

My first program, need help

Did some work on the borders, I still have some bugs to workout, but I have the bulk of the logic done for the 'precise' border options done (I realize that grass should probably get priority over dirt):
precise_Borders.png


After the corner mode is fully implemented, I need to put in RME style borders (full tile a time doing large corner pieces where possible), and square style borders (Full tile a time never using the large corners).
When you have a ground brush selected, you are able to choose which border style you want to do (Precise (corner by corner), RME, or Square), you also pick which border set to use (ex: grass has a regular and alternative border)
 
You're doing good work, constant progress being made as well. Keep it up!
 
Progress is slow/non existent during the week because of work. I'm mainly doing this so I will have non proprietary code samples to show if a future employer asks. During the weekend I will try to get ~8 hours or so on it.
 
Why reinvent the wheel tho? Once you understand programming concepts, design patterns and memory management you can accomplish much more. My tip is to work on these concepts on small scale, make calculators, music players, maybe some ASP website to control your finances. There is no need to reivent the wheel, you will not see people doing the same code, to accomplish the same thing. Remeres is already open source, if you want to make an improvement, just create a patch for yourself.
 
Why reinvent the wheel tho? Once you understand programming concepts, design patterns and memory management you can accomplish much more. My tip is to work on these concepts on small scale, make calculators, music players, maybe some ASP website to control your finances. There is no need to reivent the wheel, you will not see people doing the same code, to accomplish the same thing. Remeres is already open source, if you want to make an improvement, just create a patch for yourself.
Because to do what I want from it, it requires a rewrite? Why would I waste my time making a calculator or music player?
 
Did some work on the borders, I still have some bugs to workout, but I have the bulk of the logic done for the 'precise' border options done (I realize that grass should probably get priority over dirt):
precise_Borders.png


After the corner mode is fully implemented, I need to put in RME style borders (full tile a time doing large corner pieces where possible), and square style borders (Full tile a time never using the large corners).
When you have a ground brush selected, you are able to choose which border style you want to do (Precise (corner by corner), RME, or Square), you also pick which border set to use (ex: grass has a regular and alternative border)
I think you should make priority an optional method.
If certain ground have priority over other grounds, we'll have the same problem as we do with remere's where to place border's of certain ground types over other ground type's we are forced to do it via raw.
(Red carpet for an easy example.)
 
I think you should make priority an optional method.
If certain ground have priority over other grounds, we'll have the same problem as we do with remere's where to place border's of certain ground types over other ground type's we are forced to do it via raw.
(Red carpet for an easy example.)
Never knew that was a problem, it should be pretty simple to implement, il post screens shots next week of he progress on it, and I should be able to include that. Thanks for the suggestion :)
 
Never knew that was a problem, it should be pretty simple to implement, il post screens shots next week of he progress on it, and I should be able to include that. Thanks for the suggestion :)
Again I don't use the map editors often enough to verify more, I'm not even sure if it's still an issue, but yeah I specically remember carpets having/had priority values.
Red > Green > Blue > Brown > Ragged
 
Well, Good luck with ya Rme But ya, you are missing lots of Basics, well no offensive But you learnt The Basics of the language, now you are just trying to learn the advanced by just looking at other's Code, You will know what does this Do and That Do but you wont know "How"...Maybe start by Doing some Simple Challenges First

Best Of Luck xD
 
Again I don't use the map editors often enough to verify more, I'm not even sure if it's still an issue, but yeah I specically remember carpets having/had priority values.
Red > Green > Blue > Brown > Ragged
I'm sure it is, the reason a lot of the stuff people wanted wasn't built into rme is because the code base wasn't that flexible. My biggest complaint with it was the borders but now that I've looked at it more there are many areas that could be improved.

Well, Good luck with ya Rme But ya, you are missing lots of Basics, well no offensive But you learnt The Basics of the language, now you are just trying to learn the advanced by just looking at other's Code, You will know what does this Do and That Do but you wont know "How"...Maybe start by Doing some Simple Challenges First

Best Of Luck xD
Not sure what basics you think I'm missing but perhaps you could suggest a topic you think im lacking in. I'm also not sure why you think I've been looking at code samples. The only code samples I've looked at were otbm and dat specifications.
 
Last edited:
Small update, I debated making a calculator app like Stellow suggested, or the simple challenges that tetra20 suggsted, but I decided to do some work on the editor instead.

Three things
1) Got context menus working on the map
Nothing too crazy, will actually show the name of the brushes which is nice
context_menus.png



2) Added priority controls and size controls to ground brushes along with an always on top option. Size options are 0.25 (corners), 1, 2,3,4,5,10,15,20,25. Obviously all the bordering done in the screen shots was done with the ground brushes (no manual border placement).
Not pretty yet, but functional

3) Added custom brush lists. The bottom section in the screen shots are the custom brush list. The idea is that when mapping you tend to you use a certain set of brushes for a specific circumstance. The example I did below was a nature theme, I put brushes that I would use while doing a nature scene all in one place. There is a grid splitter between the two sections, therefore they can take up whatever fraction of the screen you want, even hidden. To add items to a custom list, you just drag and drop brushes from the top list into it. One of my complaints with RME is that in order to make any modifications to brushes you had open xml files. I plan on having everything configurable inside the editor.

Both palettes are taking up equal portions of the screen.

The specialty piece section is similar to the wall brush, where you can place pieces that don't get placed with the auto border but are still related. One example of using this would be the the grass hole tiles, and the shovel hole tiles. Perhaps an unsung advantage of the specialty pieces is that they allow you to greatly cut down on the number of different brushes you need to be visible. If your working in a city with the white plaster walls, you only need the one wall brush in your brush list and it will contain references to all the special wall pieces that will be become visible upon selection of the base brush.
screen1.jpg


Nature set is pushed to take up entire screen
screen2.jpg
 
Last edited:
Another day, another update.
Random Brush (doodad)

Creation Overlay, similar to the other creation overlays percent chance is out of the whole.. if there is 20 items and all have a percent chance of 1, they have will have a 1/20 chance of placement:
Create_Random_Brush1.png



First pass, there is much more I'd like to do with the random brush. Specifically I'd like check boxes next to each item so that you can decided what it places, as well as being able to modify the percent odds for each item in brush settings. But, you have to start somewhere. Width is the width of the area you want to place items at. The percent odds is the percent chance (0-1) at each location an item is placed. In the case of the width being 1, the item is always placed. Ctrl + scroll to iterate to the next random set. The list of all the items in the brush is presented when the brush is selected. Selecting one of those will select that item's raw brush. This always to easily grab a specific item, instead of iterating over til you find it.

Random_Brush2.jpg
 
Spent another 2 hours..
Got the initial pass done on 'composition' brushes. These are basically anything that is made up of more than 1 part, and can possibly have rotations. This can be anything from a catapult (4 pieces each, 4 rotations), to a house.


The creation screen. Popup like the others, there is an add direction button, a list of directions, and the direction name. If you name that North,East,South,West it will always set up the rotation clockwise. Otherwise it will go in the order you entered them. Inside the popup is a fully functional map editor, complete with all the brushes from the main one (ground,wall,other composition,ect).
Composition_Brush.png




Obviously I have some work here. I don't have functioning previews in the brush window right now, I don't have brush specific window yet (bottom left, not sure what to put in it tbh). I also apparently have a bug with multi-floored previews on the map (should be a simple fix, editor is obviously very much a work in progress, bugs are expected). But preview bugs aside, it places it correctly and it works :)
Composition_Brush2.png



Side note: I was serious about needing help when I created this thread. Specifically in the form of suggestions. Although I think i have some decent ones, I'm sure there are many things I will miss
 
Last edited:
Not many posts recently, I've been working on re-writing the renderer.

C#'s default image rendering is around is around 1/10 the speed of OpenGL (what RME uses). It works fine when your up close in a scene but absolutely falls apart when zoomed out. Since I am using C# with wpf for the application, I do not have access to DirectX nor OpenGl for render window. There are some plugins for them, but they fall apart at large render resolutions. This leaves me with image caching (render a section of the map, save it to an image, and display that image when asked to draw that section). Image caching can be done 2 ways. In ram, and on disc. I wrote implementations for both, the image caching in ram used an exceedingly large amount of ram (8+ gbs) due to the fact everything is stored in bitmaps, caching to disc I was able to save everything to png which is greatly compressed without losing quality.

Caching to disc:
Cons
  • while creating cache, slower than normal render so you see some slight freezes when you initially explore the map, the freezes are more apparent when zoomed out
  • uses a lot of disc memory (~1 gb per map)
Pros
  • since files are cached to disc they do not need to be recreated next launch of the app
  • Low ram usage (compared to ram caching)
  • amazing performance once cache is created
  • doesn't care how complex each section is once its been cached, therefore a full map with all details on at height = 0 performs flawlessly at max zoom (see image)

renderer2.png
 
Not many posts recently, I've been working on re-writing the renderer.

C#'s default image rendering is around is around 1/10 the speed of OpenGL (what RME uses). It works fine when your up close in a scene but absolutely falls apart when zoomed out. Since I am using C# with wpf for the application, I do not have access to DirectX nor OpenGl for render window. There are some plugins for them, but they fall apart at large render resolutions. This leaves me with image caching (render a section of the map, save it to an image, and display that image when asked to draw that section). Image caching can be done 2 ways. In ram, and on disc. I wrote implementations for both, the image caching in ram used an exceedingly large amount of ram (8+ gbs) due to the fact everything is stored in bitmaps, caching to disc I was able to save everything to png which is greatly compressed without losing quality.

Caching to disc:
Cons
  • while creating cache, slower than normal render so you see some slight freezes when you initially explore the map, the freezes are more apparent when zoomed out
  • uses a lot of disc memory (~1 gb per map)
Pros
  • since files are cached to disc they do not need to be recreated next launch of the app
  • Low ram usage (compared to ram caching)
  • amazing performance once cache is created
  • doesn't care how complex each section is once its been cached, therefore a full map with all details on at height = 0 performs flawlessly at max zoom (see image)

renderer2.png
Would locking the zoom level to a 'maximum' (once it starts getting blurry/indistuingishable) then converting to 'colors mode' be an option to pursue?
Or just lessen the colour palette the farther zoomed out you are?
When I zoom out that far it's only to quickly move around to another portion of the map. Not being able to see every detail and just the general area should be more then enough?
 
A smaller color pallete wouldn't help, switching to just 1 pixel blocks might help a little bit, but that's only for the extreme zoom case, it's the moderate zoom case when your looking at floor 0 that is the most intensive with the least amount of viable shortcuts.

Probably in 3 weeks il release a demo app to get feedback and put in multiple render options
 
Your work is amazing! Don't give up on this! A suggestion..Uhmm..Maybe add a little search bar for an item somewhere in the main window of the editor, I hate going ctrl + j for brushes or ctrl + i for jump item in remere's map editor!
 
Sounds good and I definitely am not giving up on it, I've just been sick the past week. Development on this will greatly increase in about a month and a half because I plan leaving my current job and moving, and il need some recent code samples to be able to link to on my resume.
 
Sounds good and I definitely am not giving up on it, I've just been sick the past week. Development on this will greatly increase in about a month and a half because I plan leaving my current job and moving, and il need some recent code samples to be able to link to on my resume.
Any way I could see how you used the function to render the map? I'm interested in this.
 
Back
Top