Official Community Forums
 
HomeHome  FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  RegisterRegister  Log in  The Wiki  Website  github Project  

Share | 
 

 Placing objects (i.e. buildings) in-game

View previous topic View next topic Go down 
Go to page : Previous  1, 2, 3  Next
AuthorMessage
Delurin
Head of Platform Development


Posts : 424
Join date : 2011-08-03

PostSubject: Re: Placing objects (i.e. buildings) in-game   Mon 2 Apr - 6:24

You might need to remove QuestStatusChanged from the export. Also that should only be a warning and not an error. But you can remove the Integer result = and just use the WorldManagerClient.spawn(OID);
Back to top Go down
Tristan
Administrator
Administrator
avatar

Posts : 306
Join date : 2011-08-03
Location : Liverpool, UK

PostSubject: Re: Placing objects (i.e. buildings) in-game   Mon 2 Apr - 7:52

Well, I ended up just exporting the object placement .java file, and I added one of those suppress notice thingies on that warning I mentioned before.
I exported that one java file to it's own .jar, calling it mypack.jar alongside mars.jar and multiverse.jar.

I just fired up the client, and it loaded normally, letting me run around etc. However, the object creation didn't work, so clearly suppressing the warning wasn't good enough. There was also an 'unused' error for "import multiverse.server.engine.Namespace;" at the top, so I suppressed that as well.

I've gone back and deleted the Integer result = bit, and left the WorldManagerClient.spawn(OID); bit after. I'll give it a trial run later


Back to top Go down
http://www.3dmodeller.info
Delurin
Head of Platform Development


Posts : 424
Join date : 2011-08-03

PostSubject: Re: Placing objects (i.e. buildings) in-game   Mon 2 Apr - 8:01

If you are using a separate jar you will need to register that jar in multiverse.sh... I dont remember exactly what you have to do, it should be similar to however they registered mars.jar
Back to top Go down
Tristan
Administrator
Administrator
avatar

Posts : 306
Join date : 2011-08-03
Location : Liverpool, UK

PostSubject: Re: Placing objects (i.e. buildings) in-game   Fri 6 Apr - 0:52

It works (I think)! cheers cheers

It works by left-clicking the object in your inventory, then right clicking anywhere in the inventory box. The barrel object will then appear at your feet, and once you move out of the collision box, going back over it will cause you to walk on top of it. So the physics are being kept, which is good.

EDIT: for some reason, the collisions are no longer working - did the barrel even have collisions in the first place?

The interesting thing, is that if you have multiple barrel objects, you can place them pretty quickly with the same inventory object you left click on originally.
So, I left click on Barrel 1, and right click in the inventory box. One barrel is place at my feet.
However, the grabbed image icon of the barrel object is still attached to the mouse - right clicking again will take another barrel from the inventory, and placed it at your feet. This could be good for items that are needed in large quantities and close together, like farming soil patches.

Here's the result:



The barrel's icon is on the left hand side, in the inventory window. It's just one of the sampleworld Spell Books, I think. (Delurin set it, not me Rolling Eyes )
Back to top Go down
http://www.3dmodeller.info
zoot686
Foundation Donor
avatar

Posts : 78
Join date : 2012-02-15
Location : USA

PostSubject: Re: Placing objects (i.e. buildings) in-game   Fri 6 Apr - 10:01

Quote :
This could be good for items that are needed in large quantities and close together, like farming soil patches.

Or dropping rocks of a cliff onto somebodies head Laughing
Back to top Go down
Tristan
Administrator
Administrator
avatar

Posts : 306
Join date : 2011-08-03
Location : Liverpool, UK

PostSubject: Re: Placing objects (i.e. buildings) in-game   Fri 6 Apr - 22:05

zoot686 wrote:
Or dropping rocks of a cliff onto somebodies head Laughing

Now that would be awesome Twisted Evil
Back to top Go down
http://www.3dmodeller.info
zoot686
Foundation Donor
avatar

Posts : 78
Join date : 2012-02-15
Location : USA

PostSubject: Re: Placing objects (i.e. buildings) in-game   Sat 7 Apr - 7:40

