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.

Texturing the ground: (In this case removing textures.):

Added a prefab (that pink thing) to the cell: (as well as some texturing to the alpha map).
This looks pretty cool.

So how does the texturing work? It looks like they're essentially painted on. I know this is just a little side-project, but are you planning on having any blending options or the ability to make the transition between two textures less jarring? Smile
the menus look amazing!
Finally, someone who knows how to do things in OpenGL with C++. (Disclaimer: I don't.)
I can do that a bit (although I know more Direct3D).
Thanks! The menus are actually a library called "dear imgui", iirc.

swivelgames wrote:
This looks pretty cool.

So how does the texturing work? It looks like they're essentially painted on. I know this is just a little side-project, but are you planning on having any blending options or the ability to make the transition between two textures less jarring? Smile

Texturing is done with an alphamaping fragment shader. There are 5 textures per chuck of ground. Ground texture #1 (for example grass), ground texture #2 (for example sand), ground texture #3, #4, and a 4-channal alphamap. The red component of the alphamap tells the shader how strong texture #1 should be at that point, green #2, and so on for blue and alpha channels. Thus if the alphamap color is for excample 0x80000080, the shader knows that that spot should be 50% texture #1 and 50% texture #4. Although I haven't worked on the project for a while now, I had added brush strength to the alphamap editor, so its now much easier to make the textures blend together Smile

Sidenote: the shader normalizes the alphamap color so 0x80000080 will be the same brightness as 0xFF0000FF.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement