Space Game Starter Kit [Released]

Discussion in 'Assets and Asset Store' started by ArenMook, Oct 11, 2011.

  1. ArenMook

    ArenMook

    Member

    Joined:
    Oct 20, 2010
    Messages:
    1,901
    Oh you mean the trail... Odd, I didn't change anything there.
  2. Thinker

    Thinker

    Member

    Joined:
    Oct 4, 2010
    Messages:
    408
    That maybe true but before this update everything was perfect and after, trails make the game flicker.
    As i said before its only a head start i am not sure about this theory.
  3. ArenMook

    ArenMook

    Member

    Joined:
    Oct 20, 2010
    Messages:
    1,901
    The update 1.8c is now up on the Asset Store. (Thinker: I wasn't able to reproduce your issue on any of the devices I tried :( )
  4. Thinker

    Thinker

    Member

    Joined:
    Oct 4, 2010
    Messages:
    408
    Don't be worried my friend as i said before its only a theory maybe its only on my PC.
    I will be glad to by this product you made but it would be nice if you would add a simple weapon what ever you want laser or some sort.
    Thats all that it needs really to be a basic Space game kit starter.
  5. ArenMook

    ArenMook

    Member

    Joined:
    Oct 20, 2010
    Messages:
    1,901
    You mean in addition to the heat-seeking missiles I added last weekend?
  6. Duskling

    Duskling

    New Member

    Joined:
    Mar 15, 2011
    Messages:
    1,197
    Very nice! Wish I had an idea for a project to use this for.
  7. Thinker

    Thinker

    Member

    Joined:
    Oct 4, 2010
    Messages:
    408
    Yes ArenMook i dont like that missiles fly random to target so such missiles are to chaotic to be used at all in real game,
    Developer will have to change them to first target target and than ask you if you want to shot.
    Or if you want my idea, one big missiles that explode at front of you in 20 small missiles that fly chaotic in search of heat, than it will be more useful. Well its only idea that will developer to but for now i ( and its only my opinion ) this missiles need a lot of work till will be used in game.
  8. ArenMook

    ArenMook

    Member

    Joined:
    Oct 20, 2010
    Messages:
    1,901
    Currently the reticle turns red on the target that the missile will lock on once you fire, so it tells you what it will chase after. It's not noticeable in single-player as there is pretty much only the space station for missiles to chase, but in multi-player it works quite well. :) A more finite way of destroying your opponent using laser does make sense though.

    Come to think of it, currently missiles update their target in Update() (Missile.cs line 44). You could make this value a member variable, and only set it if it's null -- and missiles will never abandon their target in search of a better one. This way once you fire, the missile will always stay locked on your initial target.
  9. Charbl

    Charbl

    New Member

    Joined:
    Sep 28, 2011
    Messages:
    17
    Any chance of including the option of a standalone server mode where the host doesnt have to play the game?
  10. ArenMook

    ArenMook

    Member

    Joined:
    Oct 20, 2010
    Messages:
    1,901
    Do you mean a dedicated server? I will take a look at what would be needed, but my initial gut reaction is that this might be a little out of the kit's scope.
  11. ForceVFX

    ForceVFX

    Member

    Joined:
    Jan 21, 2011
    Messages:
    131
    looks and plays great....
  12. ForceVFX

    ForceVFX

    Member

    Joined:
    Jan 21, 2011
    Messages:
    131
    bought the pack....Flies better than my converted Aircraft Kit...

    but, there are things I have to fix:

    1). You are using/overiding unity's editor [Tools] keyword,this is causing my 3D cloud package to fail.
    I will have to re-name one of the classes/methods..
    2). The missile are not originating from the vehicle, but from behind, off-screen.(and actually going through players ship) :-(
    3). The the xbox controller Y-axis Up/Down should also activate engines...easier to move and aim and fire
    4). The missile 'Heat' lock needs to be activated by the user, not just on all the time..
    5). Adding Switch weapons a). two front laser's b). missiles

    Just FYI..

    and if you need some free jet sounds..


    P-
    Last edited: Oct 25, 2011
  13. ArenMook

    ArenMook

    Member

    Joined:
    Oct 20, 2010
    Messages:
    1,901
    1. Tool keyword? What?

    Find all "Tool", Match case, Whole word, Subfolders, Find Results 1, "Entire Solution"
    Matching lines: 0 Matching files: 0 Total files searched: 139

    2. Missiles originate from "Missile Launcher" node on the player ship. It's 0.8 units in front of the center of the ship, so it's actually ahead, not behind. Perhaps you think it's behind because of the missile's jet trail?

    3. You can tweak that via the Edit -> Project Settings -> Input to make your game control how you prefer. One person's "perfect input" is another person's nightmare. :)

    4. It's on all the time for simplicity's sake. You can certainly change it to be activated while holding some key instead. MissileLauncher.cs line 57 is where the target gets updated.

    5. That would make sense if there was more than one weapon. :)
  14. ForceVFX

    ForceVFX

    Member

    Joined:
    Jan 21, 2011
    Messages:
    131
    the cloud sytem is also using the name Tools as a class definition.

    C:\UnityDev\SpaceShipStarter\Assets\SGST\Scripts\Common\Internal\Tools.cs - (5, 21) : static public class Tools

    To access what you are doing with the unity editor's [Tools]
    Note: This is an editor class. To use it you have to place your script in Assets/Editor inside your project folder. Editor classes are in the UnityEditor namespace so for C# scripts you need to add "using UnityEditor;" at the beginning of the script.

    please Refacator it.....You are using that reference 16 times in the project.

    yeah, it looks like you really should not use the word Tools.....
    and any asset store prefab that wants to access the unity editor Tools class and what the user is doing with what tool , is going to run into the same problem.

    How about 'netTools.cs'

    re..------------------------------------------------------------------------
    // ToolsSupport.cs: Unity transform tool manipulation.

    public static TransformTool Current {
    get {
    TransformTool l_Result = (TransformTool) Tools.current; return (l_Result);
    }
    set {
    Tools.current = (Tool) value;
    }
    }

    This script is failing because you created an Override of the Tools class, simple as that
    The value [Tools], looks to me like a Global Unity Editor Value.

    p-

    pm me,
    I would like a quote on some upgrades....
    Last edited: Oct 29, 2011
  15. ArenMook

    ArenMook

    Member

    Joined:
    Oct 20, 2010
    Messages:
    1,901
    Oh, you are using it with an existing project... gotcha. Yeah that might cause naming conflicts.

    The feedback is certainly appreciated, thanks. :)
  16. ForceVFX

    ForceVFX

    Member

    Joined:
    Jan 21, 2011
    Messages:
    131
    Fixed!!..using vsual studio, I re-named Tools.cs to netTools.cs and all references updated automaticlly.
    Now I have my fly through nebulas!!

    p-
  17. ForceVFX

    ForceVFX

    Member

    Joined:
    Jan 21, 2011
    Messages:
    131
    would you give me a breif explanation of the included scene.
    Two player ships..almost duplicate..but different set ups..

    am trying to wrap my head around it, some kinda network slave/master??

    p-
  18. ArenMook

    ArenMook

    Member

    Joined:
    Oct 20, 2010
    Messages:
    1,901
    I didn't know there was an Editor tools class, actually, thanks. Technically you could also solve this conflict by removing ambigious usages of Tools with a namespace clarifier: "UnityEditor.Tools" instead of "Tools" where it was used. I'll think about what I can rename it to...

    Two player ships? Do you mean "Player Ship" and "Spaceship"? They're both disabled. Former uses the old prefab (just boxes), latter uses the new modeled one. "Spawn Point" node is what you're looking for, and is what actually creates the player.

    P.S. The disabled objects under "_Testing Prefabs" are just for testing purposes to quickly update used prefabs. You can delete all of them from the scene without affecting anything.
  19. ArenMook

    ArenMook

    Member

    Joined:
    Oct 20, 2010
    Messages:
    1,901
    Version 1.9 has been submitted to the Asset Store. Web player link has been updated.

    - Added an Arcade Controller example in response to a feature request.
    - Fixed the issue with missiles not acting on their target for 1 second after creation.
    - Removed the work-around with missiles colliding with the ship that fired them and implemented it properly via Physics.IgnoreCollision.
    - Fixed missile trail not using the control script.
    - Added an option to missiles to only lock on one target.
    - Ship now controls with the left mouse button rather than the right.
    - 360 controller's "fire" button is now the left bumper.
    - 360 controller's Y axis (left thumbstick) will now control the Up/down maneuvering thrusters.

    Oh, and at one point I disabled the logic that added a delay between allowing to fire missiles... That was... well, interesting. That show kept going for about 10 minutes, changing shape gradually over time. Physics are fun!
  20. ArenMook

    ArenMook

    Member

    Joined:
    Oct 20, 2010
    Messages:
    1,901
    1.9b is now live.
  21. ArenMook

    ArenMook

    Member

    Joined:
    Oct 20, 2010
    Messages:
    1,901
    Well, this kit is proving to be fairly popular so far, but I can use some assistance on what to improve going forward. In particular I would really appreciate some feedback from those who picked up the kit, or those considering doing so:

    - What interests you in this kit?
    - What platform are you targeting?
    - What genre is your game going to be?
    - What features are important to you?
    - What would you like to see improved?
    - What would you like to see more of?

    And anything else you can think of. Thanks!

    P.S. Sneak peak of what I will be adding in a future update: procedurally generated galaxy map made up of a few thousand stars (think Mass Effect star map). :)
  22. Rajmahal

    Rajmahal

    Member

    Joined:
    Apr 20, 2011
    Messages:
    750
    I'll be doing a space shooter. I'd love to have lasers and a radar feature so you could see at a glance where other ships were in relation to your ship.
  23. ArenMook

    ArenMook

    Member

    Joined:
    Oct 20, 2010
    Messages:
    1,901
    Lasers like star wars, or a steady laser beam?
  24. psyclone

    psyclone

    New Member

    Joined:
    Nov 17, 2009
    Messages:
    245
    Would be great if that was a parameter :)
  25. ArenMook

    ArenMook

    Member

    Joined:
    Oct 20, 2010
    Messages:
    1,901
    Well, unfortunately the two are inherently different. Star wars style lasers are basically projectiles with colliders and rigidbodies on them traveling in a straight line. Steady laser beams are just raycasts + renderers.
  26. psyclone

    psyclone

    New Member

    Joined:
    Nov 17, 2009
    Messages:
    245
    Depending on how you implement them. Both could be ray cast, just a different visual effect

    Espically as Laser Beans are essentially instant :)
  27. ArenMook

    ArenMook

    Member

    Joined:
    Oct 20, 2010
    Messages:
    1,901
    Well, I'll start with the star wars style lasers.
  28. Rajmahal

    Rajmahal

    Member

    Joined:
    Apr 20, 2011
    Messages:
    750
    I'd probably prefer steady laser beams ... but I'm good either way.
  29. ArenMook

    ArenMook

    Member

    Joined:
    Oct 20, 2010
    Messages:
    1,901
    Well, star wars style "lasers" are in. I called them plasma beams though.

    Unfortunately in order for them to make sense I had to implement an entire combat system... which meant adding damage mechanics, RPC calls for damage to get it working via networking, as well as adding functional shields, power generator script to power those shields, force of impact RPC calls, the ability to destroy ships, etc...

    Working though. Still have to flesh out a few issues, but so far so good.

    The only questionable part is whether something so sophisticated makes sense in a starter kit... :p

    [​IMG]
  30. Rajmahal

    Rajmahal

    Member

    Joined:
    Apr 20, 2011
    Messages:
    750
    That's awesome .... more the merrier from my perspective. The screenshot looks great too.
  31. psyclone

    psyclone

    New Member

    Joined:
    Nov 17, 2009
    Messages:
    245
    As long as it not highly coupled, then examples of how to do these things is not out off place. It starts to become out of place, if the purchasing developers has to decouple all you code for it out of the existing, before they can roll there own...

    From what Ive seen from you previous scripting, this shouldn't be too much of an issue :)
    Last edited: Oct 31, 2011
  32. ArenMook

    ArenMook

    Member

    Joined:
    Oct 20, 2010
    Messages:
    1,901
    Well, I try to think compartmental in general when it comes to coding. Even right now I am removing the input logic from the missile launcher and ship classes and moving them into stand-alone classes so that the input can come from anywhere (such as AI). The way power generation works right now is like so:

    - PowerGenerator component, attached somewhere on the ship. Has properties for how much power it holds, how quickly the power regenerates, and how effective the power is given the current power percentage.
    - WeaponLauncher class has the PlasmaBeam prefab selected, that prefab has FiredObject script on it. FiredObject has such properties as "time to live", "firing frequency", "firing velocity", and energy cost (per fire).
    - WeaponLauncher tries to find the first available PowerGenerator if one hasn't been explicitly specified.
    - When firing, the WeaponLauncher drains X amount of power from the generator in question. If no generator has been found, it can't fire at all.
    - Shields work in a similar fashion -- shield finds the generator that is able to power it, and has properties such as "energy per damage" -- how much energy it takes to absorb 1 damage (for example 2 energy to absorb 1 point of damage). It also automatically registers itself as "damage protection" with the ship.
    - When the ship takes damage, it goes through all the damage protection components and keeps sending OnAbsorbDamage events until the returned value reaches 0 (all damage absorbed), or no more protection components have been left to absorb. At that point the damage is applied to the ship itself. When ship's health reaches 0, it explodes.

    Now of course all of the references are cached so they're only found once and are simply reused afterwards.

    This kind of compartmentalized system allows for neat things such as multiple power generators for example, with dedicated power generators serving specific needs -- one generator specifically for weapons, for example, and another one for shields (instead of sharing the same one). You -- the developer -- can then set up different ship configurations with their own strengths and weaknesses. With a little bit more work, the same functionality can be made available to the player as well, allowing them to build and configure their own custom ships.
  33. ArenMook

    ArenMook

    Member

    Joined:
    Oct 20, 2010
    Messages:
    1,901
    Unfortunately I didn't have enough time to polish everything adequately this weekend -- not surprising considering the amount of changes going in. I'll have to delay 1.10 a bit. Even controls had to change a little. :| Feedback would be most welcome (I'm likely going to be changing them to more FPS-style for the mouse based controls). You can play version 1.10 beta here.

    P.S. Careful trying multiplayer. You can die now... And deaths are permanent. <_<

    [​IMG]
  34. Luke.Houlihan

    Luke.Houlihan

    Member

    Joined:
    Jun 26, 2007
    Messages:
    193
    Very good looking kit. I especially like the realistic conservation of velocity, so many space games have an annoying 'no thrust no velocity' approach.
  35. Rajmahal

    Rajmahal

    Member

    Joined:
    Apr 20, 2011
    Messages:
    750
    Really nice ... I also like the constant velocity approach.

    In the latest control scheme, if you're moving say at 150 speed in a direction and you change direction by turning the mouse but don't apply thrusters, do you actually change direction or do you continue at the original speed and direction but with the ship facing a different direction?
  36. ArenMook

    ArenMook

    Member

    Joined:
    Oct 20, 2010
    Messages:
    1,901
    Thanks!

    @Rajmahal: You continue traveling in the same direction (momentum is maintained). I didn't change the physics, only the input scheme a little. It was very awkward having to hold the left mouse button to turn, right to shoot, and middle mouse button to toss rockets. LMB = primary, RMB = secondary feels a lot better, but I still don't like the turn mechanic personally. I'll keep at it...
  37. Rajmahal

    Rajmahal

    Member

    Joined:
    Apr 20, 2011
    Messages:
    750
    That's cool ... that's actually what I wanted. I think you and I are on the same page in terms of having realistic movement in an environment with no friction and air resistance. I also like the rotate with mouse movement option ... it's a lot better than the previous one where you held down the right mouse button.

    I started going through the code and you're clearly a far more capable and experienced programmer than I am ... I suspect I'll have lots of questions on it over the next few months as I finish my current project and then get into my space ship game.
  38. ArenMook

    ArenMook

    Member

    Joined:
    Oct 20, 2010
    Messages:
    1,901
    That just comes with the territory -- I've been working as a professional game developer for over 7 years, and have been working with Unity since version 2.1 (so for about 3.5 years). :) You will have questions, and I will have answers. Just ask.
    Last edited: Oct 31, 2011
  39. Rajmahal

    Rajmahal

    Member

    Joined:
    Apr 20, 2011
    Messages:
    750
    That's great ... this should be an excellent learning opportunity.

    Regarding the laser / proton weapons, do you plan to implement a targetting reticle so that it's easy to see exactly where the shots will go when fired?
  40. ArenMook

    ArenMook

    Member

    Joined:
    Oct 20, 2010
    Messages:
    1,901
    Yup. I removed the reticle as it made no sense for missiles, then wished I hadn't when I implemented the plasma beams. I'll add them back in later.
  41. ArenMook

    ArenMook

    Member

    Joined:
    Oct 20, 2010
    Messages:
    1,901
    I re-added the reticle (although a new one), fixed a bunch of issues and polished the beta build. All that's left is to polish the new mouse control scheme and I'll submit an update. Beta webplayer link has been updated.
  42. ArenMook

    ArenMook

    Member

    Joined:
    Oct 20, 2010
    Messages:
    1,901
    1.10 is now live on the asset store.
  43. Rajmahal

    Rajmahal

    Member

    Joined:
    Apr 20, 2011
    Messages:
    750
    Sweet ... this is looking great. I think I'll try to play around with this pack this weekend and perhaps try to create an AI-controlled enemy ship. Before I dive in, can you give some pointers on what would be the best way to approach it? In my current game, I have an "AI Behaviour" class that basically collects information about the surroundings and then based on that information takes one of a number of predefined actions. Those actions involve then initiating the same kind of actions that the player could theoretically do ... cast spell, use special ability, etc. My current game is a one-on-one wizard dueling game so is very different. However, do you think that would be the right way to go with this type of game or does that have pitfalls in it that'll cause me issues down the road?
  44. ArenMook

    ArenMook

    Member

    Joined:
    Oct 20, 2010
    Messages:
    1,901
    That should be pretty simple with how I've separated everything. The Missile class is your best starting point. It basically does very basic AI, controlling the Spaceship class's "input" values, as if the player was controlling it (and it's under 100 lines of code!). SpaceshipController is another example of how to control the Spaceship's input values (this one listens for user input). The two have one thing in common -- they both set Spaceship's turningInput and moveInput values based on some logic.
  45. Rajmahal

    Rajmahal

    Member

    Joined:
    Apr 20, 2011
    Messages:
    750
    Thanks ... you're lightning fast in your replies. I'll dig into it this weekend and keep that in mind. :)
  46. ArenMook

    ArenMook

    Member

    Joined:
    Oct 20, 2010
    Messages:
    1,901
    Instant email notifications can be useful. :)
  47. ArenMook

    ArenMook

    Member

    Joined:
    Oct 20, 2010
    Messages:
    1,901
    Thoughts on what else to add this weekend?
  48. Maurice Hoffman

    Maurice Hoffman

    New Member

    Joined:
    Jan 22, 2009
    Messages:
    164
    A score system, a radar and energy loss.
  49. ArenMook

    ArenMook

    Member

    Joined:
    Oct 20, 2010
    Messages:
    1,901
    Energy is already lost by firing plasma beams and getting hit. A UI component for it would certainly make sense though. Radar system -- yeah, might certainly be useful, the only trick is figuring out how to do a 3D radar in 2D.
  50. Rajmahal

    Rajmahal

    Member

    Joined:
    Apr 20, 2011
    Messages:
    750
    I was going to say radar as well.

    Just thinking out load (and admittedly I haven't delved into the code yet) ... but could a radar be done by plotting the x and y coordinates of all objects (ships, asteroids, etc.) in the scene, scaled by a common factor to shrink them down into the radar screen?