Have you noticed whether you can put one brick barrel on top of another
Back to top Go down
Delurin
Head of Platform Development


Posts : 424
Join date : 2011-08-03

PostSubject: Re: Placing objects (i.e. buildings) in-game   Sat 7 Apr - 7:54

The code as it stands should not be able to tell where the other barrels is located. It only looks at where the cursor is relative to the terrain.
Back to top Go down
Tristan
Administrator
Administrator
avatar

Posts : 306
Join date : 2011-08-03
Location : Liverpool, UK

PostSubject: Re: Placing objects (i.e. buildings) in-game   Mon 9 Apr - 2:22

Delurin wrote:
It only looks at where the cursor is relative to the terrain.

Well, it doesn't even do that at the moment.

And no Zoot, although I was briefly able to stand on top of the barrel - I think it might have been on of those "Oh, you're stuck, let's move you out of the way" client actions that resulted in me being pushed above, when I initially dropped the barrel directly at my feet. I then walked off the barrel, back onto the ground, but couldn't get back up. I didn't think to check whether another barrel could be placed on top....

The barrel doesn't have any collision volumes (at least, I don't think it does), so that probably won't work. I'm sure it could be worked into the code, though I can't personally see the applications/uses of such a feature...


I've been trying to get back onto the world to continue testing with a new model with collision volumes. It's a freestanding solar panel from one of my other projects, that would have eventually been given an animation to follow 'the sun', had I not put the project on hold for a more achievable one (The Roman one - guns and such seem way too complicated to implemented, and there are some big projects coming up elsewhere that seem annoyingly similar in terms of content.)

However, my server startup keeps timing out (when using the start-multiverse.bat file). Not sure what's wrong with it... Will rummage around the old forum posts to see if I can resolve the issue.
Back to top Go down
http://www.3dmodeller.info
Delurin
Head of Platform Development


Posts : 424
Join date : 2011-08-03

PostSubject: Re: Placing objects (i.e. buildings) in-game   Mon 9 Apr - 10:36

Usually if it times out there is an error message in the server logs.
Back to top Go down
zoot686
Foundation Donor
avatar

Posts : 78
Join date : 2012-02-15
Location : USA

PostSubject: Re: Placing objects (i.e. buildings) in-game   Mon 9 Apr - 13:47

Quote :
The barrel doesn't have any collision volumes (at least, I don't think it does), so that probably won't work. I'm sure it could be worked into the code, though I can't personally see the applications/uses of such a feature...

If it didn't have a collision volume you'd be able to walk through that barrel, yet I think that the collision volume is a part of the modeling proccess......or at least it says so on the WIKI pretaining to modeling with 3ds

Barrels, bricks, logs, rocks.........what the difference?..........if they can be placed one on top of another, then one can build ones own house, a barn, a brick or log wall or fence.......or whatever else one might want to build.

Back to top Go down
Delurin
Head of Platform Development


Posts : 424
Join date : 2011-08-03

PostSubject: Re: Placing objects (i.e. buildings) in-game   Mon 9 Apr - 15:07

Yes you would need to create a physics model during the modelling process (generally a box) and name it mv_obb_submeshname_num like mv_obb_barrel_1 or if it is a cylinder you want you can just take a animated models .physics file and change the submesh name and filename to fit your model. I will look at the client code tomorrow to see why the placement is not working correctly. I wrote that tutorial without running the code at all so I would be surprised if there arent problems or things I forgot to add.
Back to top Go down
zoot686
Foundation Donor
avatar

Posts : 78
Join date : 2012-02-15
Location : USA

PostSubject: Re: Placing objects (i.e. buildings) in-game   Mon 9 Apr - 20:52

well at least tristan can place a barrel in the world, and that's more than he could do last week.

Back to top Go down
Tristan
Administrator
Administrator
avatar

Posts : 306
Join date : 2011-08-03
Location : Liverpool, UK

PostSubject: Re: Placing objects (i.e. buildings) in-game   Mon 9 Apr - 21:09

zoot686 wrote:

