Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411482 Posts in 69370 Topics- by 58426 Members - Latest Member: shelton786

April 24, 2024, 12:21:44 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsRocket Fist - Throwing one punch at a time.
Pages: 1 ... 4 5 [6] 7 8 ... 11
Print
Author Topic: Rocket Fist - Throwing one punch at a time.  (Read 22982 times)
DanielSnd
Level 1
*



View Profile WWW
« Reply #100 on: May 06, 2015, 01:15:05 AM »

Yeah it's not "cheating" to better your abilities. And you don't have to be drawing or programming to bettering yourself as a developer. I also try to focus on the "no zero days" approach to development but some days-- it's not coming to you and forcing it just leads you to re-doing the work later. Days like that, I try to find other ways to work less directly.

I couldn't get into it yesterday so I spent a good part of the day playing TIG games. Rain World, Rocket Fist (of course), Mable, Battle Brothers... it was refreshing to see what other TIG devs are doing and just take a step back from what I'm doing to get some perspective. Now THAT seems like cheating to just play games- but I only play games about 1 day a week so for me, as long as I feel like its helping refresh me or inspire me, then it's not time wasted...
Indeed, even if you're just "playing games", it's still researching & inspiring. xD No time is wasted.





Full HD version // Tutorial

This is the result of my second day with modo, following the second tutorial in Digital Tutor's modo learning path :D

