The Infinity Blade Forums Have Moved

We've launched brand new Infinity Blade forums with improved features and revamped layout. We've also included a complete archive of the previous posts. Come check out the new Infinity Blade forums.
See more
See less

Weekend Game

  • Filter
  • Time
  • Show
Clear All
new posts

  • #61
    Originally posted by spin View Post
    Just out of interest, are you running this on a controller or kb/mouse?

    It might share some stylistic and general gameplay mechanics with Geometry Wars, however as stated, so does asteroids and many other old school shooters, which was what GW was aiming at replicating. I personally think there is no problem whatsoever with carrying on that gameplay thread.

    From how this has evolved since your first efforts it's pretty clear to me that you have been building basics and then playing around to see what nice gameplay can come from that, I totally applaud your way of working and look forward to seeing this evolve.
    It's KB and Mouse. Converting over to a controller actually introduces issues with the movement physics in terms of the analogue sticks and I don't really want to tackle that until I have the game running fully with my preferred control scheme


    • #62
      schizoslayer, where did you get that nice grid texture? I cant find anything similar


      • #63
        Like most of the art I made it myself. Might I recommend you get yourself a copy of Gimp - knocking out a grid texture is super easy once you get used to the interface.


        • #64
          schizoslayer: I really like the retro art style! great work for a weekend game!


          • #65
            Last update for a while as I'll be without my own computer for a good 2 weeks.

            I stepped up the amount of work this week and did alot of behind the scenes refactoring which ultimately you won't be able to see in the videos but means that memory is fragmenting less (as well as generally using less) and performance is much better (Rarely dropping below 160fps these days).

            However things you will notice:

            New "Bumbler" enemy type that moves around the map with a pseudo random wandering motion. Combined with the homing "Grunts" this makes the arena more interesting as you can't herd or kite the Bumblers and being inherently unpredictable keeps you on your toes.

            The Arena is no longer made of BSP and is actually a single actor with about a dozen components. This has allowed me to make it much more reactive and it now changes colour over time, flashes each time you kill an enemy and I prototyped a "Ripple" effect in the grid that currently fires with each new wave but will later get tied into explosions.

            So then a video:


            The refactoring and optimizations I did for those that are interested (as you may encounter similar needs yourself):

            Actor Pools:

            Previously I was spawning and destroying actors every time I needed one. Each enemy and bullet was a new actor. Spawning and destroying as rapidly and frequently as I was (roughly 900 bullets would get created and destroyed in 60 seconds of play and 300 enemies) causes massive amounts of memory fragmentation which is basically bad.

            In addition to this Spawning an actor is relatively expensive so spawning alot of actors quickly is very expensive and can cause hitches in the framerate.

            To get around this I created an EnemyPool that manages the spawning of an Enemy in the arena. This consists of a dynamic array for each enemy class and some functions to spawn an enemy or add it to the pool. Each time I spawn an enemy we first check the pools length and if it is non-zero we pull out the first actor and initialise it to the correct place and state. If not we spawn a completely new actor instead. Every few seconds I clean out some actors from the pool if there are too many hanging around.

            I also implemented a similar system for Projectiles where the Weapon class manages a pool of projectiles it can spawn and when the weapon is created it actually prefills the weapon with some Projectiles up to a minimum amount.

            Simple Enemy Class:

            Older versions used Pawns and AIControllers to control the enemies. The actual number of actors required to get an enemy in game using this method was about 4 (Pawn, Controller, Inventory manager, Weapon). In addition controllers and Pawns have alot of code going on that; after investigation, I just had no need for given how very simple my enemies are.

            Result was creating an enemy actor class that encapsulated everything I needed with just 1 actor and 3 components and was powered by a very simple state machine. This also made the job of pooling enemies much easier than it would have been had I stuck with Pawns.


            • #66
              Looking good

              Do you have plans to make more varied levels? Liked the idea of water and different materials you were experimenting with in one of your earlier videos... maybe instead of a wave based level, you could give the player a starting point and a course to go through being chased and ambushed by enemies.


              • #67
                How many FPS did you improve by adding the new components?

                By the way, excellent work. You got a fan over here.


                • #68

                  LoL you play Star dust much lol


                  • #69
                    You need to make it so each wave is timed. It would make it more challenging, because even if one wave wasn't destroyed completely then it would still spawn the next one.


                    • #70
                      It's on the list. Thing is that the list has about 100+ things on it at the moment and I'm attacking it in a fairly haphazard fashion


                      • #71
                        Originally posted by Joseph Ferano View Post
                        How many FPS did you improve by adding the new components?

                        By the way, excellent work. You got a fan over here.
                        The problems I was encountering were only manifesting when the game started to get intense after a few minutes of consistent playing. Going from a standing framerate of about 200fps with no action to around 80fps at it's worst (which I realise is still far better than most console games but my goal is to keep the game as fast and lightweight as I can).

                        The actual script time I was getting from Stat Game was rarely ever over 1ms even at the most intense points so there wasn't much I could really do to improve my script code as it wasn't the bottleneck.

                        The problem was in the number of actors that were being ticked and the spawning times were going up as the game progressed.

                        By pooling actors I managed to remove 90% of my calls to Spawn and Destroy which meant that Garbage collection was faster (which is when the engine frees up the memory) because it had nothing to clean up, world tick got faster because it wasn't ticking actors that were waiting to be destroyed or garbage collected (and the more actors you have the longer it takes to tick all of them) and the memory footprint was reduced as I rarely ever had more than 500 actors at once (compared to several thousand previously).

                        Overall the framerate these days rarely drops below 180 for me except during really big spawns (120 enemies at once) where it will drop down to about 100 fps (but this is a limit resulting from the physics simulation and not much I can do about it).

                        Really Really big spawns of around 250 enemies drops me to about 60fps for the same reason. I wish there was a way I could improve this because I'd like to be able to go even higher than this eventually and it's important to me that everybody that can run Unreal 3 can play the game at 60fps.


                        • #72
                          8 years eh? you should really consider writing a tutorial!

                          (and yes, this is an attempt to steal you're knowledge)


                          • #73
                            what command did you use to apply impulses for a skeletal mesh because 'SkeletalMeshComponent.AddImpulse' isnt working for me


                            • #74
                              this is awesome stuff. ive been trying to get the locked 3rd person cam bit working but it wont work for some reason. how did you do it?


                              • #75
                                Thanks for sharing all your info. We were trying to get the camera to follow the ball, and we ended up with a strange situation where the camera was looking at the ball, but pivoting around it like a gimball. Tuck and roll, and much motion sickness

                                These latest updates are awesome!