Hopefully this is a simple question to answer. Is there any way to put a border around a map so a player cannot walk off of the edge of the map into the black void?
yes. thereâs lots of ways to achieve this depending on how your game is set up.
@icamefromspace I am using a height map to generate my terrain so in theory when the player or an enemy reaches the edge of the heightmap terrain they can go no further.
If this sort of setup is possible could you suggest a solution?
Test the playerâs location on each update, and if itâs too close to the edge of the terrain, bump the player back toward the center.
plane collison shape?
@Empire Phoenix said: plane collison shape?
If youâre already using Bullet physics then that would be the simplest solution. To spell it out for the OP: four rigid body controls, one for each edge of the terrain, each with a vertical plane collision shape.
@sgold I will try to use the PlaneCollisionShape although I am a little confused as to how to set it up in the way that I need. Is there any documentation on PlaneCollisionShapes?
Next time do a little bit of research instead of just asking, you will get worse/no answers if you do not put any effort into the question. It takes under 10 seconds to find this documentation if you just use common sense
More specifically to the plane collisionshape itself
https://www.google.co.uk/search?q=jmonkey+javadoc+planecollisionshape&ie=utf-8&oe=utf-8&rls=org.mozilla:en-US:official&client=firefox-a&channel=fflb&gws_rd=cr&ei=1TPLUsiMGMK2hQfQqoCoCA
EDIT: Sorry to be an asshole but it really is necessary
Dan: it wasnât necessary; it was your choice.
@sgold It is necessary in order to make the OP more independent over his own code, it is necessary in order to stop questions like âcan i do thisâ and âhow do I do thatâ when it takes seconds to find the documentation, a waste of everyoneâs time. As the old saying goes, give a man a fish and he will be fed for a day, teach a man to fish and he will be fed for a lifetime. So, yes, in my opinion it was necessary.
@javagame, there are ways to suggest searching the docs without sounding like an asshole.
The OPâs last question was addressed to me specifically, yet you chose to intervene, apparently to forestall further questions in the same vein. If replies like yours actually put an end to the posts which vex you, that would be something. But they donât. These forums have been running for years, and the questions keep coming, often from folks whoâve already been told once or twice to RTFM.
It seems to me that teaching someone to fish involves a lot more than just yelling directions to the nearest tackle shop. Teaching requires patience. It benefits from an attitude of curiosity about why another person is having difficulties. Itâs a weird thing ⌠concepts you regard as common sense may prove quite confusing for people who come from different backgrounds.
Nine months ago I was a JME3 newbie without the ability to post to the forums. I clearly remember how hard it was to solve problems by reading and googling the documentation. Thereâs a steep learning curve, and few (if any) who struggle with it are lazy in my view. Itâs fine if you donât want to âwaste timeâ on them. You can save even more time and effort by ignoring them.
@sgold of course I remember that too. I always asked common sense questions because I couldnât/didnât think to read the docs, but now I can and do go there first because normen and others were assholes to me, and that taught me not the go straight to the forums but read the docs instead. I did try to be nice as possible in my post and even apologized. It obviously took much more time for me to make those images, edit, upload and post them then it would have to just ignore or post documentation, so no I donâ't think itâs ânot worth my timeâ, I think it is a solution which, in the long run, will benefit OP more. I did try to get the balance right between asshole and helpful, and even apologized at the end. Sorry again.
@sgold said: @javagame, there *are* ways to suggest searching the docs without sounding like an asshole. Nine months ago I was a JME3 newbie without the ability to post to the forums. I clearly remember how hard it was to solve problems by reading and googling the documentation. There's a steep learning curve, and few (if any) who struggle with it are lazy in my view. It's fine if you don't want to "waste time" on them. You can save even more time and effort by ignoring them.
This is kind of randomly off topic but itâs interesting how this sort of thing ebbs and flows. Iâve kind of kept half an eye on your posts because theyâve become really helpful to the newly joining ânewbsâ. There always seems to be a point in oneâs journey where âenough is enoughâ and they also start ignoring the two sentence questions. Usually it starts by posting messages consisting just of one javadoc link (which I do all the time and people claim is rude). Iâm sure you will last longer than most.
A game engine attracts an interesting variety of people. Itâs different than something like Tomcat or JBoss. Most of the people posting to groups like that are already there because theyâve been doing Java and are now at a point where they need something. Itâs not like they just woke up one day thinking âI want to code something for jboss!!â
However, games are exactly like that. âI played this game and now I want to make one. What do you mean I have to learn to code first?!?â Few communities have as many people trying to go from 0 to infinity in such a short time. After a while, it wears on the people who stay a while and we may ignore 50 posts before finally responding to one⌠rudely, I guess.
And thatâs where the ebb and flow comes from. There seem to be periods of time where the former-newbs all get fed up in unison and stop filling the gap. Or just get busy with their projects (like the rest of us) and donât have as much time to read/respond. Usually you see this when you notice one or two âbumpâ posts over a period of days. (Lately itâs been pretty well trucking, though.) Those of us who still refresh the âlatest postsâ page 100 times a day then feel the need to step in and sometimes itâs not pretty.
I think if we didnât have an SDK it would be different. At least my experience in the libs without an easy pointy-clicky path to trouble seem to not attract so many ânew codersâ.
The advice to ignore posts is a good one in general, though. I wish I took it more.
Dan, I begin to understand where youâre coming from. Thanks for the reply.
btw theres been times where ive googled for stuff and i couldnt find any resources besides forum posts of people saying âgoogle itâ
the real waste is if the post doesnt contain an actual answer. thus creating a searchable forum thread with no information.
@icamefromspace said: btw theres been times where ive googled for stuff and i couldnt find any resources besides forum posts of people saying "google it" :Dthe real waste is if the post doesnt contain an actual answer. thus creating a searchable forum thread with no information.
It does help that at least the forum search is working again. It was hell while that was busted because it wasnât even reasonable to expect people to google it.
@icamefromspace said: btw theres been times where ive googled for stuff and i couldnt find any resources besides forum posts of people saying "google it" :Dthe real waste is if the post doesnt contain an actual answer. thus creating a searchable forum thread with no information.
Also, this being said, I have no special magic powers other than foreknowledge. Half the time I respond to someone, I did it after doing a quick google search for the answer. Usually, if I tell someone to search the forum then itâs because I just tried it and got a bunch of reasonable places to start in the first few pages.
Really, if someone is allergic to google then they might as well stop their game dev career right now and find a different hobby.
The best posts are the ones that show they genuinely tried to search. Sometimes itâs just a matter of having the proper keywords. If a poster doesnât provide anything about what theyâve tried already then I routinely try to answer in as few words as possible, assuming that they have put similar effort into it.