I’m really really loving modo, things are way easier to do, the tools are way better thought out, and things are in many ways more intuitive. By now I feel confident enough to start working on Rocket Fist using it. (I've been away from the project for too long D: I should go back).

Next tutorial I'll follow is focused on Game Interiors, which is exactly what I need to do for Rocket Fist, then I'll stop following Modo tutorials and just get to my regular rocket fist work.
Logged

DanielSnd
Level 1
*



View Profile WWW
« Reply #101 on: May 07, 2015, 09:36:55 PM »

Well, I didn't start doing the artwork I should be doing for the game… but I did touch the game today! :D

I fixed a bunch of shader stuff that went wrong from the conversion to unity 5 (Not sure if It's looking better or worse now, Thiago thinks it's better… I'm still not sure). And more importantly, I added a feature I've been meaning to add for a while!

So, when you don't have a weapon, you're "powerless" in comparison to the guy with the weapon. Having the dash to be able to stun the other player helps to bring balance to the equation, but to make it even better I added yet another function to the dash.

If you dash just at the right time (Must be within the first seconds of activating the dash, when you have the most momentum) and the right angle (you need to be facing the incoming rocket) you can counter the rocket and it'll go back in the direction of your dash.



It is pretty hard to get it right, so it would be something for the most skilled players and wouldn't be a certainty. I still have to playtest it to know if I should keep it, but I feel good abount this feature Smiley

By the way, while I was doing it, all I could think of was this:

Logged

oldblood
Level 10
*****

...Not again.


View Profile
« Reply #102 on: May 08, 2015, 05:01:28 AM »

I could see a great single-player boss built around the mechanic of countering rockets back at the boss... cool feature.
Logged

DanielSnd
Level 1
*



View Profile WWW
« Reply #103 on: May 08, 2015, 07:38:04 AM »

I could see a great single-player boss built around the mechanic of countering rockets back at the boss... cool feature.

Damn, it is pretty hard to counter those, under pressure with a boss would be insanely hard hahahah

I'm thinking of maybe doing a challenge mode later on with some "boucing puzzles", the counter could be great there :D



Someone brought an interesting question on the tumblr about the counter:
Quote from: maruchronos
It'll be possible to counter a counter shoot? Hahah First thing in my mind was two players doing this in a loop, increasing the acceleration of the rocket (something that reminds me the H Bomb in Bomberman). My favorite feature already!

it's totally possible to counter a counter-shot, but it's really pretty hard to get the timing right, I can see a loop of countering happening, but damn would be a crazy unique situation, not something you could repro every time xD



I failed more than 6 times while trying to record this gif.
Logged

DanielSnd
Level 1
*



View Profile WWW
« Reply #104 on: May 10, 2015, 12:07:41 AM »

Today I made a video for a gaming convention back in my hometown that is going to showcase Rocket Fist next weekend, It's all in portuguese so I won't really post it here xD

I also made a Landing Page, since it's good to have a call of action for that festival so people can follow the development. I also made a mailing list in the page so I can collect emails to push future demos/greenlight-release etc.



It's a pretty simple landing page, just one simple html, a couple of gifs and the latest teaser video.

http://rocketfist.me

In unrelated news, I'm thinking about doing a weekly devlog stream Smiley Classes are starting this monday, so I'll get a feeling for my weekly schedule and figure out what day works best for me to do it.
Logged

DanielSnd
Level 1
*



View Profile WWW
« Reply #105 on: May 10, 2015, 09:15:37 PM »

Today I laid down some ground work towards the Team deathmatch mode. Now the health controllers and the weapons have a team value, and if they do have a team set, you won't be able to actually inflict damage to a teammate, nor stun them.



It's kind cool that you can actually throw a weapon to your teammate for them to use Smiley I can see that being used in interesting ways, can't wait to finish up the scoring logic for the team-mode and playtest it!
Logged

DanielSnd
Level 1
*



View Profile WWW
« Reply #106 on: May 11, 2015, 08:17:27 PM »

Implementing the Team deathmatch game mode was fairly easy thanks to the way I made the parent game-mode class. Just had to override some of the scoring functions and it was pretty painless to adapt the survival to the team version.



Pretty much I just use 2 scores instead of 4, and I score based on the team. If there is no one alive from team 1 or team 2 after someone dies, they lose a team life. If when the game is started there is no lifes on one of the teams, the other team is declared the winner… If by some crazy coincidence both teams end up killing each other at the same time and both teams have no lifes, it’s a draw!
Logged

DanielSnd
Level 1
*



View Profile WWW
« Reply #107 on: May 12, 2015, 07:51:48 PM »

I'm sending the game to a games festival back in my hometown this weekend and they just told me that they wouldn't be able to showcase my game with 4 controllers (for 4 players to play), only 2 controllers. Right now in the build I only had the 4 players map version, since that's usually what I playtest with, so…





Today I made a version of the original 1vs1 map (The first level I made for this game). The original game was made to be played on the PSVita with one player on each side of the vita, being a 1vs1 game. So the level was smaller and had one extra weapon on the middle which use was very strategical xD I playtested this old 1vs1 version a lot, so I'm confident this layout will do way better for the festival than the huge 4vs layout does with only players.
Logged

DanielSnd
Level 1
*



View Profile WWW
« Reply #108 on: May 13, 2015, 07:07:08 PM »



So, I pushed the first Unity 5 build I made to GameJolt yesterday to get some more feedback and suggestions (Version Pre-alpha V -0.01). But I didn't quite playtest it since the conversion into unity 5 so it shipped with lots of little/big bugs D:

Today I took the game into school and playtested afterhours finding a lot of those little bugs so… Today's task was actually fixing those. (And I pushed a version Pre-alpha V -0.02 :D)

And those were the fixes:

- Whenever starting the 2v2 mode, 2 sets of players were spawned for each player, so you were controling 2 robots at once D: this bugged appeared from the Start() and the OnLevelLoad() funciton both being executed that’s now been fixed, so if the start one runs, the onlevelload one won't run.

- After playing the 2v2 mode, the regular deathmatch modes would use the same colors from the 2v2 mode because of the way I did the material selection (It was on the game manager, which is kinda permanent between scenes). I changed it to the Game Mode Controller so it’s pertaining to each game mode specifically, so that's fixed.

- I stressed quite a bit that the Adventure is not being focused and isn't really fun right now, but I figure some people might give it a go anyways… so I playtested it as well, only to find that most materials were totally broken (pink materials all the way!), so I fixed all the missing materials from the unity 5 conversion.

This weekend I'll be travelling to Bellevue to showcase the game at the Power of Play Indie Expo, so if you're around the area, come down to play the game and meet :D

Oh, and since I'll be travelling, I'll probably be posting daily updates of the expo, but won’t really be doing a "daily task" those days.
Logged

DanielSnd
Level 1
*



View Profile WWW
« Reply #109 on: May 16, 2015, 07:44:54 AM »



I didn't manage to write anything yesterday because of the trip down to Seattle to showcase the game at the Power of Play Indie Expo. I'm still down here and I don't have proper internet (using cellphone internet right now D:) so I'll properly write more on sunday when I get home, lots of exciting new developments and ideas from the folks playtesting the game this weekend :D

Logged

DanielSnd
Level 1
*



View Profile WWW
« Reply #110 on: May 17, 2015, 10:54:22 PM »



Alright, I'm back from the trip down to Power of Play :D It was my first time at an expo showing my game (Other than Full Indie, that's more of a MeetUp than an expo Shocked) and I had a blast doing it!

I got to meet a lot of really cool developers and some people from the industry, made great connections and got some awesome feedback and suggestions for the game!



At one point I was talking to Auston (Developer from Sportsball and Starr Mazer) about my problems doing the player AI from the game, I didn't know how I could make the AI move around the level as a player would. By using A* the AI would always be picking the "optimal path" which gets quite weird and robotic. As we were talking Casey (Handmade Hero) was trying the game and suggested: "Why don't you just use Rapidly Exploring Random Trees?"

He then proceeded to explain how the rapidly exploring random tree worked and it made so much sense to use for this problem D: as soon as I got back to Matt's house I started coding. (Matt from FMJ Games was nice enough to receive me as a guest at his place for the event :D thanks Matt!).

Little vine showing the tree being generated: https://vine.co/v/eKVrX0nLb6i

So pretty much I start by adding a point into a point list for my original position.

I then raycast towards my goal point, if there is a free path between the original position and the goal then add a line between those and consider that the path to take.

If there isn't a free path between me and my goal, pick a random position on the map (checking if it's not inside a wall of course). Then find the closest point in the point list to it and try to raycast to it, if there is a free path between this new random point and the closest point to it, add it to the point list and create a line between the two, if there isn't a path, drop this point and find a new one.

If the random point was added to the point list, raycast to check if there is a free path between it and the goal. If there is, stop the process and read the lines from the goal back to the parents recursively in tht tree to find the path. If there isn't a free path between the new point and the goal, find a new position and repeat the process.


The first night at Matt's place I managed to get the tree working and finding interesting paths between the original position and the destination position, but still it wasn't tied to any movement.

I went to sleep thinking on how I could better implement this into the existing code I already have for the players and how to get the AI to do what it had to do.

As I woke up on the saturday I remembered a talk that my Game Design teacher, Dr. Kimberly Voll gave at GDC this year. Less is More: Designing Awesome AI.

A couple of important things I took from that talk:

  • All behaviour controller-based. This tip already saved me a lot of time in implementing this, and is going to save me a lot more time in the future. Instead of writing an AI component that moves the player around, talks to the weapon to release the weapon, talks to the movement to do dashes and so on and so forth, the AI component simply acts as a controller. Instead of talking to the other components directly it simulates the input the player would be doing, "moving the analog stick towards this direction", "pressing the A button" as opposed to "move to this position", "throw the fist".
  • Watch people play.  "You need to know how humans play if you're going to do something that looks like a human". I've been watching people play the game for a long time now, but that day in the expo I watched even more closely how people were moving around the levels and interacting with each other and the weapons.
  • Start stupid. "You can obscure intelligent behavior that is naturally emerging if you go complex too fast". I decided to start just by having the AI move around the level randomly and see how closely that behaviour matched the players behaviour, surprisingly enough, right out of the box the Rapidly Expanding Random Tree AI was already moving around how I've seen many players move that day.
  • Identify (in)Appropriate Behaviors and Fix. From watching the first "stupid" implementation, I started to look on what was working and should be kept, and what should be changed, as I did that I kept being surprised how quick things were working and looking some-what human, every little thing I fixed or added only made it better.
With those things in mind when I got into the train to travel back to vancouver I started implementing the actual movement. I had the actual picked path points be added to a separated list called "desiredPath". If there is any points in the desiredPath list I get the latest point and find the direction towards it. I then normalize and break the direction into Horizontal and vertical analog stick values and inject it into the player controller I use to receive input from the controllers. Whenever the distance between me and this latest point is smaller than 1 I drop that point out of the list (which makes me do the same for the new latest point, until there are no more points in the list).

Little vine showing the player AI start to move around: https://vine.co/v/eKYxZQ22zzP

Since most players love to dash around, I made it so every 1 and a half to 2 seconds the AI would have a 40% of chance of pressing the A button, which made the AI start dashing around all funny like humans do.

Little vine showing the player AI start to dash around + a bit of the view from the train: https://vine.co/v/eAuaDbJ1JOr


I then wanted to start actually adding goals, still in the interest of "starting simple", I simply wanted his goal to be: "Get a rocket fist". So I made a function that looks in the level for the closest available rocket fist (not harmful and not being used by other player) and returns that as a goal to create a path using the RERT. If the AI already has a fist or there aren't any fists available in the environment, pick a random floor position as a goal to create a path using the RERT.

Little vine showing the player AI finding picking up and throwing the fist: https://vine.co/v/eAu07AjJMtB

From there, funny enough, the AI not only got the fist, but was throwing it around because he kept pressing the A button every couple of seconds, I kept watching what it was doing around in that level and… it was looking very human-like Shocked

Bigger Gfycat showing the player walking around after the fist and throwing it around, with the view from the tree visible: http://gfycat.com/DeliciousIndelibleFlies

By that time the train was arriving at the station and I started my walk back home and got a good night of sleep. Today I decided to put a couple of those Derp AIs to fight and watch what would happen (I decided to name this AI derp, as it's kinda dumb and is not exactly trying to fight as much as just get the rocket and throw it randomly).





Today I watched more than 30 minutes of Derp fights. I started with 1v1s, then I went 4p. I didn't implement anything else to make them try and kill each other, just the simple goals of: "No fist? Find a fist. Have a fist? Walk to random spot. Every 2~ seconds roll a 40% chance of pressing the A button."However, some times… the Derps were actually playing very well D: I saw some of them executing perfect counter-kills that I haven't been able to execute yet, I've seen them executing stun-steal-kills and I've seen them doing crazy long-shots and engaging in stun-battles! For a long stretch there Green Derp won 3 entire last man standing matches in a row. I know for a fact that he has the same AI as all the others, but a little part of me still thinks he's smarter! xD

Now I need to add more goals (if you have a weapon, find the closest player you can kill and try throwing it in his general direction maybe?) and I need to figure out a "menu" way to let you add AIs into the game… I gotta figure out ow I'm going to make the actual mode selection menu ;o



Ah! In other news, besides me taking the game to the Power of Play Indie Expo it was also showcased at the Gamepolitan Expo back in my hometown :D apparently there were no controllers, the screen was a bit cropped so you couldn't see the whole screen and most people were playing the buggy and terrible adventure mode instead of the versus mode (I also found out I left a bug in that makes the boss room totally red and semi-impossible to see what's happening =x which makes the adventure mode even worse). Well, I guess people still kinda liked it, it got an award for "Best technology", whatever that means xD

Little Gfycat of some kids playing the arena at the Gamepolitan Expo: http://gfycat.com/DecisiveFalseAgama

Some people also tried playing the versus apparently, despite all the problems and having to use the keyboard xD so yay for those people!

Well that's it, sorry for the long post, but there was a lot of this weekend I wanted to talk about :D So excited that I finally get to have a player AI! Can't wait to finish implementing it's goals and start trying to fight against it!
Logged

DanielSnd
Level 1
*



View Profile WWW
« Reply #111 on: May 19, 2015, 11:26:00 PM »



So, I added goals to the Derp AI and… damn it got mean quick D:

From lovely derps throwing fists around aimlessly and sometimes doing really cool moves totally by accident, they turned into vile kiling machines D:



One thing I did change, besides adding the goals, was to instead of changing the fake controller value directly, which was causing some really quick turns towards directions, is to lerp that value over time, to simulate the time our fingers are actually moving the joystick towards the new position we want to point towards. It's pretty quick though, just not instant like it was before. That lead to even more human behaviour.

With the new goals, this AI is pretty much just like many people I've seen playing this game for reals, so I'm happy with it Smiley (It's just kinda too mean, I think I'll name it Herp. Herp Derp!)

Now I have:

- If you don't have a fist, find a path to a fist and move there.

- While not having a fist have 45% of chance of pressing the button A every 2~ seconds.

- If you have a fist, find a path to the closest player and move there.

- While moving towards the closest player, check if you have a clean path to him, if you do turn your joystick in his direction and have 55% of chance of pressing button A.



Next up is actually changing the way the game mode does the player spawning so I can spawn regular players with AI players so I can finally battle my creation <3 Will have to mess around with the menu as well so I can decide on the menu how many are actual players and how many are AI… also probably a "press start to join" so I can pick which controllers are joining instead of not letting people decide… Will probably be working on that the next few days.
Logged

oldblood
Level 10
*****

...Not again.


View Profile
« Reply #112 on: May 20, 2015, 05:10:37 AM »

The new 'bots' sound very cool. Will you be able to encounter them in the single-player mode? Sounds like they could make for cool 'mini bosses'.
Logged

DanielSnd
Level 1
*



View Profile WWW
« Reply #113 on: May 20, 2015, 07:19:08 AM »

The new 'bots' sound very cool. Will you be able to encounter them in the single-player mode? Sounds like they could make for cool 'mini bosses'.

Haven't thought about that :O I've been just focusing on the multiplayer lately, but yeah, they could be pretty cool mini-bosses to fight with. But besides that, I could use the same "RERT pathfinding" for other enemies of the singleplayer as well, giving them a more interesting behaviour :D
Logged

devMidgard
Level 1
*



View Profile
« Reply #114 on: May 20, 2015, 11:07:42 AM »

Been following this from the start and while it was already looking solid now it looks freaking amazing. I like how you write about AI and didn't know about the Rapidly Exploring Trees thing!

I also loved how you explain that staring at the AI is like watching your kids kill each other, how wonderful Wink

Pretty nice work sir, keep on going Gentleman
Logged
DanielSnd
Level 1
*



View Profile WWW
« Reply #115 on: May 21, 2015, 12:03:21 AM »

Been following this from the start and while it was already looking solid now it looks freaking amazing. I like how you write about AI and didn't know about the Rapidly Exploring Trees thing!

I also loved how you explain that staring at the AI is like watching your kids kill each other, how wonderful Wink

Pretty nice work sir, keep on going Gentleman

That's great to hear, thanks :D sometimes I try not to get too technical when writing about what I'm doing, other times I go on and describe way too much lol.

It is extremely entertaining to watch xD I guess if I put together all the time I've watched their matches it's probably more than 1 hour so far.





So, I needed a menu to be able to add bots to the game, I didn't want to keep going with the buttons for each different possible combination of match (2 players vs, 3 player vs, 3 players vs ai, 2 players vs ai, etc. etc. etc.) so I started looking into other local multiplayer games to see how they solve the problem.

I saw lots of them use the "Press Start to join", which helps also to assign a controller to each player. Before this the controllers were hard-assigned, so if you only have 1 controller and want to play on the ASDW of the keyboard while your friend plays on the controller you're out of luck, they're were and the same. Implementing that I can break down each controller separately and assign the controllers to the player objects as they spawn. Whichever controller presses Start first (or attack) becomes player 1, and so on.

Now, for the actual adding of bots, my favorite solution was the one I saw inCrawl (Great game, if you like local multiplayers you should totally buy it!). Whenever a player has pressed start and joined he can get to a menu in which he can pick the number of bots (if any) and their difficulty. All players can change that number and it'll auto-correct if more players join (If when the first player is picking there are 3 bots and 1 player joins it will become 2 bots.).

I started implementing this menu system today, but still haven't finished (too late, gotta sleep), I also added a little 3 letter name the player can input, I'm thinking of experimenting with having that in the game, not sure if following the player all the time visible or visible for a few seconds when the player presses select or on a nameplate with the players lifes on the top (useful to remember which color is who).

What do you guys think?
Logged

DanielSnd
Level 1
*



View Profile WWW
« Reply #116 on: May 21, 2015, 10:31:08 PM »



Alright, finished implementing the new "Press Start to Join" menu Smiley It still can use some polish (animations, particles and etc.) but it's functional right now, so I can finally send some builds for people to try it out ^^

I haven't really implemented the use for the 3 letter names yet D: but it's already in the build even though it's useless right now =x.

DOWNLOAD THE PRE-ALPHA V -0.03 WITH AIS HERE FOR WINDOWS!

OR HERE FOR OSX!

