[QUOTE=Fourier;46191069]Hello, I have a bit of a problem if anyone got anything similiar.
Well it goes like this. I have one scene (menu) where you can load levels. When I click on button, I call Application.LoadLevel("randomname"), but problem is that when this level is loaded, it says " coroutines could not be executed because object is not enabled."
Well the gameObject and script is enabled and you know, this bug happens only once I run the unity. Second time I make same test, it runs fine.
So I am really baffled, anyone kind enough has some ideas what do to/try?
Thanks.[/QUOTE]
What event (Awake, Start, etc) are you using to start the co-routine?
[QUOTE=KillaMaaki;46195553]Tried to throw in some bot AI to test against >.>
[vid]http://www.mophogames.com/Files/FPSKit7.webm[/vid][/QUOTE]
It's weird to see that order on the dead notifications
[QUOTE=gonzalolog;46196292]It's weird to see that order on the dead notifications[/QUOTE]
Huh, you're right. I thought that order made sense at the time, but I suppose it's backwards compared to most games eh?
Quick question, what is the general legality of third party assets in your game? Since these assets are made for developers and you're purchasing them for commercial rights in your title, would it be wrong to distribute them so players can create new environments/weapons/skins?
To include them in your game, is fine. But if you were to, say, include those models in a downloadable format that a player could use to create mods, is probably not fine.
[QUOTE=KillaMaaki;46196551]Huh, you're right. I thought that order made sense at the time, but I suppose it's backwards compared to most games eh?[/QUOTE]
Yeah, i'm really used to <player> killed with <weapon> <player2> (Mostly on source games)
A little test against some AI units. Similar to before, with some changes (refactored bot code, added 2 second spawn invulnerability, also fixed the stairstep error where footsteps played like crazy on stairs).
Didn't change the kill feed, the game mode class is responsible for kill strings so if you don't like it you can change it :P
Wrote a little bot "API", which gives you a simple interface for moving units around (SetLookTarget, ClearLookTarget, SetMoveTarget, ClearMoveTarget, SetIsFiring, SetIsSprinting, Jump, Reload, etc) and acts as a replacement for player input. Therefore, bots are not really any different from players.
[vid]http://www.mophogames.com/Files/FPSKit8.webm[/vid]
What's more efficient?
- Create a ISS like space station using one big .obj model
or
- Create ISS like space station using many different sections.
Depends on context :downs:
It's going to have a full interior and such.
[QUOTE=ryankingstone;46206089]It's going to have a full interior and such.[/QUOTE]
Then you'll probably want to divide it into smaller parts, so it can be culled.
[QUOTE=ryankingstone;46205926]What's more efficient?
- Create a ISS like space station using one big .obj model
or
- Create ISS like space station using many different sections.[/QUOTE]
Combined meshes have the advantage of lowering draw calls because this will allow you to use a single texture or less textures depending on how you have the textures setup and how you want to do it.
However having separate meshes means you can cull parts separately or use LOD groups to use a lower quality mesh when the camera is further from the object, as well as other obvious advantages of being able to do stuff to the parts independently.
You're probably asking for a pc game but I only really have experience with creating mobile games with Unity so I'll just give some tips on what I have done in the past with this sort of thing.
I develop mobiles games which means I have some pretty big limitations on the tri count and draw calls to be able support as many older devices as we can within reason, generally I aim to keep the draw calls below 100 and tris below 80k.
Recently I made a forest map which had about 300 trees, 50 bushes and 50 rocks and although I was using LOD groups for each model to keep the tri count low the draw calls were way too high to run smoothly on a mobile device (especially on the Samsung Galaxy Tab 2 which is one of our test devices which seems to hate high draw for some reason) so in the end I just grouped about 15 trees as a separate mesh, 10 bushes as a separate mesh and 10 rocks as a separate mesh each with 3 detail levels (which the final level was just 2Dish models with 4 faces) and setup the LOD groups to switch them between the meshes and cull them when really far away.
But yeah you're probably not developing a mobile game, but maybe this'll help someone :)
cross-post from Waywo; randomly generated space stations
[video=youtube;tNxO97twsno]http://www.youtube.com/watch?v=tNxO97twsno[/video]
Implemented a Team Deathmatch game mode. Two teams approach each other from opposite ends of the map and attempt to kill each other.
Made some slight modifications to the bot AI as well.
[vid]http://www.mophogames.com/Files/FPSKit9.webm[/vid]
Is there an object event system similar to how source works with inputs/outputs?
[QUOTE=KillaMaaki;46217607]Implemented a Team Deathmatch game mode. Two teams approach each other from opposite ends of the map and attempt to kill each other.
Made some slight modifications to the bot AI as well.
-video-[/QUOTE]
What FPS kit was that again?
[QUOTE=AtomiCal;46220635]Is there an object event system similar to how source works with inputs/outputs?[/QUOTE]
i THINK this looked a bit like it: [url]https://github.com/UnityPatterns/Signals[/url]
This is the cached page (site wouldn't load at the time of posting), i think the above repo is the same: [url]http://webcache.googleusercontent.com/search?q=cache:Fv8kZNoUWZAJ:unitypatterns.com/resource/signals/+&cd=1&hl=en&ct=clnk&gl=be[/url]
[QUOTE=Arxae;46220871]What FPS kit was that again?
i THINK this looked a bit like it: [url]https://github.com/UnityPatterns/Signals[/url]
This is the cached page (site wouldn't load at the time of posting), i think the above repo is the same: [url]http://webcache.googleusercontent.com/search?q=cache:Fv8kZNoUWZAJ:unitypatterns.com/resource/signals/+&cd=1&hl=en&ct=clnk&gl=be[/url][/QUOTE]
This is an even better solution, thanks :)
I'm starting to love C#
[QUOTE=Arxae;46220871]What FPS kit was that again?[/QUOTE]
My own custom kit I'm developing.
[QUOTE=KillaMaaki;46222420]My own custom kit I'm developing.[/QUOTE]
Ah i see. It's just that ive seen that map before on a kit.
EDIT: Aaand it was this one: [url]http://fpscontrol.com/[/url]
Side note, anyone knows if it's any good in comparison to UFPSC (or any other that's better :p)?
[QUOTE=Arxae;46223044]Ah i see. It's just that ive seen that map before on a kit.
EDIT: Aaand it was this one: [url]http://fpscontrol.com/[/url]
Side note, anyone knows if it's any good in comparison to UFPSC (or any other that's better :p)?[/QUOTE]
You are not wrong :)
I nabbed that other kit from the asset store and used some assets from it. I plan to replace some/all of them, but for now they're good for testing.
[QUOTE=KillaMaaki;46217607]Implemented a Team Deathmatch game mode. Two teams approach each other from opposite ends of the map and attempt to kill each other.
Made some slight modifications to the bot AI as well.
[vid]http://www.mophogames.com/Files/FPSKit9.webm[/vid][/QUOTE]
Your gun seems super inaccurate
[QUOTE=KillaMaaki;46222420]My own custom kit I'm developing.[/QUOTE]
Any updates/estimation on release?
[QUOTE=MadPro119;46224106]Your gun seems super inaccurate[/QUOTE]
Actually the gun itself has pinpoint accuracy ATM, but recoil is fairly high. Also, those impact effects all around where I'm shooting are from my allies, not me (there was a bug in that video I discovered later where some of the bots were invisible, which was also indirectly the cause of some performance issues).
[QUOTE=Velocet;46224171]Any updates/estimation on release?[/QUOTE]
Not yet, patience :)
Heya Facepunch.
Progress ! I managed to have a little time to continue my Minecraft-type of game, now, I rewrote the entire generation system so that it supports chunks, so the number of draw calls is greatly reduced, only my graphics card verts limit can stop me now technically. However, I also managed to add & remove voxels from the chunks, the thing is, that I am simply using ".Add" & ".Remove" to add & remove voxels (I'm using a Collections.Generic.List for each voxel & their position), and the deal is that it iterates through the entire list to add or remove my voxel, which creates a considerable lag spike since it needs to reconstruct the entire mesh.
Is there another way to reconstruct the mesh, but only the changed part ?
Found a major performance issue in my FPS kit, which seems to be caused entirely by audio.PlayOneShot.
As an example, on one particular frame, 5 calls to PlayOneShot collectively took nearly 30ms (this being on a 3.5GHZ six-core CPU, mind you)
Reported a bug to Unity with a repro project, hopefully this gets fixed because otherwise it's totally unacceptable.
EDIT: Holy shit, I fixed it. Setting my sounds to Decompress On Load instead of Compressed In Memory resolved the lag spikes.
EDIT 2: And since I spent all of yesterday debugging this issue, here's a video of the exact same thing as last time but with image effects because screw it.
[vid]http://www.mophogames.com/Files/FPSKit10.webm[/vid]
EDIT 3: And here's some actual progress, made a rudimentary main menu which allows you to either join a server, or host a dedicated server.
[vid]http://www.mophogames.com/Files/FPSKit11.mp4[/vid]
Read the Unity scripting documentation.
You access position via the transform. transform.position
You can also use a rigidbody for physics if you want to add velocity to an object without all the math.
You should follow some tutorials this is basic Unity stuff.
[url]https://unity3d.com/learn/tutorials/modules[/url]
The rigidbody physics are a difficult thing to deal with, I've managed to fix y-moving platforms by parenting the player to the platform, but it doesn't seem to work for sideways "x" moving platforms. Any ideas how I can fix this issue?
[unity]https://dl.dropboxusercontent.com/u/33714868/quebegame/quebegame.unity3d[/unity]
This probably won't work because I have no idea really and I'm just throwing it out there, but couldn't you match the x velocity to the x moving platforms using world space instead of local coordinates?
Also the movement in the game feels really nice, well done.
[QUOTE=PieClock;46260670]This probably won't work because I have no idea really and I'm just throwing it out there, but couldn't you match the x velocity to the x moving platforms using world space instead of local coordinates?
Also the movement in the game feels really nice, well done.[/QUOTE]
Thanks, the main issue with that is the platforms are being moved with a sin function, there's no rigidbody attached. I'll work things around and see what I can do with a kinematic platform
Sorry, you need to Log In to post a reply to this thread.