• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Zomis

Members
  • Content count

    32
  • Joined

  • Last visited

Community Reputation

122 Neutral

About Zomis

  • Rank
    Member
  1. Ever played the classic "Minesweeper" game? Minesweeper Flags is just like the classic game but reversed and played against an opponent, you need to grab more mines than your opponent does. With Minesweeper Flags Extreme, you can play Minesweeper Flags against 5 computer AI players, or in a local hot-seat game, or in online Multiplayer mode Minesweeper Flags Extreme Announcement thread of version 1.0 New features in version 1.1: - New graphic sets: Switch between Alan Bond's new graphics set and the classic Minesweeper Flags graphics from the Options screen. - Slightly improved interface - New computer AI: AI Loser - "Expander Rule" resets the game if open field is found before any player has found a mine. Can be turned off in options - Leave Multiplayer games and continue them at a later time - Animated bomb explosion with Alan Bond's graphics And lots of bug fixes and other features! Upcoming features for the near and not-so-near future: - Play custom games with various layouts, sizes and amount of mines, and various rules - New computer AI: AI Extreme - Lessons, practices and other fun challenges!
  2. After having made a turn-based Multiplayer implementation of Minesweeper Flags at my site, I want to go into real-time Multiplayer development. The turn-based Minesweeper Flags game can be found here: http://www.zomis.net/games/flags The easiest real-time multiplayer thing that came to my mind was to have two squares travel around the playfield. I've made it working, but it isn't synchronized. When player1's x-position is 110 for Player1, Player1's x-position might be 104 for Player2. Only 6 pixels difference, but in realtime Multiplayer it must be perfect. All players move 10 times per second - a local timer controls this movement. I'm working in Flash (ActionScript 3.0) and using a PHP script as the server. I've implemented it so that any command that a player executes (change speed or change direction) is first sent to the server, then being sent back to all clients. And then all clients execute the action for the correct player. So what techniques should I use to make my games synchronized? I don't want to send too much data back and forth all the time, there has to be a better way, right?
  3. Quote:Original post by d000hg I don't actually see how I'm supposed to find what version I have installed... from within FireFox I see no add-on or Flash-related settings, and in my "Installed Programs" in Control Panel I only see "Flash 9 ActiveX" which isn't helpful :) This site will tell you your installed version: http://www.macromedia.com/software/flash/about/ (This site can be accessed from the right-click menu item "About Flash Player" when viewing any Flash file)
  4. Quote:Original post by d000hg It won't let me play; says I need Flash Player 9. Since I do Flash development I have a pretty recent version, so either you are using some very new release or something is wrong. Make sure that javascript is enabled in your browser as well. I've set it to require 9.0.45 If you do have javascript enabled and 9.0.45 or above, something is very wrong, in which case I'd really like to be notified.
  5. I've changed the layout of the menu lately, now also containing a little box which briefly explains what the game is about. I've heard from some that the user interface needs improvement. It's a statement I agree with, because I know that I'm not too good at designing interfaces. Because of this I'd really like to hear what you think of it, and suggestions about how it can be approved.
  6. Quote:Original post by WanMaster That's a great little game! I would love to play that on my mobile phone. Maybe it's there and I was unable to find it, but it would be nice to have a help screen in the game. For instance, I still don't know what the use bomb button really does.Thanks a lot :) I have no experience at all about mobile phone development, but I hope there are mobile phones which can handle Flash, if so then there might be a version for mobile phones in the future. There is no help-screen in the game yet, I planned on creating "Lessons" to learn people how to play the game, those were meant to only cover the basics of finding mines though. But creating one single help screen should not be much trouble. I'll work on that!
  7. I can honestly let you know that none of the AIs are cheating! I have spent countless of hours programming Hard AI. He sees exactly the same map as you do. But I know how you feel, he is darn lucky sometimes... But can most of the time be beaten with enough skill. But don't feel bad if you don't beat him that often, or at all, I know few people who beats him often..
  8. After 6 months of intensive programming, I've now finished my first "real" official game: Minesweeper Flags Extreme Basically, it's a multiplayer version of Minesweeper where the objective is to find more mines than your opponent. Player take turns clicking on fields and the one who is the first to get 26 or more mines wins the game! You can play against 5 difficulty levels of computer controlled opponents You can also enter Online Multiplayer mode to play against any player who is online! There's also replays avalible, so you can see your own played games or games played by others! It's made in Adobe Flash CS3 Professional, ActionScript 3.0 PHP Sockets is used for online multiplayer support. [Edited by - Zomis on June 18, 2008 4:23:59 AM]
  9. This isn't so important, but it would be nice if someone could help me with it. I'm trying to make the above function work with an array parameter instead of an "arr: int" parameter. This is my implementation attempt. function ncrcombo3(x, r: int, arr: Array): Array { if ((r < 0) || (r > arr.length)) return null; if (r == 0) { trace("Mode 0"); if (x == 1) return new Array(); else return new Array();// failure } else if (r == arr.length) { trace("Mode 1"); return arr.slice();// All are included in solutions } else if (x <= nCr(arr.length-1, r)) { trace("Mode 2"); return ncrcombo3(x, r, arr.slice(0, arr.length-2)); } else { trace("Mode 3"); var o = ncrcombo3(x-nCr(arr.length-1, r), r-1, arr.slice(0, arr.length-2)); o.push(arr); return o; } } var n = 4; var r = 2; for (var i=1;i<=nCr(n, r);i++) trace(ncrcombo3(i, r, new Array('a','b','c','d'))); And here's the output: Mode 2 Mode 1 a,b Mode 2 Mode 1 a,b Mode 2 Mode 1 a,b Mode 3 Mode 2 TypeError: Error #1009: Cannot access a property or method of a null object reference. at flags_fla::MainTimeline/ncrcombo3() at flags_fla::MainTimeline/myfla::frame1() So first of all: The combination result seems to always be the same And secondly: The TypeError :/
  10. Thanks a lot for your code, ToohrVyk, I had some problems with the implementation but they're solved now. (All that's left is using an array of objects instead of plain numbers, but I think that isn't too much problem). Here's my implementation, ActionScript 3.0 (Flash) code function nCr(n, r: int): int { return nPr(n, r) / nPr(r, r); } function nPr(n, r: int): int { var res = n; for (var i=n-1;i>n-r;i--) res = res * i; return res; } function ncrcombo2(x, r: int, arr: int): Array { if ((r < 0) || (r > arr)) return null; if (r == 0) { if (x == 1) return new Array(); else return new Array();// failure } else if (r == arr) { var a = new Array(); for (var i=1;i<=arr;i++) a.push(i); return a; } else if (x <= nCr(arr-1, r)) { return ncrcombo2(x, r, arr-1); } else { var o = ncrcombo2(x-nCr(arr-1, r), r-1, arr-1); o.push(arr); return o; } } var r = 3; var n = 5; for (var i=1;i<=nCr(n, r);i++) trace(ncrcombo2(i, r, n)); gives: 1,2,3 1,2,4 1,3,4 2,3,4 1,2,5 1,3,5 2,3,5 1,4,5 2,4,5 3,4,5 The combinations wasn't in the order I expected, but since they're combinations, the order is not important ;)
  11. "A combination is a set of objects in which order is not important." http://www.regentsprep.org/Regents/math/combin/Lcomb.htm Let's say that I have x objects, and I want to choose y of these objects. How many combinations can I get? Answer can be found on the site above, it's equal to: nCr(x, y), which translated into a programming language would be: function nPr(n, r) { result = n; for (var i=n-1;i>n-r;n--) result = result * i; } function nCr(n, r) { nPr(n, r) / nPr(r, r); // nPr(r, r) == r factorial (r!) } OK, so now we know how many combinations we can make out of these y of x objects. Now we want to find combination number z. How to do this? To show an example of what I mean, take a look at this function, and the explanations below it: function nCr_combo(n, r, z: int, arr: Array): Array { var combos = nCr(n, r); if (x > combos) return null;// Invalid combination number if (x <= 0) return null;// Invalid combination number // pick correct elements from array, depending on the value of x } So let's say we have the array arr = [a, b, c, d] And nCr(arr.length, 2) returns 4*3 / 2*1 = 6; // we have 4 items, we choose two of them Then nCr_combo(arr.length, 2, x, arr) equals, depending on the value of x: 1: ab 2: ac 3: ad 4: bc 5: bd 6: cd a found in 1,2,3 b found in 1,4,5 c found in 2,4,6 d found in 3,5,6 So if I call nCr_combo(arr.length, 2, 4, [a,b,c,d]) then it should give me an array with the 2 items [b, c]. (As the list above says, "4: bc"). And for another array, arr = [a, b, c, d] And we want three items: nCr(arr.length, 3) = 4*3*2 / 3*2*1 = 4;// 4 combinations nCr_combo(arr.length, 3, x, arr) = 1: abc 2: abd 3: acd 4: bcd a found in 1,2,3 b found in 1,2,4 c found in 1,3,4 d found in 2,3,4 My problem is: How to assign the correct items to the array to be returned? Code in any language is accepted (the targeting language will be Flash, ActionScript 3.0). Any mathematic thoughts about how to know which items to return are also welcome.
  12. algumacoisaqualquer, seems like you're right. See the damage formula link below. Darkstrike, thank you very much for that link. I've noticed the "unit mathematical analyzis" which is also avalible on that site, here: http://www.gamefaqs.com/computer/doswin/file/63965/42498 . That seems interesting. I've found a link where the damage formula in Heroes 2 is exposed: http://www.heroesofmightandmagic.com/heroes2/damageformula.shtml So Heroes 2 and 3 is truly very similar at this point. About Terrain bonuses, I doubt that's the reason. I think that the terrain bonuses (which I have heard of from somewhere else as well...), are added to the creature's attack/defence skills. So there has to be another reason behind it (if it's just not pure human error - i.e. I have written down the wrong numbers that was shown on the screen, or pure randomness, or something else).
  13. Quote:Original post by CIJolly Yeah, it is an interesting problem. I've always wanted to know how Rome: Total War resolves it's combat calculations. I wouldn't have the mathmatical ability to sit down and reverse engineer it though.If you have time, then you could try to learn the ability. (And so apparently I've had waaaay to much free time lately). Unfortunately, I have never played Rome: Total War. But if I ever do, I might try to figure out that calculation as well ;) Quote:Darkstrike Googling yields what you essentially already formulated: every attack point over the defence gives +5% damage, every defence point over the attack takes away 2,5% of the damage. And this was the case for HOMM2 as well, so it sounds likely.Thank you VERY MUCH for solving that problem for me! I can't believe it was as simple as that... I did try to google before I asked here, but didn't find any such information. What did you google for, and which page did you found? Maybe there's more information there I could have use for. There's some occations where the 2,5% are instead between 2,33% and 2,88 percent or so, but I think that's ok anyway. (But of course, I wish I could find out the reason why it behaved like that...) Two of those special cases is: 100 Gogs (7; 2-4) Green Dragon (26) 100-210 Attack-Defence = -19 Result->Min = 50,00% of Source->MinDamage*Count -50/-19 = 2,63 100 Gogs (7; 2-4) Green Dragon (22) 130-250 Attack-Defence = -15 Result->Min = 65,00% of Source->MinDamage*Count -35/-15 = 2,33
  14. I started thinking for some days ago, when I took a break of programming by playing Heroes of might and magic 3, then I realized that this battle system is just what I need for my future game development ideas! And so I started thinking, how do they work really? Pretty soon I found the important factors... The important factors are: (Source = The unit which is going to attack, Target = The attacking target/the defender) Source: Count Attack Skill Minimum Damage Maximum Damage Target: Defence Skill And the result, luckily the value isn't just randomised and then the effects is shown to the player, but in tactic combat you can see the randomisation range of how much damage is inflicted by your unit by hovering on the target. It says something like "Shoot Green Dragons (12 shots left, 100-200 damage)." I will call these values (100 and 200 in this example) Result->Min and Result->Max. I very quickly found out that the skills of the hero is added to the creature skills. So if you have a creature with an attack skill of 7, and it's hero has an attack skill of 5, then the creature will have an attack skill of 12 (7+5). After an hour or two I found out that the Source->Count value simply multiplies the result. A group of 10 creatures inflict twice damage than 5 creatures of the same type. And after finding out the above, I noticed that the values has to be fractional, because 100 creatures would inflict a minimum damage of 220 or so, while only one creature of that type would inflict a minimum damage of 2. So that "2" value has probably been rounded down from "2.2" However, I still haven't found out how the attack and defence skills are used. I have found out that the Result->Max is calculated from Result->Min and the values of Source->MinDamage and Source->MaxDamage in this fasion: Result->Max = Result->Min * (Source->MaxDamage / Source->MinDamage) But then I had to find out, what exactly is the formula of calculating Result->Min? Below I have a couple of attacks I've tried to analyze, but note that the creature's skills (Attack and Defence) has been modified by the hero's attack and defence skills. 100 Gogs (Attack 8; Damage 2--4) Wood Elves (Defence 8) Result range: 200--400 The above shows clearly that if Attack = Defence then Result is simply Source->Damage * Count. 100 Gogs (Attack 10; Damage 2--4) Green Dragon (Defence 21) Result range: 145--290 100 Gogs (Attack 10; Damage 2--4) Green Dragon (Defence 26) Result range: 120--240 100 Gogs (Attack 10; Damage 2--4) Green Dragon (Defence 30) Result range: 100--200 In these 3 battles with 100 gogs against green dragons, I notice a pattern. For each defence point that is added to the green dragons, 5 is substracted from Result->Min (and Result->Max is adjusted accordingly, making the Result ratio propotional to the Source->Damage ratio). But where does this 5 come from? Could it be as simply as Source->Attack / Source->MinDamage? Oh no, apparently not... 4 Efreet (Attack 16; Damage 16--24) Boars (Defence 12) Result range: 80--120 4 Efreet (Attack 16; Damage 16--24) Dwarfs (Defence 15) Result range: 70--105 In the above 2 attacks, the efreet does 10 less damage if the defence value is increased by 3. So instead of that 5 we had with the 100 gogs and the dragons, we now have a value of 3.3333, and I still wonder: Where does this come from? Or should it simply be ignored, is it of no importance? And so, a few more battles: 100 Wood Elves (Attack 10; Damage 3--5) Gogs (Defence 5) Result range: 375--625 3 Monks (Attack 13; Damage 10--12) Centaurs (Defence 3) Result range: 45--54 18 Archers (Attack 7; Damage 2--3) Centaurs (Defence 3) Result range: 43--64 This is just some battles I've been working with. I will start to work more with 100 creatures instead of just 3 or so... since fractional integers have that much of an importance. If you have any ideas for the formula/algorithm used in Heroes of might and magic 3, please let me know! And by the way, if anyone has any links to articles going through similar battle calculations in similar games (not only turn-based but also Warcraft, Starcraft, Age of Empires, etc.), I'd really like to take a look at them. They could be very interesting. Since the battle system is such important part of the game.
  15. Quote:Original post by TheAdmiral Sorry - I was using C++ notation for the floating values. By 10.1f-20 I just meant values continuously in the range [10.1, 20] (which is incidentally, almost equivalent to what you just described). My intention was to have the horse move x steps per turn where x could be fractional.Ok, then I understand. I think that would be the best solution, yes. I'm having a few more ideas in mind though, but as you said earlier "Let's keep it simple for now" ;) Anyways, my new idea was that each horse had a deltamove value, so that their next move is randomized based on their last move + a randomized delta value. So the deltamove value defines how much faster/slower the horse will go this turn compared to the last turn. Deltamove has a min and a max value of course. I'm not sure at all if that would be a good thing to add, I'm afraid it'd only make the racing be even more unfair. Quote:Quote:The problem with long tracks is that the longer the track is, the advantage for a "faster" horse grows - as the horse has more time to extend it's track advancement compared to the other horse.Again, we have crossed wires. By 'long track' I just meant a sufficiently large sample-space to produce a reasonable probability. As it turns out, I got this wrong anyway [dead] - as you say, the longer the track, the shorter the odds.Yes, so it seems like a track shouldn't be too long and not too short. But I think a value of 100 is quite good, at least for now. I've made it so that horses can have longer or shorter tracks (something like inner or outer track, or the track length can define which races they are allowed to compete in, and so on. So the track length will remain a variable - unless someone convinces me to make it constant.) Quote:Edit: I've had a think, but I'm still a little stuck.So am I, I'm afraid. I've also tried working with the probabilities lately. Quote:We've established that P(j) is the expected distance that horse (j) will travel each turn. We also need to take into account the length of the track, L, say. As I see it, the probability that horse (j) is the first one to the finish line is: P(j)win = P(j) has travelled L or more . PNo other horse has travelled L or more Is the "." notation in that equation a Dot product? Quote:The notation is getting a little unwieldy, but I'll persevere. Both factors are sums-to-infinity of Bernoulli random variables. I can get the first one into a closed form, but not the second. P(j) has travelled L or more = P(j) has travelled exactly L + P(j) has travelled exactly L+1 + P(j) has travelled exactly L+2 + ... P(j) has travelled L or more = (P(j))L + (P(j))L+1 + (P(j))L+2... P(j) has travelled L or more = ∑∞i=L(P(j))i P(j) has travelled L or more = (P(j))L / (1 - (P(j))) I'm in no hurry to type that out again. That last step is closure of a geometric series. I'm not so sure that the second factor generalises past the two-horse case, though: PNo other horse has travelled L or more = PNo other has travelled exactly L + PNo other has travelled L+1 + P has travelled L+2 units + ... PNo other horse has travelled L or more = ∑∞i=L 1 - (1 - P(j))i I feel I should step aside and let someone more qualified take over before my fingers drop off... Any takers? AdmiralThe probability part is indeed complicated, I'll continue to check wikipedia topics about this part. If anyone knows a good probability article that can be useful to me, please post it. My approach towards the probability problem is more like For horse i to win, horse i must have moved >= all other horses. And if H1 has a property (min-max/length) of 1-3/5 and H2 has 2-3/5. Then at turn 1 there's 6 probabilities: H1 1 H2 2 - H1 has 4 steps left, H2 has 3 steps left. H1 1 H2 3 - H2 will win no matter what. H1 2 H2 2 - H1 3 left, H2 3 left = Game equal H1 2 H2 3 - H1 3 left, H2 2 left = H2 has advantage H1 3 H2 2 - H1 2 left, H2 3 left = H1 has advantage (this is the only occation where H1 will gain a small advantage on the turn) H1 3 H2 3 - Both has 2 left, game equal. And then do a descision tree or something like that based on these values. I'm not sure if this is a realistic way, but since I'm not an advanced probability mathematician, I hoped that this approach could make me find a faster algorithm. None found yet though :/ I've found some other values that might be interesting in this problem, I don't know how they could be used to find a probability chance though... (L = track length, min = minspeed, max = maxspeed) Average turns to finish race = L / ((Max + Min) / 2) Min turns to finish race = L / Max Max turns to finish race = L / Min "TurnRange" (I don't really know what to call it, and I don't know what to use it for either... I almost don't even know what it actually calcs.) = (L / Min) - (L / Max) "TurnRatio" (same as with "TurnRange") = (L / Min) / (L / Max) (By the way, of course I want an algorithm that will work with more than 2 horses as well... but 2 horses is easiest to start with). I hope someone can continue to discuss this probability with me (TheAdmiral is very welcome!), 2 brains think better than one. Now I'm off to wikipedia to study some more so that I can understand those formulas to 100 percent... or at least 99...