ER 1.9.0 Upcoming

This will be a thread of mainly teasers and what’s going on with the ER 1.9.0 update.

Thanks to SolidLink for supplying a render code and idea, ER now has a shadow system using the sprite of the player/NPC. I supplied the code for positioning the shadow, so now it can look like this:
alt text

I made the shadow rotate to test the pivot code to make sure it pivoted around the bottom center of the sprite. I may add an option in the future to make the shadows pivot based on the time of day and grown and shrink as well. It will go well when I eventually add an easy to edit day/night overlay system.

I’ve also been designing how I want the folder layout in the server/data to look. I’ll be supporting categories and sub categories to make organizing items, NPCs, resources, etc. much easier.

I haven’t gotten to code any of these into the engine yet, I just made a data folder and have been manually adding folders to it to see what I like. It’s not much but it is a start and is showing me what I want to be able to do with the code.

Ok, the shadows are done. I don’t have the shadows moving in ER for now, but as the picture below shows, they can be set up to rotate easily.

alt text

The only thing being changed in that image is the rotation. Everything else is determined through the code and preset values (I’ll be making the values changeable outside of the source later as well).

very nice.

Heck yea! Keep it up mah man!

Updated the main post to have the new shadow image. The shadows don’t actually rotate in ER for now, this is just showing that you only have to change the rotation and nothing else to get the shadows to stretch nicely as if the light source is moving.

alt text

The rotation of the shadow is the only thing in the code that’s being changed. The height and width are figured out by using the rotation. This means I can make the game time be used to rotate the shadow in the future.

that would be annoying if the shadow moves so fast like that all the time even while you are being still, not realistic at all for a shadow to do that

@pinkangel They don’t move like that all the time, I only had them move like that for testing purposes.

This post is deleted!

ok cool then, it’s a great idea

pretty nice feature, I’m just wondering what would happen if you had a hill to the player’s right ? would the shadow be cropped accordingly or would it “glitch” into the hill floor ? And how about if the player is passing over a bridge ?

@slasheree currently it would just be drawn over and look weird. This isn’t a finished feature and still has work to be done, but it is a start. A simple workaround for those sorts of scenarios is to have the rotation closer to 0 degrees, and shrink the shadow a bit so it’s still visible.

This post is deleted!

Bit of an update to keep ya’ll in the loop.

I’m currently rewriting the code that loads all the data at start up. Currently, I’ve got the looping through the names of the files working.

For those that don’t know what I’m talking about, I’m changing ER from loading all files at startup and keeping them loaded in memory, to loaded them when they’re needed and unload them after. Expect this update to take awhile, it’s just a lot of work.

I won’t have much to post with this update since it’s just recoding the systems, there’s not much I can show.

A little update before I get off for the night.

I made some subs so that there’s a lot less repeated code. I now have finding all files and loading working properly.

    Call LoadFileList(Editor_Item, "\data\items\")
    Call LoadItem("item3", "zdefault")

The first call statement adds all files in the \data\items\ folder to the array of file names and categories (categories will be added for better sorting and ordering of files. Eg. a tree category in resources might look like \data\items\books\. This makes organizing everything a lot easier [even easier since files can have any name, now. Eg. \data\items\weapons\two handed\scythe.dat])

Keep in mind that none of the code I’ve done is set in stone, I might change things later so it uses less memory, is faster, etc.

For those that are curious about my current setup:

At the server startup, I’m looping through all files and adding the file name and sub folder path (what I call a category) into an list. This list is currently used when loading a file to make sure I load the correct file (you can have 2 of the same named files in different categories).

I also plan on using this list when sending the list of names and categories to the client (this way I don’t have to read through all the files each time I send the list. Just once at startup and tweaking it every now and again when files are added or removed). (If you care, I’m using a collection, not an actual list).

Been a bit since the last update… I’m basically just breaking everything so I have to fix it later XD

I’m currently working on saving/loading characters. I know a lot of people like multiple characters per account, so I’m currently setting it up so it’s a possibility later. I’m thinking about having a server value for the number of accounts players can have.

(You will get to choose if your game lets players have multiple accounts or not)

I’m just redoing how things are loaded and saved. The new folder structure will be something like…

        Test Account
            Test Character 1
            Cool Char
            Mohenjo Daro

Once that’s all setup, I’ll be fixing login (since I broke that [and everything else]), and get all that working.

Quick update: making a new account is saving the account (not char) details in it’s file. This includes the account username, password, and ID (it’s used when logging in so that each character doesn’t need to be loaded and unloaded).

@mohenjo-daro said in ER 1.9.0 Upcoming:

rewriting the code that loads all the data at start up <-- great works, also very nice idea to make shadow rotation, right now I putted a piece of code from Andur in order to make shadows also at resources and by the trick of putting house tiles and other buildings also in resources, it’s possible to create house shadows for example (connected to an item which is unfindible inside the game in order to not destroy buildings ecc…) Also very interesting the “saving/loading characters” as you wrote here :)))

