![]() |
Team 2067 Swerve Drive Game
This year, our team used swerve drive. Our team uses LabVIEW, but I recently wrote a swerve simulator/game in Java using LibGDX.
I got the idea from Team Pwnage's game, which can be found here. Here's the link for our game: http://applepi.tk/swerve Here are the controls: ![]() The harvester has to be down before you can shoot. The calculations have some improvements from the code we used on the actual robot, like the ability to rotate around any point, not just the center. (This is what I, J, K, L keys are for) I didn't spend too much time on the ball physics, so they're a bit weird. I'm planning on refining them, and then adding more features, like other robots on the field and USB controller support. |
Re: Team 2067 Swerve Drive Game
I can't get it to shoot with space. I'm using Chrome on Windows.
Also your rotation on the arrow keys feels really fast. It would work with a joystick, but with keyboard keys it really doesn't work that well IMO. Otherwise, looks and runs great EDIT: You have to shoot with the intake out |
Re: Team 2067 Swerve Drive Game
Quote:
|
Re: Team 2067 Swerve Drive Game
Oh yeah, should have mentioned that.
And the turning is really sensitive, and especially hard to control with the drift. Maybe I'll turn down the drift and the acceleration. |
Re: Team 2067 Swerve Drive Game
I'm having a lot of fun with this haha. Good job, and impressive system on the bot. You guys did great this year.
|
Re: Team 2067 Swerve Drive Game
Great game! Joystick support would be nice.
|
Re: Team 2067 Swerve Drive Game
My favorite part is doing bounce shots off the side rails into the high goal, (not sure if it is a feature or not, but still pretty cool).
|
Re: Team 2067 Swerve Drive Game
I updated the game with controller support, timed matches, and an AI defensive bot that gets in your way. The robot interactions are rather buggy (weird things might happen if you get pinned), so there's a link to a version without enemies if you don't like it.
Clear the cache if you've played before. Html5 with enemies: http://applepi.tk/swerve Html5 without enemies: http://applepi.tk/swerve_noenemy Desktop with enemies and controllers: http://applepi.tk/swerve.jar Controllers don't work in html, I haven't figured that out, so use the desktop version if you want to use a controller. Tested on a Logitech Gamepad F310. Left stick for translation, right stick for rotation, LT and LB for harvester, RT for shoot, A for field centric, B for robot centric, D-pad for move rotation point, back for reset rotation point. And it wont let me update the first post to add the links... There's no edit button |
Re: Team 2067 Swerve Drive Game
You should github the source code. That way, more people can work on it and perhaps make it better!
|
Re: Team 2067 Swerve Drive Game
You can shoot over the truss as well !
|
Re: Team 2067 Swerve Drive Game
Quote:
|
Re: Team 2067 Swerve Drive Game
Sweeeeeet. Would be nice if there were 2 blockers though.
Next step: 3D! lol |
Re: Team 2067 Swerve Drive Game
Quote:
|
Re: Team 2067 Swerve Drive Game
Cory, great work on this it is a really neat simulation!
One slight recommendation would be to have the score and timer in constant view and a little larger. And 2067's swerve was pretty neat this year too! :cool: |
Re: Team 2067 Swerve Drive Game
so, what are your high scores?
|
Re: Team 2067 Swerve Drive Game
Quote:
|
Quote:
|
Re: Team 2067 Swerve Drive Game
Quote:
|
Re: Team 2067 Swerve Drive Game
Wow, you guys are good. My high score is 120.
Today's update fixes many of the bugs with the defensive bot, although it's still not perfect. Also, there's a menu that can be accessed with Esc (or Start on a controller). This menu lets you turn on and off the defensive bot and the match timer. Web: http://applepi.tk/swerve Desktop: http://applepi.tk/swerve.jar If you've played before, you might need to clear the cache to see the updates. |
Re: Team 2067 Swerve Drive Game
140 with enemy. Almost got a last second truss shot. I predict that no one will top 160.
|
Re: Team 2067 Swerve Drive Game
Quote:
also, there's a small bug. If you push the ball against the wall, without collecting it, you'll end up catching it |
Re: Team 2067 Swerve Drive Game
Wow, nice job. Reminded me of your swerve as well, which was also very nice. ;)
|
Re: Team 2067 Swerve Drive Game
How hard would it be to add basic acceleration and choosing of maximum top speed? That would be super cool and a little more applicable.
|
Re: Team 2067 Swerve Drive Game
Protip, don't refresh.. :p
![]() |
Re: Team 2067 Swerve Drive Game
Quote:
The ball bug, yeah, I'm aware of that. In general, things tend to get weird when you go against the wall :P I'll probably add something to prevent you from mystically warping through the ball like that. Quote:
If I turn down the acceleration, the robot drifts to the side when you move forward while rotating. As it is, this happens a little bit, but not that much. I'll play with it, though. Quote:
|
Re: Team 2067 Swerve Drive Game
Quote:
![]() |
Re: Team 2067 Swerve Drive Game
170 points, with enemy.
http://imgur.com/eWwXp3f |
Re: Team 2067 Swerve Drive Game
I keep getting webpage is not available errors on chrome
Does it not work well on chrome? |
Re: Team 2067 Swerve Drive Game
Quote:
Maybe I should move this thing to my team's actual website. Maybe that'll lessen the problems that people are having with this free hosting service. In the meantime, there's an alternate link to the desktop version here: https://dl.dropboxusercontent.com/u/93019118/swerve.jar |
Re: Team 2067 Swerve Drive Game
Quote:
|
Re: Team 2067 Swerve Drive Game
That 170 score... That's 7 seconds for inbound, truss, harvest, score, and drive back to inbound, all while avoiding defense. This man must be a wizard.
Today's update has more enemy bots with slightly smarter AI. Up to 3 bots, with settings being accessible from the menu. (opens with Esc, or for controllers, Start). Difficulty levels are: 0- No enemy 1- 1 enemy 2- 2 enemies 3- 3 enemies 4- 3 enemies, faster/stronger than you Web: http://applepi.tk/swerve Desktop: http://applepi.tk/swerve.jar Clear the cache if you don't see the update. |
Re: Team 2067 Swerve Drive Game
You should really open-source this. :P
|
Re: Team 2067 Swerve Drive Game
Quote:
Maybe you could just make it so you can change number of robots, speed, and strength independently? |
Re: Team 2067 Swerve Drive Game
Quote:
Thanks for the work you've put into the game, it's very well-executed. |
Re: Team 2067 Swerve Drive Game
Good idea, I changed it to that. You can now independently control speed and number of enemies.
Currently in the game, pushing power is the same thing as speed. If you can drive faster, you push harder. Maybe I'll fix that at some point. Anyway, the speed control asks for a number between 1-3, where your speed is 2. The default speed used in other versions is 1. Also, you can have as many enemy robots as you want. But once you go too high, things start to get crazy :P ![]() You can see the source code at http://applepi.tk/src And Chris: Thanks, I appreciate it. I've had a lot of fun making this game. Edit: Found a bug. You might need to bash the spacebar a few times after changing the enemy settings, or else the ball might shoot by itself. I'd fix it now, but I gotta do homework |
Re: Team 2067 Swerve Drive Game
Oh my god, can this please please please please be a multiplayer game?!?!
|
Re: Team 2067 Swerve Drive Game
Quote:
|
Re: Team 2067 Swerve Drive Game
Quote:
|
Re: Team 2067 Swerve Drive Game
Quote:
|
Re: Team 2067 Swerve Drive Game
Hmm, weird how it works for some people, and doesn't work for other people.
Until I figure it out, I'll keep this link updated: https://dl.dropboxusercontent.com/u/93019118/swerve.jar |
Re: Team 2067 Swerve Drive Game
Quote:
|
Re: Team 2067 Swerve Drive Game
Quote:
Also, this would be LOT easier if the enemies knew not to pin lol And I broke it, set it to 999 enemies... |
Re: Team 2067 Swerve Drive Game
Quote:
The enemy AI is pretty basic. Point at you and go at full speed :P Will probably add something so they back off after a couple seconds. |
Re: Team 2067 Swerve Drive Game
Quote:
With this new patch the bots are an important part of the game, before it was extremely easy to dodge it. I've also liked that you can make the ball bounce off the ground if you push it against the wall. Awesome work, keep this up |
Re: Team 2067 Swerve Drive Game
Anyone care to post a video of a ridiculous score?
I'm having trouble getting past about 60 and am unsure of the secrets of the masters. |
Re: Team 2067 Swerve Drive Game
Quote:
|
Re: Team 2067 Swerve Drive Game
Tips for a better score (though I'm nowhere near what these guys are going after) - Truss every time, learn how the human player throws and what area / direction best triggers it, learn a geometric reference on field for goal scoring and hit that every time. Stationary vs moving shot matters.
|
Re: Team 2067 Swerve Drive Game
I'm consistently getting 120-140 by just timing the human player toss to the bot and then shooting right after the intake passes the line.
|
Re: Team 2067 Swerve Drive Game
I just got 120, tying my high score. I did this by driving to the inbound coming at an angle, drive forward, and since I'm already at an angle, truss to the human player, catch, then strafe left while adjusting my shoot angle, then fire.
Might save some time skipping the truss to human player and just bouncing the ball off the back wall. I'd like to add multiplayer, and maybe other robots (on both sides) capable of possessing the ball. But probably won't get finished done this week because finals are starting. Quote:
Quote:
|
Re: Team 2067 Swerve Drive Game
Well, decided to pick this up again today, and a new high score, 160, http://gyazo.com/00bf191cfe9584884e0b6cb2a891d1c1
|
Re: Team 2067 Swerve Drive Game
I go to the human player pointing the intake at him, after getting the ball I drive forward and truss a bit before getting to the line, so some times the ball hits the other end of the field and comes back to me, I get the ball again then if i'm going full speed forward i shoot when the back wheels touch the line, if i'm going sideways i shoot at around the middle of the blue zone, shooting while moving and spinning at the same time can also help.
|
Re: Team 2067 Swerve Drive Game
Thanks for the advice. I'm not wizard-level yet but scored 100 on my last try with one defender.
|
Re: Team 2067 Swerve Drive Game
Quote:
That would explain a lot. |
Re: Team 2067 Swerve Drive Game
Quote:
|
Re: Team 2067 Swerve Drive Game
![]() |
Re: Team 2067 Swerve Drive Game
Quote:
|
Re: Team 2067 Swerve Drive Game
Apparently too many people have been trying to play your game...
Quote:
|
Re: Team 2067 Swerve Drive Game
Another interesting feature would be
|
Re: Team 2067 Swerve Drive Game
Quote:
I think the FRC community is sorely missing a simulator to fill the void Catalyst left, and this is the closest thing to a simulator anyone's used. Hence all the feature requests :) |
Re: Team 2067 Swerve Drive Game
I was thinking of some kind of "pits" where people could modify shooter configuration and whatnot between multiplayer matches.
I'll probably make low goals functional at some point. What button do you think I should use for unharvesting/passing? Here's my current todo list, in no particular order: Make AI avoid pinning Keep AI bots from getting stuck on each other, which sometimes happens Make low goals functional and solid Make AI bots able to assist/truss/score Make red alliance goals functional Add passing/unharvesting Add multiplayer Add shooter modifications Find reliable webhosting |
Re: Team 2067 Swerve Drive Game
For passing, you should probably go with a button near the pinky of your left hand or near the thumb of the right hand.
Or on second thought, you could pick any button in the middle bottom of the keyboard because you want need to shoot (with the space bar) while passing. So maybe a c,v, or b? |
Re: Team 2067 Swerve Drive Game
Quote:
*not right control though, Mac problems. |
Re: Team 2067 Swerve Drive Game
I suggest that before you make them able to pass and score you could add friendly AI that tries to block your defenders.
|
Re: Team 2067 Swerve Drive Game
In that case, I'll probably do both shifts so you could use either hand depending on your preference.
And counterdefense bots is also a good idea |
For passing I'd say just use the shoot button with the harvester up (on robots that would function like that).
|
Re: Team 2067 Swerve Drive Game
I like lining the bot up in front of the goal, then moving the rotation point down the field so if I just hold down the right arrow key, the bot will move in a semicircle back down the field to a position right in front of the HP. Then you just hold left arrow key and the bot moves in a semicircle back up the field right into the perfect shooting position. Takes out the ability to truss, but looks pretty cool if you line it up correctly.
|
Re: Team 2067 Swerve Drive Game
Oh, you could also have a look at the physics in contact, the bots tend to get inside you and get a bit bugged when they push you against a wall.
|
Re: Team 2067 Swerve Drive Game
Can someone explain how to open the desktop version? I downloaded it, and when I try to open it, nothing happens.
|
Re: Team 2067 Swerve Drive Game
Quote:
And if you can't get it to work, hopefully my cpu limit on the web version will have reset by tomorrow. |
Re: Team 2067 Swerve Drive Game
Button Configuration would be cool in the future for Controllers so we can customize the buttons :)
|
Re: Team 2067 Swerve Drive Game
Quote:
Also, I would prefer the intake open/close button to be a simple toggle, rather then two different buttons. My high score is 160, but I haven't played the new version yet. |
Re: Team 2067 Swerve Drive Game
I totally love the game; but one *major* suggestion is this:
Make the New Game button different from the Shoot button. I've missed seeing three (probable) high scores just tonight because I was trying to get a last-second shot off and the game ended, went to the score screen for an instant, and then restarted because I'd hit space. Fix that, and add a high scores list, and it's a game I'll spend even *more* ridiculous amounts of time on :D |
Re: Team 2067 Swerve Drive Game
I have spent way too much time on this. WAY too much.
![]() |
Re: Team 2067 Swerve Drive Game
Quote:
|
Re: Team 2067 Swerve Drive Game
AI is slightly smarter. It will try to avoid pinning, and they are more resistant to getting stuck on each other.
Per David8696's request, you now use the enter key to select/confirm things instead of the spacebar. Use either shift to pass the ball when the harvester is up. Not really useful for anything as of now. What next... |
Re: Team 2067 Swerve Drive Game
Wow, this ended up occupying a good third of my day. Awesome game.
|
Re: Team 2067 Swerve Drive Game
Quote:
Where can I find this version? |
Re: Team 2067 Swerve Drive Game
Whoops, you're right, I forgot to update the dropbox file. Should work now.
https://dl.dropboxusercontent.com/u/93019118/swerve.jar |
Re: Team 2067 Swerve Drive Game
Nice update, playing against 2 enemies on 2 or 3 is really good challenge. If I dare to ask for another change... it would be to make the human player throw the ball in a slightly more advantageous spot. Whenever I go back to the feeding station, the human player always tosses it right past me unless i completely stop and wait for it.
|
Re: Team 2067 Swerve Drive Game
Quote:
|
Re: Team 2067 Swerve Drive Game
Quote:
|
Re: Team 2067 Swerve Drive Game
Quote:
|
Re: Team 2067 Swerve Drive Game
I ran a sketchy calculation based on how long it takes to traverse the field, assuming it is a square robot that is 28in long without bumpers,
and I've concluded it moves at about 14fps. It definitely looks a lot faster though. |
Re: Team 2067 Swerve Drive Game
Quote:
|
Re: Team 2067 Swerve Drive Game
Must beat 190....
1 enemy ![]() |
Re: Team 2067 Swerve Drive Game
Here's a quick video I threw together, most notable thing is me trying to figure out where the end recording button is...
Anyway, this was a pretty lousy half match followed by a 170 with a few misses, no enemy. Should show you some strategies to get a "perfect cycle," a close to perfect cycle, and how to scramble well. https://www.youtube.com/watch?v=3kpaFIjpEic |
Re: Team 2067 Swerve Drive Game
![]() Boom. Done. |
Re: Team 2067 Swerve Drive Game
Oh wow... Meanwhile, I still haven't topped 120.
From that video, it looks like the key is timing the human player shots. I'll try that |
Re: Team 2067 Swerve Drive Game
Where can I get the latest version? I don't have a version that lets me adjust the quantity of "enemies" (or has the first loading screen at all). I'm using the posted dropbox link.
|
Re: Team 2067 Swerve Drive Game
Quote:
|
Re: Team 2067 Swerve Drive Game
Quote:
|
Re: Team 2067 Swerve Drive Game
Quote:
|
Re: Team 2067 Swerve Drive Game
That link should be updated.
Also, that menu doesn't open up when you start the game, if you thought that. Push Esc to open it. |
Re: Team 2067 Swerve Drive Game
First of all, awesome game. Secondly, is there a settings menu for multiple defenders? It never gives me the option of multiple defenders.
|
Re: Team 2067 Swerve Drive Game
Really? You should be able to do that by opening up the menu with esc, then going down to enemy options.
If that doesn't show up, try clearing the cache if you're playing the online version. |
Re: Team 2067 Swerve Drive Game
there needs to be a reason to have the intake closed. its too easy to just run around with it open all the time. the enemies should be able to knock it out if they hit you hard enough when you have the intake down.
in addition to changing the enemies speed, their reaction time should also change, so a 1 cant track you as well as as a 3 can. |
Re: Team 2067 Swerve Drive Game
Is this dead? I kinda want to play it.
|
Re: Team 2067 Swerve Drive Game
Quote:
http://applepi-2067.github.io/swerve/ |
| All times are GMT -5. The time now is 17:48. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi