Jump to content
  • Advertisement

HunterGaming

Member
  • Content Count

    52
  • Joined

  • Last visited

  • Days Won

    1

HunterGaming last won the day on May 14

HunterGaming had the most liked content!

Community Reputation

152 Neutral

2 Followers

About HunterGaming

  • Rank
    Member

Personal Information

  • Role
    Programmer
  • Interests
    Design
    Programming

Social

  • Twitter
    @HunterGamingInd

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. HunterGaming

    Unreal Engine 4: Level Streaming Demystified

    Little update I just found out. It wasn't spawning the player because I didn't set the game mode overrides for the persistent level. However the player character still doesn't seem to be placed at the player start. I still have to move it to there.
  2. HunterGaming

    Unreal Engine 4: Level Streaming Demystified

    So I have finally got some level streaming to work in the project I'm working on. The next blog might be progress on it. But for now I want to explain quickly how level streaming is designed to work and how to get it to work for streaming just a single level. I have a small level that is too small to be broken into smaller pieces but large enough to take few seconds to load it. Like a lot of things the official docs are good but doesn't help for situations like mine. Level streaming is normally used to load and unload one level into another level. Making it easy to have large levels broken into pieces. You have just a small, whats referred to as a persistent level, to start and load other levels into and out of your persistent level as needed. So you set up a trigger so when the player walks through another part of the level is loaded. Is it a process that can be seen so you must take care to make sure the player can't see that level until its completely loaded. You have the option to load the level asynchronously or not by checking Should Block on Load. In order to set up level streaming you must add the level you want to stream to a list of levels. The level that is currently open at this point will automatically be chosen as the persistent level. The level that is currently loaded will automatically be selected as the persistent level. Once there you can click the Levels drop down menu to either create a new level, or load an already existing level, to add to the list. Levels added here will be the sub levels you want to load. For me right now its just one level called Downtown_L. Now there is a lot of good tutorials and documentation available on the internet but they all explain it from a standpoint of having large levels broken into small levels and loading/unloading as needed. There is not much out there explaining from the standpoint of a single level that is too large to just load using OpenLevel because it takes too mush time to load and blocks the main thread until its done loading. Which I think is where a lot of one-man-band indie developers are coming from as being the only person working on a game limits,somewhat how large levels can be. Unless your willing to spend large amounts of time on it. So how do you go about using this technology to load smaller single levels? Well what I did was create a completely empty level to use as the persistent level. So it loads super quickly. In begin play of that persistent level I show a loading screen. I should be able to eventually make the loading screen animated as level loading shouldn't be a blocking task now. After the loading screen is shown I immediately call LoadStreamLevel to load my single level into the empty level. Now it work. The empty level is loaded super quickly and shows the loading screen. Which currently is just text that says loading. But it stays there as the level is loaded and is removed once the level is finished loading. As its not blocking and I don't yet have a loading screen that blocks the whole screen, I can see the level being put together. It's kinda cool. I will be updating my loading screen next to make sure it blocks the whole screen and looks pretty to the player. Here is my begin play from the persistent level's level blueprint.
  3. I have been working on a new game. This one I'm going to be using mostly C++ in this one. I try to add something in each new game I work on that I haven't done before. This time its changing the input bindings at runtime. A lot of searching turn up a lot of old and not very useful information. So I figured I would provide a working way to do this without having to spend hours trying to find good and current information. So here it goes. First the main class used for altering input bindings is UInputSettings. The key functions being RemoveAxisMapping, AddAxisMapping, RemoveActionMapping, AddActionMapping and SaveKeyMappings. We can create an instance of the class like this UInputSettings *Settings = const_cast<UInputSettings*>(GetDefault<UInputSettings>()); Then its easy to add or remove axis and action mappings. Settings->RemoveAxisMapping(FInputAxisKeyMapping(AxsName, FKey(*OldKey))); Settings->AddAxisMapping(FInputAxisKeyMapping(AxsName, FKey(*NewKey))); Settings->RemoveActionMapping(FInputAxisKeyMapping(AxsName, FKey(*OldKey))); Settings->AddActionMapping(FInputAxisKeyMapping(AxsName, FKey(*NewKey))); And when you're done just save the changes Settings->SaveKeyMappings(); Here is a function I am using to update an action mapping. You must remove the current mapping or both will exist. If the current key to jump is space and you change it to J, if you don't remove space the player can then hit either space or J to jump. void USurvivalGameInstance::UpdateActionMapping(FName ActName, FString OldKey, FString NewKey) { UInputSettings *Settings = const_cast<UInputSettings*>(GetDefault<UInputSettings>()); if (!Settings) { return; } Settings->RemoveActionMapping(FInputActionKeyMapping(ActName, FKey(*OldKey))); Settings->AddActionMapping(FInputActionKeyMapping(ActName, FKey(*NewKey))); Settings->SaveKeyMappings(); }
  4. HunterGaming

    Dev Blog - Space Defender HD: Turrets

    So I'm now finished with a basic firing mechanism for the turrets. They target, shoot at and kill the enemy ships now and add money for each kill. I ran into an issue with aiming the turrets at he enemies. The turrets wouldn't turn correctly and and there were a few issues with the aiming that I had to work out. I have a collision sphere around each turret that detects when an enemy enters and leaves its radius. I keep a list of the enemies that is within each turrets power radius and so far have one algorithm for finding the enemy in the list that is closest to the base. I will be adding 2 more algorithms one for strongest enemy and one for weakest so the player will eventually be able to choose between the two. I ran into a an annoying bug that took a while to get it working right, turrets would turn too slow and not get all the way to the targeted enemy but here is what I ended up with that finally seems to work good. After the rotation I do a quick line trace to determine if there is an enemy ship in front of the turret. This was probably the hardest to figure out and get it working correctly. All that is left is to pause turrets when the game is paused, subtracting health when the players base is hit and adding 20 rounds. Then work out all the kinks to get it all working together smoothly and make it fun and tricky. Then I should be about ready for a 1 level demo. http://www.hunter-gaming.com/ https://www.facebook.com/indiehuntergaming/ https://twitter.com/HunterGamingInd
  5. HunterGaming

    Dev Blog - Space Defender HD: Enemy Spawning

    Thanks. I was able to find some good HD assets to use. I've spent more on the UI for this game than my first 2 combined. I can't wait to have a playable demo for people to try it out.
  6. HunterGaming

    Dev Blog - Space Defender HD: Enemy Spawning

    Another milestone is complete. Basic enemy spawning is finished. When the game loads the player will have unlimited time to set up turrets (still a little work to do here) and can then hit the play button to start the game. After that the player can pause and resume or restart the game. This functionality is done and so far I have the game choosing between 2 enemy ships randomly to spawn them. The basic run down of how the game will work is enemy ships can come from anywhere along the edge of the screen. Which screens will depend on the level but will always come from at least 2 edges. The enemies will move towards the players base and once close enough will shoot at the players base damaging it. I have both the movement and firing at the players base completed. Most of the work is done in a base class so its easy to add a new enemy. This is a screenshot of actual game play. I am getting closer to having a playable demo ready. Below is the main part of the spawn controller I created to manage all the aspects of spawning. It allows me to easily start, pause, resume, and restart spawning capabilities when the game starts or when the player pauses and resumes or restarts the game. At the bottom left is Choose Random Available Enemy which will allow me to choose enemies that have been unlocked. Now that I have this complete my next step is to get the turrets working. The player can already drag and drop them into the level so I just need to implement their functionality. Once this is done I should be able to have a playable demo ready. I'm sure there will be a few bugs that will need to be flushed out as I go but things are going good. http://www.hunter-gaming.com/ https://www.facebook.com/indiehuntergaming/ https://twitter.com/HunterGamingInd
  7. HunterGaming

    Dev Blog - Space Defender: Unreal Engine 4 Drag and Drop

    Of course I figured this may be helpful for a lot of people so I thought I would share.
  8. So I have finished the basic drag and drop to place various turrets in a level. This was easier than I thought it was going to be. But I'll give a rundown of what I did and how its set up. All I have to do is make it prettier. I'm going to make the default color very transparent and have some sort of color or material to make it look good. Then when the player drags a turret over a spot that can have a turret I will change the coloring and/or alpha to highlight which spot the turret will be at. The basic overview of UE4's drag and drop functionality is to override the OnMouseDown, OnDragDetected, and OnDrop functions and create a UMG widget to represent the item being dragged. That's about all there is to it. So I will get into the fun stuff now. There is a more in depth tutorial I followed that made this a little easier to understand. You want to override OnMouseButtonDown and OnDragDetected in the widget you want to drag. In my OnMouseButtonDown I first check to make sure the turret has been unlocked before dragging. This prevents the player from dragging a turret they have yet to unlock. Then we set an offset that will be used to offset the drag image from the mouse/finger. Then chose which input you want to listen to for dragging. I chose left mouse button as that is a normal drag and drop behavior and I also have my settings to map clicking to touching so this also works on mobile. As far as I know that setting is on by default. But if you want to make sure in Project Settings -> Input then find Use Mouse for Touch or just search for Use Mouse for Touch. Also in the widget you want to drag I overrode OnDragDetected which handles what to do when the system detects a drag has started. Again I make sure the turret is unlocked before continuing. Then create an instance of the widget you want to use to represent the item being dragged. For me its just an image of the turret slightly larger and with a small alpha applied to make it look a little different. Then using the CreateDrag&Drop function we create an instance of a blueprint we have to create that extends DragAndDropOperation. The Default Drag Visual is what the system will use as the drag continues. And the Drag Widget is a hook to the widget you actually want to drag. And this is it for the drag part of the operation. Now you must override the OnDrop function in whatever widget/HUD you want the item to be dropped in. I have a separate widget I'm using to handle the dropping. This allows me to place these where I want the player to be able to drop a turret and anywhere there isn't one, the player wont be able to drop it there. I set the locations in another place where I can manage each of the drop widgets in one place. So I spawn a PaperCharacter as the turrets will eventually need to spin/move and have an AI. Then I hide the drop widget so the player can no longer drop a turret there and return true to indicate the input was handled. And that's it for the basics for drag and drop. You look at the tutorial I linked to above for more detailed information but this should be enough to spark some ideas on how to use it in your project. After I make some minor visual changes to the dragging and dropping I will then move onto creating the first enemy ship and a spawning capabilities so I can put together a first demo level for people to check out and play. http://www.hunter-gaming.com/ https://www.facebook.com/indiehuntergaming/ https://twitter.com/HunterGamingInd
  9. HunterGaming

    Game Development Update - Space Defender: First Look at a Level

    No this is not part of the Tower Defense Challenge. Its a separate game project I'm working on unrelated to that challenge. I haven't picked a name for the game yet so I'm just calling it Space Defender for now.
  10. First of all I want to apologize for the extended delay between posts. There was a medical emergency in the family I had to attend to. But now that its almost taken care of I can get back into development a little more. I now have a main menu mostly finished and I have created an in game GUI and started on building up the first level. The base you must defend for this level will be in the lower left corner of the screen. I will also be adding areas where you can place turrets that will shoot down enemy ships. My current plan is to have the enemy ships start anywhere at the edge of the screen opposite of where the base is. So for the first level the enemy ships will be coming from the top and right edges of the screen and fly a straight line towards the base. If the base is in the middle of the screen enemy ships can com from all 4 edges. So far I only have one turret created. My next steps will be to create a pause menu for when the player hits the pause button. The player will have the options to quit, resume, adjust sound and fx volume and restart. Then I will move on to creating an enemy ship, add the ability to drag and drop a turret into the level, then begin adding the game play and spawning enemy ships and get the level mostly working. Once I get to that point I'll be providing a demo to get some feedback on the game so far. I wont be able to get as much done as I previously did for a while but I will be continuing development as I can. http://www.hunter-gaming.com/ https://www.facebook.com/indiehuntergaming/ https://twitter.com/HunterGamingInd
  11. This is the first real update for my latest game which I think I may just call Space Defender. However that may change. It will be a tower deference type of game however where you have to defend your space station from waves of enemy ships. This one will be a mobile game and will be available for sure on Android and hopefully iOS as well. I'm not very far into the development process yet but the main menu is almost complete. I just have to add a level selector screen. Then I can move on to creating the levels, enemies and turrets the player will use, then the levels. Lets move on to a few pics of what I have so far. The main menu has 2 animated turrets that are hard to see in this image but they are circled in white here. The background does have faint stars that are also hard to see in this image. I'm planning on having the level selector animate into view somehow on top of the main menu once I have the level selector completed. Not much to say about the next 3 images. The main menu buttons slide to the right off screen when either the options or quit dialog slides into the screen from the right. The options also shows the languages I plan to support when its released. So this should give you a good overview of the direction I'm going with this game. More details to come as I get more completed. other games: www.hunter-gaming.com facebook: https://www.facebook.com/indiehuntergaming/ twitter: https://twitter.com/HunterGamingInd
  12. HunterGaming

    New Game Announcement

    Yes my first mobile game and first attempt at a tower defense game. I have started working on it and almost have the main menu finalized. Once I do I'll be making another post with some pics.
  13. HunterGaming

    New Game Announcement

    This will be a short update just to announce a new game I will start working on now that Mine Seeker is complete. I'm going in a different direction with this one. Its going to be a mobile game. I'm planning on releasing it only for Android for now. I don't have a name for it yet or any pics as I have just finished the planning phase and know what I want the game to be and what to put in it. Its going to be an AR tower defense kind of game based in space. The player will have a base to defend their base against waves of enemy ships that want to destroy it. I was just about to create a new UE4 project for it but I figured I'd make a quick blog about it before I started giving regular up[dates on it. I am undecided on releasing it in the Amazon app store as well. Not sure if it will work as I plan on using Google Play achievements and Kindles have their own version of Android that doesn't have Google Play installed by default. So I'm going to try it and see it it works and it it does I'll release it in Amazon too. Has anyone release an app or game on the Amazon app store before? Let me know your experience with it. www.hunter-gaming.com www.facebook.com/indiehuntergaming twitter.com/HunterGamingInd
  14. HunterGaming

    Mine Seeker

    Mine Seeker is a game of wits, speed and a little luck. A new puzzle game where your goal is to clear all the tiles, except the ones that have a mine. If a tile has a numbered space, that indicates how many mines are adjacent to that tile. This allows you to clear the tiles while trying to figure out where the mines are. However you are also timed and must be quick in figuring out where the mines are to avoid exposing one and making it explode. With 180 fun and addicting levels with increasing difficulty, its sure to keep you guessing for a long time. A scoring system that keeps track of your scores and number of stars for each level. There is also a quick play for a more casual environment that lets you select a difficulty and is not timed. Don't forget about the 24 achievements you can earn.
  15. HunterGaming

    Mine Seeker Steam Achievements and Testing

    Good read thanks for the info. I'll give them a try and see how it goes.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!