Make the engine great again - Or something 😄 Can’t wait to play with it.
Good old times of Mirage Source will be back with ER, new and improved.

Looking forward to the release!
On a side note:
Finding this forum very hard to navigate/look at 😛 Any chance you could switch to something like phpbb/smf/invision/vbulletin? I think it would help attract people, this current setup made me want to run away lol let alone register .

@fallen I’m glad you’re excited.

Not my forum, I’m just an engine dev, you can post a thread in the forum suggestions area. Might want to explain what made it hard/what you thought was hard about navigating it. (Plenty of people say it’s hard to navigate, but no one likes saying what’s hard).

I have a bit of an update for ya’ll. I’ve been working on an generic saving and loading code. This code should be able to load any collection I give it, and load it as well. So instead of the map saving/loading being extremely long and needing the user to add any new data added to the rec, it will be automatically added, saved, and loaded.

I’ve been wanting to do this for awhile, but I kept seeing posts on forums saying it was impossible, and I didn’t have much reason to try it until this upcoming update. I was shown a post on the AGD forums asking about this very thing, and I decided I might as well give it another try.

Saving and Loading

The image above is showing the same data saved and loaded with the different methods.

The first method (the top data) is saved and loaded by the current method in Eclipse (each member of data is hard coded in the saving and loading subs).

The second method (the bottom data) is saved and loaded by being looped through and has each member automatically saved. The same code that saves Players will save maps, NPCs, resources, etc…


I’ll be showing the recs and data used in the code to show what the saving/loading code is able to do, but I won’t be showing off the code for it. That’s about 300 lines that I don’t fell like pasting here (and another 300 lines if I include some of the code for using class names).

Here’s the Player declaration:

Public Player As New clsPlayer

Notice that the Player is a class (the class just holds collections, so it can be considered a collection rather than a class, but both are objects and treated basically the same).

Here’s the Rec that the clsPlayer collection uses:

Public Type StatRec
    Name As String
    Value As Long
End Type

Public Type PlayerRec
    Name As String
    Vital(1 To Vitals.Vital_Count - 1) As Long
    Stats As clsStat
End Type

As shown, it uses a String (length isn’t defined), Array, Long, Class (this is another collection that doesn’t have a set number of UDTs ), and UDT.

And, as you can see in the above picture, the saving/loading has no issue with the strings or collections. The Name 4 data doesn’t have Mnd or Agi stats (I left those out to test the collection size), and the saving/loading had no issue with that.

I’m slowly converting the arrays on the server to use classes holding collections. I have switched from using actual collections to using dictionaries, this is because dictionaries (using numeric keys) are faster than collections, and they are easier to get the key of an item from.

I still don’t have an ETA on release, but I’m still working on 1.9 when I can. My goal is to release it before the end of Summer.

Log in to reply