I shipped with both Derp (Doesn't try to kill anyone, is just throwing rockets around chilling) as the easy mode AI and Herp (Is actually trying to kill people, but doesn't really try to avoid being killed or aim too precisely) as the normal mode AI. I played a bunch of matches against them and they don't really pose me with much of a challenge, despite both being able to kill me on occasion (especially on 4 player mode since it gets pretty chaotic). Still, should be good to try out the game when you don't have friends around ^^

Further on I shall implement a harder AI that aims more precisely before shooting, takes into account bounces and tries to self-preserve.

By the way, since now players can play alone by using bots, I deactivated the Adventure mode, which was still buggy and not fun. One day it will come back… but different!

Logged

DanielSnd
Level 1
*



View Profile WWW
« Reply #117 on: May 22, 2015, 10:37:37 PM »

Alright, starting with the small fixes:

I fixed a bug in which the particle effects for the weapon-to-weapon hit effect would appear in a totally wrong place. After trying to hunt down the cause of the bug for a while, I found that when it happened the latest RaycastHit point value was the same from the previous hit, which makes no sense at all, but was causing the particle to appear in the old place from the previous hit… So I just added a check to see if the value is different than the previous one before spawning the particle =x I still don't know why that bug happens though, but that check prevents it from being noticeable, so close enough for now.

I messed around with the player speed, and damn, it's so much better now D: after playing a few matches with the new speed and trying the old speed again, it feels so slow and heavy. also improved the dash slightly and made the window of opportunity for the counter larger, so doing counters should be a bit easier now (still is a bit hard).

I also made some temporary changes to create a special version of the game for this youtube channel I like and sent it for them to play it this weekend *_* The Button Masher Bros! They covered several of my games in the past, they're awesome <3 Thanks guys!

Lastly, during the event back in my hometown people reported feeling lag in the game during the event, I told them to run it in the fastest quality, but they said it was still laggy.


Now, I've been optimizing as I go, the game has very few draw calls and there is no reason that I know of for it to be laggy, I tried to figure out a way to mimick a slow computer to test, but I didn't find any good solution. In my own machine when running the game in Fastest quality I get over 700 fps. I ran the profiler and nothing stood out, the game was running super smoothly.

After thinking of a while of friends that could possibly have slower laptops to try it on it hit me… I could try it on my phone! Certainly the computer they're using would be far superior than my phone right? It's not even a new phone,I bought it back in 2012!

I added some touch controls and made a build for XCode.



Ok, so… It runs smoothly on my iPhone D: I have no idea how it lagged over at the expo running on Fastest, looking at XCode while it was running on the iPhone it's using pretty much only half the CPU, and 200 mb memory!


By the way, the AI gets way more challenging with those terrible touch controls lol xD Rocket Fist will definetly not be released for mobile! Still it's gonna be kinda fun to have on my phone to show people when I'm talkign about the game and don't have my computer around.

Well after all this, I guess there is only one explanation left for it running laggy over there on fastest quality…

Logged

DanielSnd
Level 1
*



View Profile WWW
« Reply #118 on: May 23, 2015, 11:57:03 PM »



Today was a somewhat slow day, I did some work on the game but not much to show for it. I did some work into the Wii U version of the game, but I can't really show anything about that. I played a lot of the iOS test build I made yesterday, it's weirdly addicting for me, the extra difficulty that the terrible controls adds makes the bots interesting to fight against for me.

I also worked with thiago to make a presskit for the game (using the awesomepresskit()), since we ended up sending the pre-alpha version to a couple of people that could write something about it.

Well, that was it. Tomorrow I'm going to work on the powerup system, there's a Full Indie Meetup this week and I want to playtest it there Smiley
Logged

DanielSnd
Level 1
*



View Profile WWW
« Reply #119 on: May 25, 2015, 12:41:43 AM »


Today was a pretty productive day, I did several small tasks and one big task.



