Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

ER 1.9.0 Upcoming


Mohenjo Daro
 Share

Recommended Posts

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](https://s26.postimg.cc/w7b43jsrt/Shadow_Rotation.gif)

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](https://s26.postimg.cc/lduvn40ux/Shadow_Rotation_5.gif)

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).
Link to comment
Share on other sites

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](https://s26.postimg.cc/lduvn40ux/Shadow_Rotation_5.gif)

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.
Link to comment
Share on other sites

@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.
Link to comment
Share on other sites

We were thinking of making attributes for these type of situations like a Water attribute where if you are on it, it should reflect your character on the water. Maybe another attribute which should be called "Alter Shadow" When placed you can select the options so, once you are on it, it should change the height/width and degrees of the shadow according to your tweaks. This should be useful in areas like the hills etc.
Link to comment
Share on other sites

  • 3 weeks later...
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.
Link to comment
Share on other sites

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).
Link to comment
Share on other sites

  • 1 month later...
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...

```
data
players
Test Account
Test Character 1
Bank
Pets
Inv
...
Cool Char
...
Mohenjo
Mohenjo Daro
...
Admin
...
```

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).
Link to comment
Share on other sites

@mohenjo-daro said in [ER 1\.9\.0 Upcoming](/post/701145):
> 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 :)))
Link to comment
Share on other sites

Looking forward to the release!
On a side note:
Finding this forum very hard to navigate/look at :P 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 .
Link to comment
Share on other sites

@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](https://www.eclipseorigins.com/category/143/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).
Link to comment
Share on other sites

  • 2 months later...
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](https://s26.postimg.cc/imjvx2ug9/Saving_and_Loading.png)

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..

***
***

**NOTE: ALL CODE USED WAS IN A TEST PROJECT**

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.

***
Link to comment
Share on other sites

  • 4 weeks later...
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.
Link to comment
Share on other sites

  • 1 month later...
I'm getting back into the groove. I'm slowly working my way through areas of code, bu I am making progress.

There are a few less behind the scenes things I'm working on that will be very useful for making a game:

***

**Resource Progression/Trees:**
- It will be possible to have a resource have multiple stages based on the tools you use on it.
- Eg.
--You can chop a tree down with an axe to get logs and be left with a stump.
--You can burn a tree down to get charcoal and be left with a burnt stump.
- Different stages can regenerate into separate stages.
- Eg.
-- A stump will grown into an injured tree.
-- A charred stump won't regenerate into anything, you have to remove the stump for something to grow.

***

**DoTs and HoTs:**
- There is no max number you can have applied (it is still limited by the server memory)
- Use separate classes from each other

***

**Buff/Debuff System:**
- It will be possible to have multiple (as many as the server has memory for) buffs and debuffs on an NPC or player
- These buffs/debuffs can affect things such as...
-- Vitals, vital regens, speed, attack speed, damage, EXP, AI, behavior
- The buff/debuff can multiply, divide, add, subtract, and set the value
-- Eg.
--- HP = HP * 2
--- HP = 1
--- HP = ((HP + 10) * 1.5) / 3
- The order of buff/debuff effects depends on the order they are applied in. The code just loops through the list and applies them in order of the collection. There will be an effect that adds the buff/debuff to the beginning of the collection.

***

This is a lot more in depth, but I do try to keep the [changelog](https://www.eclipseorigins.com/topic/86340/er-1-9-0-changelog) up to date as well, so feel free to check that out every so often as well. I don't usually go so in depth about changes, but I felt the need to since these will be very apparent to users and devs. (As a side note, I do plan to allow item enchantments that will be a mix of a buff system and spell system, so that should be cool as well).

Have a favorite change from these? Mine favorite is the resource tree, that will be a lot of fun to use.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...