Barrels, bricks, logs, rocks.........what the difference?..........if they can be placed one on top of another, then one can build ones own house, a barn, a brick or log wall or fence.......or whatever else one might want to build.

I see a Minecraft remake coming pirat


Delurin wrote:

Yes you would need to create a physics model during the modelling process (generally a box) and name it mv_obb_submeshname_num like mv_obb_barrel_1 or if it is a cylinder you want you can just take a animated models .physics file and change the submesh name and filename to fit your model.

Indeed.


Delurin wrote:

Usually if it times out there is an error message in the server logs
I haven't had a chance to have a thorough debug, but I shall today, hopefully. Just so long as I get some of my dissertation proposal finished Sleep


zoot686 wrote:

well at least tristan can place a barrel in the world, and that's more than he could do last week.
afro
Back to top Go down
http://www.3dmodeller.info
Tristan
Administrator
Administrator
avatar

Posts : 306
Join date : 2011-08-03
Location : Liverpool, UK

PostSubject: Re: Placing objects (i.e. buildings) in-game   Mon 9 Apr - 21:49

This is what I hope to have, and is one of my inspirations for the building element of the game:

(A YouTube video should eventually load here!))


Just so you know what I'm aspiring to bounce


Last edited by Tristan on Tue 10 Apr - 3:33; edited 1 time in total
Back to top Go down
http://www.3dmodeller.info
AWM Mars
Well-Known Member
Well-Known Member
avatar

Posts : 78
Join date : 2012-02-23
Location : Wiltshire, United Kingdom

PostSubject: Re: Placing objects (i.e. buildings) in-game   Tue 10 Apr - 1:58

My vision begins at collaborative objects between platforms.

I have/had high hopes for the Collada format, but that has gone the same way most 'universal' formats have, in being turned into so many variants. The vision is/was to have any Object (3D mesh, 2D file/texture, Particle, Animation etc) being able to be loaded natively into any Immersive Environment (Virtual Reality) that allows it. Having of course passed any authentication/security processes first. Create a barrel (whatever) once, use it many times in multiple platforms, update it at the source and the update propagates automatically.

Metaforik is a remote object referencing, mainly dealing with Cloud Storage. Each item has tags assigned to it, stating the origins, copyright etc. The flags can also be set to say, exclude certain countries for rendering/usage etc, or be set to only be used at certain times of the day, or even the date/days themselves, and much more. The security of the system doesn't rely on anything clientside, as the client requests the item from the Metaforik database, for delivery. The whole scene is created by applying url Metaforik references to items to be rendered/used.

As the 'database' and included objects/items are all remote, any 'updates' are applied dynamically, then if the calls to the object are timed, via the network layers and or by off client calls by say javascript, a lot more applications are possible. We have seen much of this in the ilks of the (now defunct) Wonderland/Cobalt projects, where not just 'live' data is streamed, but live links can be formed within an environment, to other environments/content, on the fly.

The key, has to be the development of a stable collaborative format and delivery systems, along with 'injection' systems updating on the fly. I know it's possible, as I have seen/experienced parts of the overall system working in seperate platforms, never together as a whole, with the exception of the closest being Vast Park
Back to top Go down
zoot686
Foundation Donor
avatar

Posts : 78
Join date : 2012-02-15
Location : USA

PostSubject: Re: Placing objects (i.e. buildings) in-game   Tue 10 Apr - 8:15

Quote :
I see a Minecraft remake coming

No, not really...........instead think more about a player deciding that the edge of town might be a good place for a gambling hall...............so he builds one there and runs it.............or maybe that a flat piece of land might be a good place to start a settlement........

Back to top Go down
zoot686
Foundation Donor
avatar

Posts : 78
Join date : 2012-02-15
Location : USA

PostSubject: Re: Placing objects (i.e. buildings) in-game   Tue 10 Apr - 13:24

I guess what I'm trying to say is, make your world so your users can "make it" into their world, and you'll have a winner.......
Back to top Go down
AWM Mars
Well-Known Member
Well-Known Member
avatar

Posts : 78
Join date : 2012-02-23
Location : Wiltshire, United Kingdom

PostSubject: Re: Placing objects (i.e. buildings) in-game   Tue 10 Apr - 20:03