Small changes:
  • Improved player speed yet again, originally at version 0.03 it was 3.2f, then on version 0.04 it was 4f, now it's 4.3f, I don't know how I lived so long with the slow speed of 3.2f D:
  • The pause menu was without animations, since I used Time.Timescale = 0 to pause and the animations were using delta time, they were not working, that's now fixed Smiley those animations are now using Time.realtimesincestartup and are imune to Timescale.
  • Player's 3 letter name are now used in the game, they show up when players spawn for a couple of seconds then hide. They can appear again if a player presses Select on the controller. That's useful to find yourself if you're confused. I'm also going to add the player's name to the scoreboard on the top, but I haven't yet.
  • I did color correction on the menu scene, don't know how I forgot to do that before D: looks much better now.
  • Talking about color, I made the colors on the player textures a bit darker, you can probably see by the picture on the top here, much better <3
  • Made the default on the player menu to be having 1 bot active, since most people seem to be playing by themselves with bots lately.
  • Made the controller vibrate whenever you die, stun someone, get stunned or counter :D It's so cool! and was pretty easy to implement.
  • Buffed medium AI a little bit, now he will use a raycast in front of him with bounces to determine if he should shoot or not. He still has a 15% of chance per frame that he has line of sight with other player to shoot though, but the chance will only get above 50% if he knows it can hit you via raycast. I might need to add an AI between easy and medium that won't raycast you but will try to shoot in your general direction like previous medium AI used to.
Now for the big change, the Hard AI. For the Hard AI I wanted it to use raycasts to figure out if it had a good shot accounting for bounces. I started writing this code back in the end of february, as I thought of making this little challenge mode game for rocket fist and for level design purposes I made a laser pointer that showed me the bounces the weapon would do.


That way I woul easily be able to see if the level was solvable as I created levels, and would be able to move things around to make sure the bounces would make for possible levels.

So, I got that piece of code back and implemented it into my player. I thought of having a temporary laser aim powerup whenever I get around implementing the power up system, so I seized the opportunity and made myself a little laser aim using LineRenderers.



Doing that for the current weapon position is pretty easy, but to check for possible bounces I should check all around the player. I could just raycast to different directions from the center of the player, but that's not where the weapons are shot from… So I had a problem: I would have to find where my weapon would be for my player's rotations.



My solution is probably not the most elegant, but it works, I created a new empty game object and made it follow the center of my player. Every frame when I'm doing my raycasts, I run a for loop in which I:
  • Get the distance between the weapon and the player, get the position of the player and add the transform.right of this empty game object multiplied by that distance, that's the position of the weapon for that rotation.
  • I then do my raycasting (with bounces) from that position in the direction of the transform.forward of my empty game Object.
  • I save in arrays the position, direction of the ray and if I found a player his transform.
  • Afterwards, I rotate this emptyGameObject 45 degrees.
  • Whenever I finish my for loop I return it to 0 degrees.
That gives me rays all around my player from the position the weapon would be, and since the empty game object is following the player but is not a child of it, it won't keep rotating and changing directions, the direction I get from there I can use to rotate my players towards.


Here is another picture of it, this time with bounces turned on. I made it so whenever a ray found a player it colored the line blue, so it would be easier to know if it was working.



I made a copy of the Herp AI (Medium Difficulty) and messed around with the section in which it tryes to shoot at the player. Now it will keep checking on it's web of raycasts if it has any possible shot to the player accounting for bounces all around. If it does, it will tilt the analog stick in that direction. Whenever the main raycast (that one changes with the player and is always pointing forward) finds a player, it will have a 55% of chance per frame of pressing A, otherwise it's 10% chance if it's in the same vincinity of the player and looking vaguely in the player's direction.

This has made the AI extremely evil, it gets me with crazy shots I wasn't expecting. To make things worse I added a new method for finding weapons, so if this AI doesnt'have a weapon but the closest player does, it will look for a farthest weapon from the closest player, so it doesn't get baited to a weapon that I'm guarding instead of going for another unguarded one.

I played 1vs1 against it 3 full matches and I still haven't managed to beat it in a full match (I kill it sometimes of course, but it's winning the full matches against me ><). In my defense, it's late and I'm tired!



You can see the evil AI destroying me in the GIF above (I'm naming it Troll… now I have Derp, Herp and Troll). If you feel like having a go at it…

DOWNLOAD THE PRE-ALPHA V -0.05 WITH AIS HERE FOR WINDOWS!
OR HERE FOR OSX!
Logged

Pages: 1 ... 4 5 [6] 7 8 ... 11
Print
Jump to:  

Theme orange-lt created by panic