PDA

View Full Version : Some Questions about the UDK



Eisregen
11-11-2010, 01:42 PM
Hey guys,

I know there are a lot of threads like "Question about UDK...", but I was thinking of a good title for about 5 minutes and didn't come to a better one.
First of all, two friends of mine and myself wanted to start some smaller project to learn about working together, using appropriate tools, time-managment in a group etc. We study cs and actually had a lesson about xna, directx and game development in general some time ago.
Now we have some ideas for a cool indie game and think this would be the perfect way to enhance our abilities :)
We thought a lot about the way we want to bring our ideas to life... but the most important question is the game engine. Our first thought was something like "lets code it with xna", but the amount of work needed to develop a game engine (and with only few experience) would totally exceed our resources. So we looked into unity3d and udk. We wrote down the things we need for our game in the first place, but also the nice-to-have things for later and estimated the practicability in both engines. After a lot of reading in the udk forums, we came to the conclusion, that udk would suit our needs best!
But there are still a few questions open, we couldn't figure out in the forums.
Probably i should describe our idea first... we want to make an online game, with a server hosting 4 houses, where the players can put stuff in it, like a chair or a box. (The limit of 64 players is not a problem, as we don't want to get the servers too crowded anyway). The player should be able to teleport himself to another house on the server. Also we want the world (house) to be gridded (correct term?), so that we have a grid going through the world which limits the placements of the objects. Which means, that the player should only be able to place one object in earch grid cell (this should be a 3d grid, so that objects could be placed on top of each other). I hope you get the idea... this is kinda the basic stuff we would need to get started.
But now.. to the questions :)

1.) We read about level streaming but also about loading the whole levels, but we couldn't figure out which way would be best for our idea with the teleporters in every house... any ideas?

2.) Would it be possible to make the whole house like a grid as described above? Or to use some kind of bounding boxes which dont affect the player?

3.) We also had an idea about grouping stuff together. Lets say, one player places a chair, another chair and a table next to each other... would it be possible for the player to mark these three objects one after another with his crosshair or the mouse and give them a groupname, to be stored internally in the db. So that another player can mouseover this group of three objects and see the name?

4.) And how about the switching of Servers? We saw a thread about a serverbrowser, which looked pretty good for our needs, but i couldn't yet try it out... So, would it be possible to have a player switch over to another server via an ingame menu?

I think thats it for now, hopefully it's not too much text or filled with too many errors :X! We really appreciate every answer :)
Thank you!

UnspoiledWalnut
11-11-2010, 01:53 PM
Level streaming loads levels around the current one (i.e. you get lag when you make the terrain too big. Level streaming loads levels in and out as needed or as instructed). As to what you're really asking, I have no idea.

You could, as to how I'm not sure. I think you could do it by telling it to 'jump' by whatever unit you want it to, although I don't really understand why you would do it like this.

I believe so, but again I don't know how you would do it. Look at some examples of RTS games or something. It wouldn't be much different than assigning units into squads which I've seen done.

No idea on that one. Haven't used it for online stuff much. I had a thought a while ago about this, mainly on the possibility of a kind of MMO in the UDK, in which the player would jump between game shards into an available one. But given that I have a lot of other projects to work on I'm not pursuing it with much haste.

Eisregen
11-11-2010, 02:17 PM
Thanks for your input :)
The idea of looking at some RTS examples is perfect for the grouping! I remember a rts I saw on the forums yesterday.. gonna check this.

To the grid and the placement... imagine a XYZ Matrix which has cells with a size of 10x10x10 (for example). And now we want to the player to be able to place only one (!) object in each cell.

So with level streaming it would be possible to have the server load level 1-4, and the player1 enters level 1 -> server streams level 1 to the player. Now the player decides to use the teleporter and go to level 3 -> server streams level 3 to the player. Would this be correct? And how about any players that are already in level 3? They won't be affected by the level change of player1, because the levels persist in the memory of the server, right?

Thanks again :)

UnspoiledWalnut
11-12-2010, 02:59 AM
I'm a little confused as to what you're trying to make exactly. Can you explain it with a little more detail?

Regardless of what it is, an MMO-styled game where there the player jumps between game shards ingame will be hard to do with UDK. There are a lot of engines that support that kind of thing (the only one that's free that comes to mind right now is Multiverse), but I don't think it's impossible. It will just take a lot of work to do (I don't mean to discourage you, and I'm getting out of the realm of what I know about with UDK so I'm guessing mostly). The way I thought about doing an MMO a while back was to basically, when the player tried to go into another area a request packet would be sent to the servers, and it would jump down the line to find a shard with a spot open and the player would use that one. But, that gets way too complicated for anyone I work with to want to deal with so if we ever get around to doing the MMO we're using something else.

Eisregen
11-12-2010, 03:28 AM
Hmm, how can I explain it a little bit better... probably the best way to compare would be some The Sims (without this character stuff, just the setup of the house)... you have a house and you can place furniture and stuff in it. The way we want it to make with the XYZ Matrix (respectivly the grid) is because.. image you want to lighten up you house with a light bulp. The room you want to hang it in is about 4m high, but you want to hang it, lets say in the middle of the height. Actually, with 1x1x1 cells, the player could now select a cable, and fill the first cell next to the ceiling, and then place the light bulb on cell under the first one. Got it? :) I know it's a bit weird to think about it, but we are sure it will bring a lot of fun :)
Well, actually I don't think it would be like an mmo. We want to have several servers, like it is done in e.g. UT3 but with a persistent game, without a mapchange. We also think that around 30-40 players will be way enough on one server :) I would really love some more input on the way level streaming works, and if it could be done like i wrote one post earlier!

UnspoiledWalnut
11-12-2010, 03:49 AM
I'm only comparing it to an MMO because I assumed that players would jump in between the 'worlds', rather than stay on one server, but if that isn't the case then there isn't much of an issue.

Level streaming basically works as it sounds. I'm guessing you know how streaming video and whatnot works online, right? It does essentially the same thing. It will load and unload levels as needed. For instance, I'm working on a large map (I think altogether it's something like 1280x1920 or something, or at least the map grid is). Obviously, that would be incredibly stupid for me to make using a single terrain - it's way too much to expect someone to have all loaded at once. So I'm using a series of 128x128 or 256x256 blocks of terrain, that are organized as I need them, set around each other like blocks. You'll tell the engine when to load those extra levels, be it by distance (i.e. loads the levels around you), or by a trigger (it loads when something happens). It loads what it's told to, so that you can have an illusion of larger levels.

Have you ever played Oblivion or Morrowind? You can run through the game without having to stop and load unless you go in between interior and exterior cells. Sometimes you'll get those little glitches when you're going fast and move between areas. Well it does the same thing, it loads the cells around you so that you don't have to stop and interrupt gameplay.

So yes, I believe you could do it as you wanted. I was thinking you wanted the player to move between game shards on the server, which is totally different, sorry. Depending on where the player is at, it might need to be loaded up when they teleport, but for the most part yes, you can.

Here's some reading material for you:

http://udn.epicgames.com/Three/LevelStreamingVolumes.html
http://udn.epicgames.com/Three/LevelStreamingHowTo.html

Eisregen
11-12-2010, 05:22 AM
Thanks for the reading material, I will read it over the weekend :)
Ah well... then i think we can realise the server switching of the players with udk... fine :) Also I think the way we thought about going into one of the other houses on the server would work with a trigger, like you said (the teleporter). Yes, I've played both games, and I'm getting the idea of how it will work, thanks :)
Actually I don't really know what you mean with game shards... something like zone 1 on server 1 and zone 2 on server 2?

UnspoiledWalnut
11-12-2010, 05:34 AM
Yeah basically. It's kind of a load-balancing decision, break the game up into 'shards' or 'zones' so that you don't overload the system. Or, in this case, I'm saying each shard would be one game instance, really, given that you can only have 64 players in any game instance.

Viciouss
11-13-2010, 10:24 AM
Hey there.

I am one of the guys who are working with the thread opener. The answers so far are quite interesting but I am still bothering with the grid system. Is there a way to get the position of the object or a reference to the object itself which is the first there is in your pointing direction, your crosshair or whatever there will be? And can you determine from which side you are pointing at it? So you can actually work with the object you are pointing at. This question is one of the more important to the game itself because we really need that to work. I think it should also be possible to just work with the coordinates although there are other problems emerging then.

Greetings

UnspoiledWalnut
11-13-2010, 06:11 PM
When you set up the movement you should be able to put in a detection for collision before moving.

Mordt
11-15-2010, 03:25 AM
I'm working on a large map (I think altogether it's something like 1280x1920 or something, or at least the map grid is). Obviously, that would be incredibly stupid for me to make using a single terrain - it's way too much to expect someone to have all loaded at once. So I'm using a series of 128x128 or 256x256 blocks of terrain, that are organized as I need them, set around each other like blocks. You'll tell the engine when to load those extra levels, be it by distance (i.e. loads the levels around you), or by a trigger (it loads when something happens). It loads what it's told to, so that you can have an illusion of larger levels.

Nice explanation unspolied. I was wondering how you handle differences in elevation between loaded levels of two maps.

Eisregen
11-18-2010, 07:43 AM
So, as a closing comment, I really want to thank you Walnut :)
Question 1 and 3 is answered, and we have a quite good idea for #2. We could normalize the location a object would be spawned by using "locationX - locationX mod gridsize" would give us the next value for the grid :)
Question 4 will be tested when we got something running.

UnspoiledWalnut
11-18-2010, 10:42 PM
No problem. For 2, I'm not sure of the codes for it (I have to look them up a lot), but something like that should work. Or like a snapping system at given intervals. I would say an isometric system but I don't know how one would go about that in the UDK.