Mod/patch wip DIMENSION API

Post Reply
User avatar
InfinityProject
Member
Posts: 1009
Joined: Sat Mar 17, 2012 00:52
Location: World of Infinity, US

Mod/patch wip DIMENSION API

by InfinityProject » Post

Alright guys! Well I decided to learn c++. I have a skilled programmer teaching me how to code. But here's my first project!

Basically through a lua file, you can register your own dimension. The dimension files are coded in c++ and are accessed through lua. You will be able to define everything from the terrain to the portal that takes you there. Going through the portal takes you to a loading screen where you will then go to your dimension.

Progress:
2 terrains are coded, flat and mountainous.
The loading screen with the portals works.
You can define what blocks make up the terrain.

To do:
Add definable mobs
More terrains
Define sky texture in the dimension


This is going to take a lot of work and time but I will get it done!

User avatar
0gb.us
Member
Posts: 841
Joined: Sun Sep 16, 2012 01:55
Location: 0gb.us:30000
Contact:

by 0gb.us » Post

Does each dimension have its own SQLite file, or is it all packed into one?

User avatar
InfinityProject
Member
Posts: 1009
Joined: Sat Mar 17, 2012 00:52
Location: World of Infinity, US

by InfinityProject » Post

It's own.

User avatar
jojoa1997
Member
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Post

Cant wait. maybe it could be added to minetest engine. also i ambsuspicious of an april fools joke here.
Coding;
1X coding
3X debugging
12X tweaking to be just right

mauvebic
Member
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Post

InfinityProject wrote: Define sky texture in the dimension
Some insight on that: i think one of the earlier versions (<=0.3) had texturable skies, perhaps the source can be helpful, Would be cool to get that back :-)

User avatar
0gb.us
Member
Posts: 841
Joined: Sun Sep 16, 2012 01:55
Location: 0gb.us:30000
Contact:

by 0gb.us » Post

InfinityProject wrote:It's own.
That could be cool for a lot of things then. Assuming a computer with a lot of RAM, you could have a dimension for a world that emulates each version of Minetest, or a dimension for different styles of mapgen, such as a flat world, a cave world, a regular world, et cetera. Each should have its own map_meta.txt.

User avatar
InfinityProject
Member
Posts: 1009
Joined: Sat Mar 17, 2012 00:52
Location: World of Infinity, US

by InfinityProject » Post

So this started out as an Aprils fool joke... But looking over source code I think ill attempt it. I am learning c++ just slowly. I may start this next week. I really think this will be a cool thing to do. I will need help.

User avatar
jojoa1997
Member
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Post

jojoa1997 wrote:Cant wait. maybe it could be added to minetest engine. also i ambsuspicious of an april fools joke here.
I WAS RIGHT
Coding;
1X coding
3X debugging
12X tweaking to be just right

User avatar
InfinityProject
Member
Posts: 1009
Joined: Sat Mar 17, 2012 00:52
Location: World of Infinity, US

by InfinityProject » Post

Yes you were. April fools mauvebic and ogb.us! But this will be done slowly but surely.

User avatar
jojoa1997
Member
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Post

you will help me a lot with minitest end and nether
Coding;
1X coding
3X debugging
12X tweaking to be just right

User avatar
0gb.us
Member
Posts: 841
Joined: Sun Sep 16, 2012 01:55
Location: 0gb.us:30000
Contact:

by 0gb.us » Post

InfinityProject wrote:Yes you were. April fools mauvebic and ogb.us! But this will be done slowly but surely.
No worries. I was interested in a hypothetical way, but I don't think I have the resources to run multiple dimensions on my server.

prestidigitator
Member
Posts: 647
Joined: Thu Feb 21, 2013 23:54

by prestidigitator » Post

Hmm. Just a possibility to keep things relatively simple:
  1. Make a mod that saves and loads inventory to/from a world-neutral directory (which could be a network share, BTW).
  2. Run one server per world in the "dimension set".
  3. Add an API call that tells the client what server to switch to. For security (so the users always have an idea of where they are really connecting) you'd probably want to limit the list somehow, like only choosing servers on the same externally visible host name/address or on first connect having the client request from the server a list of "real" peer "dimension servers".
seems like that might allow the same kind of "immersion" without changing too much in terms of the game architecture.
Last edited by prestidigitator on Sat Apr 06, 2013 09:12, edited 1 time in total.

User avatar
0gb.us
Member
Posts: 841
Joined: Sun Sep 16, 2012 01:55
Location: 0gb.us:30000
Contact:

by 0gb.us » Post

prestidigitator wrote:Hmm. Just a possibility to keep things relatively simple:
  1. Make a mod that saves and loads inventory to/from a world-neutral directory (which could be a network share, BTW).
  2. Run one server per world in the "dimension set".
  3. Add an API call that tells the client what server to switch to. For security (so the users always have an idea of where they are really connecting) you'd probably want to limit the list somehow, like only choosing servers on the same externally visible host name/address or on first connect having the client request from the server a list of "real" peer "dimension servers".
seems like that might allow the same kind of "immersion" without changing too much in terms of the game architecture.
You'd think that saving the inventory externally when the player leaves and loading it when the player joins would be enough. However, a player could start up two instances of the client, and load the inventory in both dimensions, then put the same inventory into chests in both worlds, thus cloning the items. To prevent this (assuming we can't have the server instances share the inventory information directly), you'd need to also keep a list of logged in users outside the game that all worlds can check when a user logs in. If they are already logged in in another world, kick them from one of the two. You'd also need to find a way to keep auth.txt synchronized between all worlds.

There are probably other difficulties we'd need to deal with, but those are the things that come to mind.

User avatar
Likwid H-Craft
Member
Posts: 1113
Joined: Sun Jan 06, 2013 14:20
Location: Lost in Crypt

by Likwid H-Craft » Post

Can you make a moon as a DIMENSION?
My Domain's/others:
http://likwidtest.hj.cx/ (Not Done)

User avatar
Calinou
Moderator
Posts: 3169
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

by Calinou » Post

Likwid H-Craft wrote:Can you make a moon as a DIMENSION?
Can't you read? This is an april fool.

prestidigitator
Member
Posts: 647
Joined: Thu Feb 21, 2013 23:54

by prestidigitator » Post

0gb.us wrote:You'd think that saving the inventory externally when the player leaves and loading it when the player joins would be enough. However, a player could start up two instances of the client... There are probably other difficulties we'd need to deal with, but those are the things that come to mind.
If you're that worried about cheating, sure. If you just want to create the illusion of being able to hop between worlds/dimensions, it seems like a nice jumping off point. An intermediate measure might be to empty the player's inventory as you save it to the file, and use an OS-level file lock to make sure only one server saves to the file at one time. Relatively foolproof, but probably not hack-proof.

mauvebic
Member
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Post

InfinityProject wrote:Yes you were. April fools mauvebic and ogb.us! But this will be done slowly but surely.
Honestly, I didn't think a novice could accomplish *all* that, but i didn't want to discourage anybody :P I still think textured skies aren't a bad idea :P

Post Reply

Who is online

Users browsing this forum: No registered users and 31 guests