|
Post by Chiral on Jun 5, 2012 21:26:42 GMT
I will fucking break you if you don't stop typing, then stop typing, than continue again - The game! I'm... slowly... building a game system. Should kinda be like a real time xcom thing, except probably without guns (They're hard to code, don't judge me) Skills I can do. Magic... eh, sure. As long as they don't need line of sight. A really shaky tech demo of the basic controls can be found here: www.mediafire.com/?dcf01qsziipq7jv(Click to move a character, q switches between characters you control. Only 2 characters are here, I'll add more later, with stuff like a pause button so you can plan actions.) More features will be added later, when I'm not about to go to sleep.
|
|
|
Post by CavGunner on Jun 6, 2012 21:11:04 GMT
Nice profile changing. I love the title. Other than that...I'm actually looking forward to this. I might be able to work out a way to do LOS for you...but no promises. Would really just be an extended invisible cone in front of the player, or just multiple extended lines revering a cone-like shape: The one at the very top is hidden behind the max LOS, so you can't hit/see him. The one on the top-left is behind the building (Orange), so you can't hit/see him. The one on the bottom-left is in front of the building and on the line, so you can hit/see him. The one at the bottom-middle is on the line, so you can hit/see him. The one at the top-middle is behind the one in the bottom-middle, so you can't hit him, but you can see him. If you shoot toward him, it would hit the one in front of him, but you might be able to throw something at him. The final one on the top-right is not on a line, so you wouldn't be able to hit/see him. I just picked 20m for kicks, doesn't really matter. Essentially, this was only with 7 lines (Obviously), and would be much better to have lines that extended at more angles, possible up to one line per degree (At 45 degree max angles in either direction, leaving a 90 degree FOV). You would then set it so that if something is touching the line, is NOT an enemy/entity, and is closer to the player than anything else, the rest of those lines are cut off. But if an entity/enemy is touching a line and it is the closest thing to the player, than you can see it, while still seeing what's behind it (Up until it hits a solid building, or similar). This is the easiest way I can think of with the most efficient result; Check if Building/Entity/Etc, check distance to player, if > 0 and < nextEntity (Default of "nextEntity" would be null), then show. Etc, etc. This would also simulate it being harder to see things at a further distance, as it would be more likely for the enemies to fall between the lines further away, just as you can't clearly see something the further away it is.
|
|
|
Post by Chiral on Jun 8, 2012 14:48:30 GMT
It's a nice idea, brett, and honestly I've already thought of stuff like it before when making a MGS-styled game. (Guards finding you, and stuff.) The main problem is and always will be that ActionScript 2/3 sucks so bad that the only collision detection I know how to do at the moment would take all those lines as not lines but boxes with the ends of the lines as corners. It would make a blindspot like so: One solution could be like this, but it would take a lot of work for the pc, and wouldn't be viable for a flash game (Maybe if we made it an exe it could work): 1) Have this grid fixed to the player's position and orientation. It would be awkward, but possible. You wouldn't need the boxes marked red here, we don't need to worry ourselves with them. 2) I added a bit of extra wall here to illustrate stuff later. Basically, you test to see if the first two boxes collide with anything. They don't, which is good. 3) We look at the next row, and oh noes one of them calls on a hit test. That square is marked as blocked, and future squares are marked as not visible (Note, marked as blocked and not visible are 2 different things). 4) We move on to the next row and the next and so on and map which squares are blocked or not. We don't have to check squares marked not visible from previously blocked squares, and we get a semi-accurate line of sight system. As said before though, assuming nothing blocks the field of view, even this simple inaccurate model requires 26 tests. Per character. Assume we have 6 characters in a squad. Oh, and that we're doing this about 30 times a second. That's meant to be 4680 tests a second, not even including enemies. THEN think that this model's rather innaccurate, and a finer grid would probably be needed, turning that 26 into 50, or 100... Which is why, although it's possible to do, I really really don't want to do line of sight stuff. Unless there's another, better way I haven't found yet.
|
|
|
Post by CavGunner on Jun 8, 2012 20:15:29 GMT
I'll keep thinking of different ways. So far...my way SEEMS to be the best, as I keep thinking of coding and clunkiness problems with the way you have it... :/ I'll also look into some better object collision script for you in ActionScript. I'd write it myself, but I can't remember anything about AS xD Now...if you did this in Turing, I'd be right on that shit. It's all been fucking burned into my brain.
But yeah, I'll see what I can do about thinking of other possibilities apart from the 2 that we have.
|
|
|
Post by Chiral on Jun 18, 2012 20:10:49 GMT
I'm tempted to do line of sight the way I said on steam, honestly.
That... and maybe have vision be purely distance-based. If the enemy's behind a wall, you should still be able to hear them... If line of sight worked perfectly I could make it so you had position but no other details about the enemy; but whatever.
Depending on how serious the game is I could come up with an excuse... or just lampshade it.
|
|
|
Post by CavGunner on Jun 19, 2012 23:27:31 GMT
I'm tempted to do line of sight the way I said on steam, honestly. That... and maybe have vision be purely distance-based. If the enemy's behind a wall, you should still be able to hear them... If line of sight worked perfectly I could make it so you had position but no other details about the enemy; but whatever. Depending on how serious the game is I could come up with an excuse... or just lampshade it. Hmm. If you want to work on position, you can just get the angle of the entity from where the character is looking toward where the entity actually is. Easy enough. But yeah, that works ^.^
|
|
|
Post by Chiral on Jul 14, 2012 1:30:31 GMT
I finally decided to spend a bit of time to work on the game, and have added 2 new features. While not properly implemented yet, I now have the code ready for walls players can't walk through and scrolling the screen. In this version, Hovering the mouse over the top of the screen scrolls the game up, but not the HUD. Just the top. Also, the wall there only works for player one, and only from the left. I'm just figuring out how to do it right now, rather than building a whole level to explore. That's next, I guess. www.mediafire.com/?xgy2yp217bw6moaComments, criticism, worship (ha) appreciated. ^^
|
|
|
Post by CavGunner on Jul 14, 2012 19:30:42 GMT
Okay, bug reports: 1) Players don't move with the scrolling, either (But I think you knew that). 2) You can enter the bottom of the wall, move up as far as you want, and exit at any point. 3) The "Switch characters" thing is REALLY touchy...you have to basically tap it lightly to get it to change, else it rapidly switches :/ 4) You spelled "Start" wrong in the game file (As "Strat").
That's all I could find so far ^.^
|
|
|
Post by Chiral on Jul 15, 2012 0:08:31 GMT
1 is fixed, 2 was intentional, 3 was... eh, I might change it later and 4... well it was meant to be short for strategy, not start. I'll change the name later, you fool.
|
|
|
Post by Chiral on Aug 3, 2012 6:12:10 GMT
So I was thinking about how combat will work... and meh, Here's a very simple (well not really) breakdown of my ideas:
If hit: .....................-If shields>0: ......................................................-If crit, shields=0, continue to armour damage calculation (attack becomes no longer a crit) .......................................................-else .......................................................................-If damage>shield, reduce damage by shield, shield=0, continue to armour damage calculation .......................................................................-If shield>damage, reduce shield by damage, attack over. .....................-If shields=0: ...................................................... -continue to armour damage calculation
.....................-If armour>0: ...................................................... -If crit, damage dealt is done to both vitals and armour, attack ends ......................................................-else .......................................................................-If damage>armour, reduce damage by armour, armour=0, continue to vitals damage calculation ....................................................................... -If armour>damage, reduce armour by damage, attack over. ..................... -If armour=0: ......................................................-damage of attack goes to vitals damage.
On getting vitals damage a player would suffer massive penalties to things like run speed and accuracy, and might get fatal wounds that need to be tended to (like, bleeding out or something)
Whether I actually have rechargeable shields... depends on the scenario. I guess. But it could work easily enough for an alien invasion scenario or something, and would give players something to research, definitely xD
About the crit chance. I figure, that even with a lot of armour on there's gotta be some kinks in there somewhere, where if the bullet hit the right spot it would bypass the armour completely. So yeah. Having *good* armour would reduce your crit chance, and likewise, being shot with an armour piercing round would increase the chances of a critical hit. So... Now it's planned... I gotta code it in as2 *sigh*
*EDIT* OOO LOOK A POLL YOU SHOULD VOTE OR SOMETHING.
|
|
|
Post by CavGunner on Aug 4, 2012 4:03:48 GMT
I really hope you're doing it how we talked about that one time. But if you do...you're going to have a lot of fun coding it this way... xD
So many calculations. I'll help you optimize it a bit when it's all said and done so that you won't have literally thousands of these calculations running at one time in the game, breaking the internet (And my webhost).
|
|
|
Post by Chiral on Aug 4, 2012 5:04:10 GMT
Yeah... I'm pretty much doing it that way. As I said before I'll probably give armour a "coverage" stat or something and maybe another one for stopping power. coverage would set the base chance for a crit, and the actual armour quality would be weighed against the penetration value of the weapon for a second bonus. If I get an awesome artist to work through this once I'm done coding, I might even have different death animations for if they're hit or killed by a critical hit. But we'll see, I have to get that far... xD
|
|
|
Post by CavGunner on Aug 4, 2012 18:33:53 GMT
Aye, that Shield -> Armour -> Vitality setup is really good. It's sort of what I'm doing for LoR. Magic Defense -> Solid Defense -> Immunity -> Stats -> Health That "Different Death Animations" would be cool
|
|
|
Post by Chiral on Aug 12, 2012 20:48:22 GMT
|
|
|
Post by CavGunner on Aug 12, 2012 23:17:17 GMT
That thing he made is kinda like what I had awhile back. Where if you type in your level, it would generate a mob for you. Goooooo copying! ^.^
|
|