CodeWalrus

Development => PC, Mac & Vintage Computers => Topic started by: c4ooo on July 19, 2017, 09:44:41 PM

Title: Open World Engine for RPGs (OWERPG?)
Post by: c4ooo on July 19, 2017, 09:44:41 PM
I got bored so i started programming an engine for open world RPGs. (In c++ with openGL 2). The world is split into "cells"/"chunks" which are loaded/removed as you move around. Alpha-mapping is used to shade different ground textures onto the ground mesh. (the ground is a mesh, not a hightmap, to allow for more freedom.) I am also programming some sort of "construction set", which currently allows you to edit some values of the cell, adding/removing/manipulating prefabricated objects in the cell, and a utility to paint textures onto the ground.

Prefabs will range from things like rocks on the ground, to entire dungeons.

Progress:
Terrain rendering / resource management- mostly done.
Prefab rendering/manipulation - started
loading .ini files - need to start
construction set - lots of tedious work needs to still be done, but its not necessarily hard;
proper saveing/loading of cell data.
Resource manager for materials/textures/prefabs - started;
lighting - light is magical right?
physics - some progress, mostly on hold for now.

things that need to be done in feature that i haven't thought about yet:
Entity system.
Actual RPG elements like questing, etc.
Event Scripts.
Mesh editor (?!)

Pictures:

This is how the construction set looks so far: The ground repeats like that becomes i am too lazy to make proper terrain, so i just made it repeat.
(http://i.imgur.com/fblva5v.png)
Texturing the ground: (In this case removing textures.):
(http://i.imgur.com/H2PDow1.png)
Added a prefab (that pink thing) to the cell: (as well as some texturing to the alpha map).
(http://i.imgur.com/Ohfj8Ys.png)
Title: Re: Open World Engine for RPGs (OWERPG?)
Post by: Yuki on July 20, 2017, 02:35:00 AM
Ooh, looks pretty nice. Gotta check this out.
Title: Re: Open World Engine for RPGs (OWERPG?)
Post by: c4ooo on July 21, 2017, 03:40:17 AM
Quote from: Juju on July 20, 2017, 02:35:00 AM
Ooh, looks pretty nice. Gotta check this out.
Thanks!

I have been working on proper saveing/loading, and it works OK, except for this one bug.

A whole 'nother problem i have been having though is that even though loading from disk->ram is done in a separate thread, and thus has no effect on performance, loading ram->vram must be done on the main thread, becouse openGL is not thread safe. This causes the FPS to hiccup when new chunck need to be loaded. (I make sure to only load one new chunk into vram per frame, so its not one long frame, but rather several *longer* frames in a row. I dont know if i will have to mask the hiccups by having a few frames between each ram->vram transfer, or if some actual multi-threaded solution can be found.
Title: Re: Open World Engine for RPGs (OWERPG?)
Post by: c4ooo on July 26, 2017, 01:27:24 AM
Started working on some basic lighting:
(http://i.imgur.com/4IxBJtM.png)
Title: Re: Open World Engine for RPGs (OWERPG?)
Post by: Dream of Omnimaga on July 27, 2017, 04:02:58 AM
Interesting. I hope this comes to fruition, after all that work you did in learning 3D in the last year or so (remembering past WIRC discussions). What grapgical style do you plan to go with? Semi realistic? Celshaded? Etc