zoot686 wrote:
I guess what I'm trying to say is, make your world so your users can "make it" into their world, and you'll have a winner.......
Do you mean like Second Life?
Back to top Go down
zoot686
Foundation Donor
avatar

Posts : 78
Join date : 2012-02-15
Location : USA

PostSubject: Re: Placing objects (i.e. buildings) in-game   Tue 10 Apr - 20:22

I haven't played second life so I don't know.
Spose I should go check it out though.
Back to top Go down
AWM Mars
Well-Known Member
Well-Known Member
avatar

Posts : 78
Join date : 2012-02-23
Location : Wiltshire, United Kingdom

PostSubject: Re: Placing objects (i.e. buildings) in-game   Wed 11 Apr - 2:24

zoot686 wrote:
I haven't played second life so I don't know.
Spose I should go check it out though.

Second Life has been going for some years now, at least 9-10 to my knowledge. Users that have either permissions, or are in a sandbox 'sim', or rent the land from someone, including Linden Labs, who own the platform, can build using static meshes and mainly prims (primitives, cube, sphere etc), set up a shop, university, entertainment (including sexual services), pub etc. Lag the servers by uploading textures, media links, animations, sounds etc directly into the platform.

An open source version of Second Life, called OpenSim is available, whereby you can create/host your own sims. It is not overly complicated to setup and run. However most offerings are like the original, laggy as hell. Its allure is its versatility and scope of features. If you aren't really bothered about security of assets, it's probably worth deeper investigation, even installing and playing with.
Back to top Go down
Delurin
Head of Platform Development


Posts : 424
Join date : 2011-08-03

PostSubject: Re: Placing objects (i.e. buildings) in-game   Wed 11 Apr - 8:06

I updated the wiki to add the global variable heldObject = None to MarsCursor.py sorry I missed it.
Back to top Go down
Tristan
Administrator
Administrator
avatar

Posts : 306
Join date : 2011-08-03
Location : Liverpool, UK

PostSubject: Re: Placing objects (i.e. buildings) in-game   Wed 18 Apr - 4:48

Delurin wrote:
I updated the wiki to add the global variable heldObject = None to MarsCursor.py sorry I missed it.

Ok, thanks.


I'm currently working on adding different objects to the inventory.
To make things much easier, would it be possible to code a sort of command-line function where you could type (for example)

Code:
/additem "Barrel Object"

and it would add a Barrel Object to your inventory? Otherwise, when testing the object placement, I have to create a new character each time, so I get a full inventory of barrels to place. It would be a useful feature for development in general, I think.

Thoughts?
Back to top Go down
http://www.3dmodeller.info
Delurin
Head of Platform Development


Posts : 424
Join date : 2011-08-03

PostSubject: Re: Placing objects (i.e. buildings) in-game   Wed 18 Apr - 5:00

there should already be the command /createitem Barrel Object
If not I can post one
Back to top Go down
Tristan
Administrator
Administrator
avatar

Posts : 306
Join date : 2011-08-03
Location : Liverpool, UK

PostSubject: Re: Placing objects (i.e. buildings) in-game   Wed 18 Apr - 5:07

Delurin wrote:
there should already be the command /createitem Barrel Object
If not I can post one

ooooh!

To be fair, it does seem like an obvious function to have for developers. I haven't actually tried it, but I would be surprised if it wasn't already built in.

EDIT: I'll try it now, and let you know how it goes
Back to top Go down
http://www.3dmodeller.info
Sponsored content




PostSubject: Re: Placing objects (i.e. buildings) in-game   

Back to top Go down
 
Placing objects (i.e. buildings) in-game
View previous topic View next topic Back to top 
Page 2 of 3Go to page : Previous  1, 2, 3  Next
 Similar topics
-
» This game sure can be adamant about wanting players to take certain weapons
» The "Who would win?" game
» problem with the game : no control over the moves of the pc
» Luck O' the Bearish Instant Win Game
» Don’t forget about your FREE game card!

Permissions in this forum:You cannot reply to topics in this forum
 :: Development :: Client Scripting and Development-
Jump to: