• Advertisement
  • Popular Tags

  • Popular Now

  • Advertisement
  • Similar Content

    • By Tuner_z

      Name: One Level: Stickman Jailbreak
      Price: Free
      Developer: RTU Studio
      Platform: Android
      Language: C# (Unity3D)
      Google Play: https://play.google.com/store/apps/details?id=com.RTU.OneLevel
       
      Hello!
      I want to show you my game! "One level: Stickman Jailbreak" is a puzzle game with unusual gameplay where you must help the character to escape from prison. You just need to take the key and get out alive. The game has only one level, and there are many ways to complete it. Not everything is as simple as it might seem at first glance, so there are clues in the game.
       
      Short description:
      Nobody escapes from here!
       
      Description:
      Tommy got into trouble again! Our hero is behind bars. But he's not going to stay in jail for a long time and he decides to escape. Tommy steals a key and gets out of the jail cell. But our friend doesn't go free: Tommy suddenly finds himself in the same room from which he just escaped! The conditions for escaping change every time. In order to go free Tommy will have to solve logical puzzles and you can help him in this!
      At first it will be easy, but the tension will increase, and the tasks will become more complicated with each level. You should use your brain for all 100%, but if your skill is not enough, you can use a hint or ask for help from friends!
      You can solve the puzzles alone or with your friends and spend time well!
       
      Features: 
      Features:
      - 48 unique levels;
      - the game is translated into 10 languages: English, French, German, Spanish, Italian, Portuguese, Russian, Japanese, Chinese, Korean;
      - the function of "help from friend";
      - hints;
      - instructions.
       
      Trailer:
       
      Screenshots:





       
    • By Brandon Marx
      Hello forum,
      I have some decent amount of experience in Unity making games for Software Engineering projects in college, these were very specific projects however and I still am fairly new to building games. I wanted to make a game that uses the shadows of objects for collision detecting (i.e. shooting a gun at a characters shadow causes that character damage. What is the best engine to do this in (game will be 3D), and does anyone have any advice on how to approach this concept? I consider myself fairly experienced in programming, but game dev is just an entirely different beast.
    • By juicyz
      Hey all,
      I've been slowly working on my game called AotW for a while now.  I have come to the conclusions that it would be nice to cooperate with 1 or 2 others to help finish it.  Ive been trying to keep my GDD up to date with my ideas and development so that would give a better overview of the game when the time comes.  Currently I have a basic skeleton of the RPG elements needed but everything can still be discussed and talked about and we can transform my idea to something the group likes.
      The premise of the game is a Diablo-like procedurally generated map with RPG elements that include sockets, inventory, classes, abilities, crafting, loot, items, sockets, and enchanting.  This will be done in a 2D iso view as I can't do 3D art and I enjoy 2D games a lot.
       
      I don't plan on releasing this as this is more of a hobby project for me and I have a full-time job.  Though I'd like to start putting more hours into development and having others definitely will be motivation.  I also want to be able to say I have finally "finished" a game idea to some degree.  If the time comes and we want to release it, then we can go ahead and do so but that's not my purpose or plan. 
       
      Discord:
      Juicyz#3683
       
       
      Thanks,
      Juicyz
    • By Arnold // Golden Donkey Productions
      Hi, I've been working on this issue for a while and haven't yet found an answer.
      Does anyone know the best way to convert unity's LAT & LONG into a vector 3 position that I could use in a virtual world (if it's even possible). 
      Thankyou in advance
    • By wobbegong_
      I am taking an absolute beginner's game development course and we have just finished game jams in small groups. Our current assignment is to get feedback from people working in any aspect of game development. I would very much appreciate any feedback! The game is up on itchi.io (sound warning) https://wobbegong.itch.io/zombie-shooter It's essentially a very basic PvE.
      I also have some things I'm wondering about, but you don't necessarily have to answer these. 
      1. Do you have any tips on working with physics? My group wrestled a bit with Rigidbody physics not totally working the way we wanted to -- jumping ended up kind of floaty and inclines seem to mess up movement. Alternatively... how can I build terrains with depth that won't result in wonky physics?
      2. How can I keep up the level of challenge in an interesting way as the player progresses through the waves?
      3. What are some of your personal guidelines for creating title screens?
      Thank you very much in advance!
  • Advertisement
  • Advertisement
Sign in to follow this  

Unity Location tracking across scenes...

This topic is 749 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

So, I'm using Unity3D and I'm essentially making a Pokemon clone game... The problem I'm having is that I have "tall grass" that throws you into a different scene where I need to know what set of tall grass i've come from.

 

i could just create a script on each "tall grass" area or create have a reference list of boxes in the battle scene script... both of which seems to be a horrible amount of work to do and not all that efficient.

 

So is there any easy way to do this?

 

Also... similar question with cross scene alignment... where I have, say, a world map scene and a local town scene that i have to walk between... Obviously the 2 scenes will have different grid positions so if it's not just a doorway that there is only 1 space to enter from but a wide area to enter from is there an easy way to map that between the two so its more or less seemless?

Share this post


Link to post
Share on other sites
Advertisement

I am thinking in the direction of a world with scenes.

You have a world, and in that world are scenes, or rather, only the camera aimed at the scene.

 

A position in the scene can be translated to a position in that world, by using the camera position and orientation. The other way around works too, of course.

 

When you leave a scene, you translate the character position from the scene to that world, switch to a different scene, and compute the scene position of the characters from the world.

 

Not sure how well this would work though, if a scene is a line fragment, positioning would work, but maybe different scenes get in each others way??

 

 

 

Maybe "camera" should just be a simple translation/mapping function instead of a proper 3d camera with all its projection complications.

Share this post


Link to post
Share on other sites


I have "tall grass" that throws you into a different scene

 

you mean loads a different level? or moves the camera in the world to some new fixed 3pv  point?

 

from the point of view of a seamless 3d world, "different scene" doesn't make sense (at least to me) - i probably just use a different term.

 

 

 

.

Share this post


Link to post
Share on other sites

@Alberth. That's the question.... I have Scene 1 which is a town And Scene 2 which is going to be the "over world". The position used in Scene 1 and Scene 2 use different grids so if the player is at x:100, y:1, z:100 in Scene 1 and the door is say 3 meters big so they can transition anywhere from x:100, x101, or x102 then I have to have something that says that point is the same point on Scene2 which it could be at x540, y1, z634... I'm asking if there is an easy way to do this... I guess I could do global positioning but not sure how well that will work.

 

@Norman Barrows, It loads a different level... But either way it's a problem because even if I just moved the camera i still have the problem of telling the battle script where i was if I want to have different "tall grass" in a scene spawn different monsters.

 

Scenes are as best as I can figure a package all the models and scripts that are used for a "level" You generally don't want them getting too big from my understanding and I don't quite get the loading thing, but what I figure is that even though I could have the town in the same scene (as well as the battle stuff) it is best to make a different scene if just for organization purposes so that the editor doesn't have all the NPCs and such loaded up for each town and if I want a question in a given town i can just load that town rather than sifting through everything in 1 giant scene.

Share this post


Link to post
Share on other sites

@Alberth. That's the question.... I have Scene 1 which is a town And Scene 2 which is going to be the "over world". The position used in Scene 1 and Scene 2 use different grids so if the player is at x:100, y:1, z:100 in Scene 1 and the door is say 3 meters big so they can transition anywhere from x:100, x101, or x102 then I have to have something that says that point is the same point on Scene2 which it could be at x540, y1, z634... I'm asking if there is an easy way to do this... I guess I could do global positioning but not sure how well that will work.

In my world between scenes idea, you could define some coordinate range, for the transition area between Scene 1 and scene 2, let's say from 200 to 202. You would make a translation function from scene1 to the (transition) world, like "if x >= 100 and x <= 102 then return x + 100;".

 

 

In scene 2, you do the reverse. From the world transition areas related to scene2, you find the character you translated from scene1. You apply a reverse translation, like "if worldx >= 200 and worldx <= 202 then return vec3(worldx - 200 + 540, 1, 634);"

 

My code is horribly incomplete, but I hope you get the idea, you make 'transitions areas' between the scenes (a transition area is shared by 2 or more scenes) in a separate world (mostly just a separate coordinate system), and you translate the character coordinates from scene to world to the next scene.

 

EDIT:

Upon further thought there is no need to have a world filled with transition areas with different coordinates. You can make a new world for each transition area instead.

Edited by Alberth

Share this post


Link to post
Share on other sites

I once had that problem, too. I solved it the following way (described here using matrix transformations for column vectors):

 

An exit is a collision area with an own placement CX. It is linked to an entree which also has an own placement CE. When an actor enters the exit area, then the actor's global placement Ag is transformed into the exit's local coordinate system as

 

   AL := CX-1 * Ag

 

This placement, although being computed local to the exit, is directly re-interpreted as placement local to the entree, i.e.

 

   AL = CE-1 * Ag'

 

resulting in the placement behind the entree being

 

   Ag= CE * CX-1 * Ag

 

Here the placement C of an exit or entree could be modeled using translation, rotation, and scaling as usual

 

   C := T * R * S

 

so that different scales, orientations, and positions can be considered when desired.

Edited by haegarr

Share this post


Link to post
Share on other sites
Are you doing something that no game has done before?
If not, you should post an example of what you want from an existing game.


L. Spiro

Share this post


Link to post
Share on other sites


Scenes are as best as I can figure a package all the models and scripts that are used for a "level" You generally don't want them getting too big from my understanding and I don't quite get the loading thing, but what I figure is that even though I could have the town in the same scene (as well as the battle stuff) it is best to make a different scene if just for organization purposes so that the editor doesn't have all the NPCs and such loaded up for each town and if I want a question in a given town i can just load that town rather than sifting through everything in 1 giant scene.

 

 

EDIT:
Upon further thought there is no need to have a world filled with transition areas with different coordinates. You can make a new world for each transition area instead.

 

its my understanding that unity takes a "level based design" approach to things.  IE everything is a level (a scene)  a level has a map, actors, and scripts. every different location in the world should be a different level. not sure how they handle moving from one exit to the next. perhaps a simple lookup table: level[a].exit connects to level[c].exit[d].

so the world is not "seamless". you load levels every time your location / setting changes. if you have a bunch of towns, each should be a level. or perhaps more than 1 if they are big. i personally do huge open seamless game worlds, so i'm not sure how unity would handle outdoor scenes. levels would still have to be small(ish). and then you get the whole paging issue. apparently unreal has large seamless world support. without it, you'd have to roll your own, or settle for smaller outdoor areas and "Loading level..." messages.

Share this post


Link to post
Share on other sites

Well the general concensus is that if you're doing roughly the same thing you should keep it in the same scene... 

 

With the terrain... I'm running into a several problems... Some of it is because I'm deciding what I want between several different options... but seamless infinite terrain is possible, but you have to write your own script or buy one or find one so that the terrain loads chunks that spawn and despawn as needed. I don't quite get the coding to impliment this... or at least not sanely as I'd want to impliment something like 120km squared amount of terrain divided into 1 or 2km squared chunks and the only way I understand how to do  get all those chunks laid out and with the right height map is make it 1 terrain which doesn't help.

 

what I am currently doing is using a seperate scene for towns which I could do more or less seamlessly provided I can perfectly match the 2 scenes' coordinates so that I can translate between them and have any thing that would be showing between the scenes in the other.

 

The above is more of a secondary problem though as there are other options if I can't find and impliment the solutions I find... which I have found several, but haven't been in a mental state to be able to try to figure them out.

 

 

The main thing I'm concerned with is the "tall grass" thing...

When I load up the scene I pass to a "player state" script that my current map is whatever the name is... I also keep that "player state" updated with the player's coordinates on that map.

 

When the palyer enters a collider it sets off a number that equates to you will have an encounter in x steps and then when x steps happens, it sends the player to a different scene for battle.

 

Now Supposing I am on Map "DebugTown" and I have 2 "tall grass" areas that I want to spawn different sets of MOBs...

A simple, but very tedious and I'd guess bad way to do this would have a script attached to each of the tall grass colliders which specifies that specific location. to do this would mean creating possibly hundreds of scripts that equate to about 3 to 6 lines.

 

Another way is that I could when the player is passed to the battle scene the battle scene reads the current map and then scan through a bunch of hit box zones and if the Current position of the players is in a zone, select from the spawns... This seems like it would be stupid because it opens it up to the situation where the battle scene is called, but the mob is undefined.

 

Neither way I'm thinking seems like a good idea and If I get the seamless terrain working I'm going to run into this problem...

 

-----------------

 

Of course these wouldn't be as big of an issue if I could figure out how to impliment a battle system that is more action base... but the problem there is more of a map design issue. The MOBs I want to range in scale from 1 to 10 meters and the world map to be largely forest, however... the forest doesn't look right if trees are spread out far enough to allow movement for such large MOBs... and then again I'm not quite sure how a forest's tree density would be altered with such monsters running around.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement