My first game (sortof) project

Hi everybody, I’ve recently started playing around with BGE (since the start of the holiday) after being inspired by some of the games made with blender by you guys:D.

First of all I think that I should point this out - I’m not claiming that this will be some major game, since most likely I’ll stuff up long before that time, so the main purpose of this for now is to learn how to make visually appealing game environment (relatively-see my signature :o) and then hopefully learn something about making this ‘thing’ into an actually playable game.

I’ve been trying to come up with a refreshing idea for the ‘game’ but I failed yet again miserably and ended up with a conclusion that the game will be set on mars base (surprise!) where the players ship conveniently crashes beforehand. Im not sure what will happen after that lol but we’ll see…

Anyway, this is what I’ve done so far (not much I know - again see my sig). I have no major problems for now, except for:

  1. Light goes through surfaces
  2. Objects disappear from view when too close and/or just on the side of the camera (even though I set the camera’s min distance to 0)

It’s not much of a ‘game’ - pretty much just a level so if you have limied internet allowance dont bother. :evilgrin:

More people will download your game if they could see what they are downloading. Post screenshots.

Nice start, looking good!

A few critiques-
-put a roof over that! Or at least the computers/equipment, even if the place is supposed to be roofless it’s a bad idea to leave more delicate stuff unprotected in real life, acknowledging this will add an extra level of believability to your game.
-textures on corners- in the top right-hand screenshot you can see where the wall texture wraps around the wall- I’d move that such that the corner lines up with a seam on the texture.
-Bake lighting- it will save you performance, and shadows will be baked in. Also, replace most of your spot lamps with point lamps for better light coverage (set a maximum distance to limit where the light gets to)

The pillars disappear because their centers are at the top- by the time you’re anywhere near them the center is so far off screen that the game assumes they’re not visible and culls them out. I recommend placing the center at head height or at ground level- the first one gives it the best chance of being in sight, the second one allows you to easier align the object with the floor.

[edit] I totally forgot to say it looks nice so far and to keep up the good work!

Thanks of the comments everyone, captain - the place will have a roof and I have some good ideas or it, its just making a roof at this stage will be difficult, since the level will be (hopefully) much bigger. The wall texture will be changed as to avoid the bending of textures on the corners, which I agree look pretty bad.

I originally wanted to bake lighting but I’m not sure how to do it anymore - I mean baking lighting for the base level (floor, walls, etc.) is straight forward enough, but there a lot of objects casting shadows on eachother and also the fact that when the player moves, his shadow will move with him, so for now that means that each single object will have its own material with pre-baked shadows. Every (nearly) object , even of the same type (eg. crate) will have to have different material, since each object according to its position on the level will have different objects casting shodes on it at different places, which will make it impossible to have just 1 or 2 different shadow textures.

I believe what most commercial games do (and blender is certainly capable of doing) is to give each static object a second set of UVs (name it “shadow” or something), and unwrap them all into the same texture space- then use one (decently high res) shadow map for all objects. This map can be referred to in any texture by setting the “UV” field in the Map Input pane. (if you turn off “clear” in the baking panel, it will not erase the rest of the map before baking)

In Blender, as only spot lamps can cast shadows and Buffer shadows are the only ones available, and there’s almost no optimization settings for shadows (levels of detail, turning off for distant lights, etc) it’s not really feasible to have very many shadow casting lamps.
You could, however, try making a simple script that sets a spotlight to the position of the nearest lamp, and tracks the spot to the player, so the player’s shadow will orient toward the nearest lamp (and with a bit of modification you could change the number of casting spots if you wanted the player to have a double shadow or whatever)

Thanks for the all that information - I will most likely do what you suggested, since its way better compared to what I have now. I haven’t made too much progress in the last week, since I had some major problems with my computer. I need some sort of space ship so Im working on that now, should post an update in a few days hopefully.

One question though: I’ve tried using materials with emit values turned up to simulate an object emitting light, but I could not use an emit texture to enable only PARTS of the object to look like that. I’m pretty sure that there is a way, but I just don’t know how to do that.

Any help appreciated!

here’s an example (Im trying to only have the yellow square emit light)

Attached the file


emitPrblm.blend (177 KB)

The hosting site you used won’t let me download (just upload the blend straight to blenderartists as an attachment)
but if you’re trying to do what I think you are (where an object casts light on other objects) you’re going to have to use radiosity, and bake it. here’s a bit of documentation on radiosity in general, baking it should be about the same as baking a lightmap (google is your friend in this case)

[edit] a simpler and faster method would be to fake it by putting a lamp with “sphere” enabled an low distance, inside the glowing object. I don’t know why I forgot to say that at first.

What I am trying to do is (for example) create a TV object, which is then UV unwrapped and an externally created set of textures are applied to it (colour, emit, normal), since I would like only the screen of the TV to look like it is emitting light, there are 2 ways (I think to achieve that) - 1) assign a new material to the screen plane, or 2) use EMIT map (which Im having problems with)

The thing is that it is simple enough to have just 1 square plane look like its emitting light (I dont really care if it is actually emitting anything, the surface just has to look like that), but if I have a switch board, which is a plane with many buttons drawn on it in different places, and I would like the wall to look like it is just a normal material, but the buttons (which are the same surface and material) need to be emit value attached to them.

I have previously done that very simply in Maya 8.5 by creating an emit(I think that’s what it is called) map - with white areas showing where the surface will look like it is giving off light, and the black areas will just look like a normal surface.

In the file attached (in the previous post) what I am trying to achieve is for the yellow square too look like its ‘glowing’ and the rest of the plane to just look like a normal material.

You can simply set a texture to ‘emit’ by checking the appropriate box (down and to the right from Col, which is the one that’s on by default)- you may have to turn on “no RGB”.

Alternatively, if this doesn’t work (I see no reason it shouldn’t, but whatever), you can make a small mesh (a plane with 1-3 tris should do) with a different texture set to emit, and put these where you want the buttons to be. This is kind of a hack, and not really recommended. Use the emit texture.

[edit] yeah, I tried it in your file, just hit emit, and No RGB, and it works like a charm. You might even be able to animate it via scrolling UV’s or even videotex (the latter probably hits performance a bit more) if you want the lights to blink or toggle.

Omg it was as simple as clicking the NO RGB button, thank you!!! That will save me so much time and effort lol and will olso look heaps better. THanks a lot

Animated textures is what i had in mind all way through ;).

Good looking graphics, but I would adjust the textures a bit. They should all be in powers of twos, because no matter what they are going to be loaded as such when the game starts. Also some textures are bigger than they need to be, especially the ground. For these I would have a large 1024x1024 texture to have the overall color and baked shadows, and then a tiled detailed texture(1024x1024 or 512x512) mixed in to make it look more detailed. This will make the scene load much faster if you can avoid these ridiculously large texture sizes.

This looks pretty good, but it loads way too slowly. Its so slow that when i launched the game it almost crashed blender.

Definitely try to reduce your texture size, and try to speed it up.

But other than that, it looks great!

I agree more textures would be nice.:yes: