|
So I started reading this thread at the beginning a few days ago, but once the age of the first posts registered with me, and everyone was still talking about XNA 2.0 (and I just grabbed 4.0) I skipped ahead to posts from this year at least. Anyway....some great advice so far from what I've seen. I have dabbled in game programming before, but the last 4-5 years have been doing almost exclusively .NET CRUD web apps in C#/Linq/etc. I have conceived what seems like a solid idea for a game, and based on some things in this thread - it has mutated somewhat into improvements over the original concept. So after having the "write a game, not an engine" mantra firmly wedged into my wazoo I grabbed Unity this morning and worked through the 2D platformer tutorial and will be working through the 3D one as well. As an aside: I have the following to say about Unity: It's very very slick, and I assume once I get into actually scripting my own game logic for the prototype I will feel like I'm getting more education out of it. But really - using prefabs and ready made scripts and such I don't feel like I'm learning a THING so far about actual game architecture. I get how it all works in Unity. You can attach Thing A to Thing B, and set properties on both Things that get updated, etc. But I dunno - it almost feels like just a more complicated version of GameMaker or something built for non-programmers. That being said, I think it will be a useful tool to prototype my game - and assuming the idea is sound - go from there. Another maxim I have picked up in this thread is "what engine should I use for my game?" is best answered by "depends on your game." So here's what I'm shooting for: Turn-based strategy game, with 2 main "interfaces": World Map - sort of like Risk. Top down (or fixed angle) camera, movement only in XY axes. The map is divided into territories, and at one end you have a base which generates new units at a rate which depends on how much territory you actually own. The only functions which are handled here are: - moving units from territory to territory (either by group or individuals) - queuing up which units you wish to build Since the view is from a fixed height and encompasses the entire (scrollable) world map - I may not even bother with 3d models here save for buildings and maybe not even then. Everything is designed to just be representational in a strategic planning sort of way. Anyway, when each player has had a turn moving Units on the World Map, any territory which they BOTH have units in is considered "contested" which leads to the other interface: Battle Screen - sort of like Battle Chess or even Archon if you can remember that far back. 3D space, player controlled camera. 3D models for each Unit. The combat is based on a grid, so the grid would be overlaid on top of the terrain, and each player is allowed to place their units on their own side of a Neutral Zone in the middle of the playfield. Once both players have placed units, the skirmish begins. For each player's turn, each unit can either Move or perform an Action (attacking, special ability, etc). Rinse-repeat until one side is defeated, at which point that Territory is now under control of the winner. Return to the World Map and if there are any contested territories left, the winner picks where the next skirmish occurs, until they are all decided. Play then returns to the World Map where the strategy turn occurs. The nice thing about it all being turn-based is: aside from models colliding with the floor, I don't need much at all in the way of collision detection. All attacks/abilities have a range and area of effect measured in grid squares. If say an explosion has a radius of 5 squares from the target square, then anything within that area of effect is affected. Easy peasy. SO - all that being said, and assuming the prototype doesn't suck and it's something I wish to proceed forward with - can anyone recommend an engine that might be suitable for handling that kind of stuff? And before I get berated for trying to do too much: my plan is to prototype the World Map first, with only ONE type of Unit, with any combats being resolved by toss of the dice. Then I will prototype Combat, again with only ONE unit type. I use an Iterative approach in my daytime programming job, so will be shooting for the same thing here. Baby steps. Hell, a friend and I are going to sit down and tweak the combat rules using miniatures and dice before I do ANYTHING else. I understand my goals are lofty ones.
|
# ¿ Feb 15, 2011 19:27 |
|
|
# ¿ Apr 26, 2024 23:52 |
|
roomforthetuna posted:I'm not sure I understand your complaint - Unity is too easy? Wasn't really a complaint so much as an observation. I guess I will see how well Unity performs for what I want to do when I get far enough along. I guess I'm just used to being a coder - so the drag and drop thing is sort of alien to me.
|
# ¿ Feb 15, 2011 20:52 |
|
Paniolo posted:I'd suggest deciding if you want this project to be about making a game, or programming a game. Because if you're turned off by not writing code, then my advice is to just work on a programming project, like a hobby engine or tech demo. If you actually want to make a finished game then use Unity or GameMaker or mod an existing game or whatever is at your disposal, because actually making a game is such an enormous amount of work that an individual simply cannot afford to not take every shortcut possible. Well, I will probably go ahead with prototyping on Unity at least. If the game ends up being awesome enough to warrant going with a more ground-up route then we can address that when the time comes. I'm working with one other developer and are talking to a few artist friends. Both of us devs have 10+ years of C# experience, but he has ZERO game programming experience and as I've said - I've only dabbled. I'm hoping that doing it in Unity and getting it up and working will give us some idea of how we might implement on our own, should we go that route.
|
# ¿ Feb 16, 2011 01:02 |
|
Anyone got a good recommendation on a decent HLSL reference book? Don't really need a "Teach Yourself...." just more of something like a Cookbook.
|
# ¿ Feb 21, 2011 17:48 |
|
Rocko Bonaparte posted:
Can't help with your model loading/animating problem, but having ZERO 3D modelling experience myself, I set out to learn Blender and found this, which worked pretty drat well: http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro I dunno about all the way to "Pro" but I definitely go from "Noob" to "Passable" using that.
|
# ¿ Mar 4, 2011 01:26 |
|
Mustach posted:Then use an engine like libtcod instead of writing one from scratch. This. libtcod is really nice, can be called from nearly any language you can think of and let's you concentrate on what you JUST said - taking your ideas and turning them into something concrete. You will hear it repeated ad nauseum in this thread: make a GAME, not an ENGINE, unless as already pointed out - you want to be an engine developer. I messed around with libtcod and had something up and running about literally an hour.
|
# ¿ Apr 19, 2011 16:39 |
|
Messing about with some Minecraft stuff, and I feel dumb for asking this, but I can't think of a way to create the algorithm. MC's world is divided into square chunks: 16x16x128 regions of the world. I am trying to run a search for X number of chunks away from a specific chunk. So if I am on Chunk A, and my search radius is 1, then the search should encompass A + the 8 surrounding chunks. Search radius of 2 would add the next "ring" outside that for a total of 25, etc. I'm sure there's some way I can leverage the fact that these are all odd numbered squares (3x3, 5x5, 7x7, etc). But heck if I can figure out how to. I have access to functions like "GetNorthNeighbor()" but it seems tedious and silly to go A -> North -> East -> South -> South -> West -> West -> North -> North. And even sillier to keep doing that the further out I go. Suggestions? C# is the language I'm using if that helps.
|
# ¿ Feb 12, 2012 18:01 |
|
PDP-1 posted:Assuming the chunks are indexed in some way, would this work? They are stored by coordinates. Apparently MC uses a few internal coordinate systems. I am trying to figure out how to convert world coords into chunk coords so I can figure out which chunk the player is in, since that's where I want my search to be centered.
|
# ¿ Feb 12, 2012 19:46 |
|
I don't see a Minecraft-related development thread, so I figure I'll ask here just in case. Does anyone know the method by which Minecraft generates the initial player spawn based on the seed? All I can find from googling is a general "picks a location within a few hundred blocks of (0, 0) and tries to spawn, if it fails, it increments until it finds a valid location" And that's all well and good except it's not random. If I start a world with a particular seed, open it up, check my spawn coords, then delete the world and re-create using the same seed, I get the same spawn point. So...does anyone know what method it's using to choose? Thanks in advance.
|
# ¿ Feb 18, 2012 01:05 |
|
Zhentar posted:In this context, "seed" is short for "random seed". The whole point of entering the seed is that exactly the same "random" numbers will come up when you use it. Yeah I know. What I mean is, Minecraft is using that seed in some equation that sets the spawn point. I'm trying to see if anyone knows what that equation is.
|
# ¿ Feb 18, 2012 01:37 |
|
ShoulderDaemon posted:It is as you described. Minecraft picks a random point within a few hundred blocks of (0,0) until it finds one that's an acceptable spawn location. If it's random, then it wouldn't be the same every time the same seed is used. That's what I'm saying. Here's a test to prove it: Load Minecraft. Create a New World, Select More World Options Enter 1 as the seed Create World when it loads, don't move and hit f3 to look at your coordinates. You are standing at: (251.5, 65.6, 232.5) If it's random, then how do I know where YOU are standing? It's based on the world seed. I'm trying to figure out HOW.
|
# ¿ Feb 18, 2012 01:48 |
|
Orzo posted:I'm not sure I follow. The algorithm which generates worlds is using a random number generator with a seed. The algorithm which places the player is using the same seed. So it appears 'random', although it is deterministic when you give it a certain seed. As for what the algorithm is, you'd need the source code. Jeez, guys. I know how pseudorandom number generators work! The same as they have worked since time immemorial. I bolded the ACTUAL answer above. But I know other people have already decompiled and deobfuscated the code, so I was just asking if anyone knew the algorithm offhand or could at least point me in a direction other than "this is how random number generators work." MonsterUnderYourBed posted:There is a minecraft modding thread in Games which would probably be more able to answer your question. Ah-ha! I only looked in Cavern of COBOL. Thanks.
|
# ¿ Feb 18, 2012 02:01 |
|
westborn posted:
Bless you, sir. ZombieApostate posted:It's probably just doing something along the lines of x = randomNumber(), y = randomNumber(), z = randomNumber(), in which case, all you need to know is how random numbers are generated. It might be incrementing the coords by the random numbers or something so you don't repeat or run through all the spaces in whatever limit you supply your random number generator, but that isn't really much of an algorithm, which is, I think, why everybody is giving similar answers about how random numbers are generated. I spent a few hours last night wading through the Minecraft sources, but following the chain backwards from where the player is actually spawned only leads me to one spot where it's grabbing 3 int values from an NbtTree (which seems to work like a hashtable but can return multiple types instead of just one). I assume the tree is populated using the map seed but hell if I can figure out where that's happening. Specifically: from WorldInfo.java: code:
|
# ¿ Feb 18, 2012 16:01 |
|
Red Mike posted:No, he clearly doesn't. Here: I have no idea how this derail got so far so fast. I assure you, several condescending explanations aside, I know exactly how pseudorandom number generators work. Picking the coordinates for spawn is obviously not as simple as "hurrrrrr get the next number from the generator" because NOTHING in Minecraft is that simple. Chunk generation uses an algorithm which goes beyond "hurf durf here's another number from the generator." It uses a bunch of constant values PLUS the random numbers and does something that eventually results in a chunk full of blocks. It does the same thing with the spawn point, not just "grab 3 random numbers and check if that's valid, increment if it doesn't" In my second post I said: quote:Yeah I know. What I mean is, Minecraft is using that seed in some equation that sets the spawn point. I'm trying to see if anyone knows what that equation is. So FORGET I ever mentioned the words "seed", "random" and "pseudorandom". I REALIZE it's deterministic based on the seed provided to the random number generator. So let's pretend x, y, z are numbers pulled out of thin air. Minecraft then does something to those 3 numbers that results in Spawn.X, Spawn.Y and Spawn.Z. ALL I want to know is - what is something in this instance. And as I have already determined on my own, Minecraft loads up a hashtable (NbtTree) of all the pertinent game values, and then spends the rest of the time just doing lookups in that hashtable. I have found where it does the lookup in the table for spawn x, y, z. What I can't find is where those 3 values get populated into the hashtable. And as far as your "answer" - can you point me to the lines in the MC source where it does that? Or even just the class file it's in?
|
# ¿ Feb 18, 2012 17:34 |
|
Pfhreak posted:I think I see what's going on here. Most of us are abstracting your question of "How, exactly, does Minecraft generate a starting location?" into, "How do games typically generate a deterministic random set of variables?" For most of us, and for most of the questions in this thread, working at the abstraction level is pretty common for helping someone understand whatever problem they are working on. I agree with you, so let me be specific about what I am trying to do. I'm basically writing a map search/view utility. I am using Substrate which a C# library someone wrote for use with Minecraft. (Yes, I already am discussing this in a thread on the minecraft forums with the developer of Substrate). So basically, instead of needing to load a level.dat file, I am generating the map in memory from the seed. The map itself is generating perfectly. That's all Substrate built-in functions for the most part. However, the dev seems to have glossed over the setting of the initial spawn location part, because he just sets it to (0, 64, 0) and leaves it at that. So if I save my generated map and load it in MC and compare against the MC version, everything is the same except for the spawn point, because mine is always (0,0) and Minecraft is picking a different one. My search utility will search within a certain number of chunks from the player's location, or if it's a new world, from the spawn point. So I need to be able to determine the spawn point based on the world seed - which is how everything else is determined. ShoulderDaemon posted:World.java has getInitialSpawnLocation() which boils down to this: I want something more because I need to duplicate it elsewhere, and that description, while generally correct is useless for writing actual code. I will look at world.java to see if I can find what you're referring to. Thanks. Edit: one step closer. the 5 biomes returned are: forest, plains, taiga and two still obfuscated ones. That's closer, tho! HaB fucked around with this message at 18:34 on Feb 18, 2012 |
# ¿ Feb 18, 2012 18:21 |
|
Red Mike posted:*sigh* Red Mike posted:e: Christ almighty, I'm being pedantic and unhelpful. I'll stop this, my apologies. This. So much this. HaB posted:Does anyone know the method by which Minecraft generates the initial player spawn based on the seed? All I can find from googling is a general "picks a location within a few hundred blocks of (0, 0) and tries to spawn, if it fails, it increments until it finds a valid location" I bolded the only part you really needed to pay attention to. The other part was pointing out that the google results I was seeing kept saying "picks a random location blah blah" and I was pointing out that it's NOT random because I know how pseudorandom number generators work. I even said it's "based on the seed" at which point this dumb derail got started. K. I will stop now too. Great googly moogly.
|
# ¿ Feb 19, 2012 02:33 |
|
poemdexter posted:
I just started playing around with Love also. It's neat. My first Lua experience as well. Got a question tho, and since some folks in the thread are familiar with Box2D, maybe someone will know. I'm recreating the old "zombie infestation simulator" since it's complex enough to give you a good handle on the language/framework but not so complicated as to take forever. So I am generating a bunch of rectangles as buildings, each of which I am giving a love.physics.body and a love.physics.shape. When I go to actually spawn my zombies, I am using building.shape:testPoint() to see if the spawn point is inside a building (don't want). I think it's because I don't understand how the shapes work. The wiki says that the x/y args to newRectangleShape are "the offset along the x/y axis". Offset from what? The Body associated with the shape? here's my code to generate the buildings: pre:function generateBuildings() for i=1, buildingCount do local w = ((buildingMaxSize - buildingMinSize) * math.random()) + 1 local h = ((buildingMaxSize - buildingMinSize) * math.random()) + 1 local x = (mapWidth - w) * math.random() local y = (mapHeight - h) * math.random() local body = love.physics.newBody(world, x, y, 0, 0) local shape = love.physics.newRectangleShape(body, 0, 0, w, h, 0) buildings[i] = { Body = body, Shape = shape, X = x, Y = y, W = w, H = h } end end pre:function pointInBuilding(x, y) for i=1, #buildings do if buildings[i].Shape:testPoint(x, y) then do return true end end end return false end Anyone? Bueller? Anyone?
|
# ¿ Mar 13, 2012 00:05 |
|
poemdexter posted:shape So the center of the shape is the top left corner of the sprite? So assuming I offset by width/2, height/2 that should give me what I want, yes? Edit: yes, that worked. Thanks for the clarification.
|
# ¿ Mar 13, 2012 00:33 |
|
Blarg. Okay. I need some suggestions/advice. Forgive me, but this will likely be long. Working on a game that's sort of a mix of an RTS, Risk and say....Blood Bowl. It's turn-based. I am still trying to spec out the stats for my units (Good vs Evil) and I am running a bunch of combat simulations to see how well various combinations match up to each others. Right now I am sticking to pure combat units (no spell casters). So assuming each Unit has these stats: - HP (hit points/health) - AttackRating (how likely unit is to hit something) - Defense (how difficult the unit is to hit) - AttackDamage (how much damage the unit does when it hits) There is also a 1 in 10 chance of a Critical Hit (double damage) on a successful hit. So two example units to start, and these are the weakest units on either side and are fairly evenly matched.: peasant: HP 5, AR: 50%, Def: 15%, Dmg: 2 goblin: HP 5, AR: 45%, Def: 15%, Dmg: 2 My algorithm for resolving an attack is: pre:BaseChance to Hit = Attack.AR - Target.Def if(Random.Next(100) < BaseChance) if(Random.Next(10) == 1) CriticalHit(); else Hit(); else Miss(); So here's the issue: a 5v5 combat of the above units, selecting the first non-dead unit on the opposing side as a target, with each unit getting to attack once per turn (or 4 times per game day) takes anywhere from 9-15 turns to resolve. Team Good wins slightly more often, as expected since they have a slightly higher AR. But it's pretty even. That seems.....long to me. Here's why I say so. The game has two main "screens": A world map, which is divided into territories (10-20), like Risk. All you do here is move units from place to place. More territories controlled = more "build points" to make new units with. A Territory map, which will be either square or hex-tile based. This is where combat actually happens. When a team moves units into an occupied territory on the world map, it shifts to the territory map to resolve the combat. Now I know games of Risk can go on FOREVER, and it's not even resolving combat on an individual unit basis. The combat in my game works more like Blood Bowl. Each unit can either move or attack once per turn. That is: either move X number of squares, or attack any single opponent within range. But Blood Bowl games have a limited number of turns per half, which resolves the length problem. I certainly don't want a game that takes real-time DAYS to play a complete game of. So for perspective: in the above 5v5 combat, each player moves/attacks with each unit each turn. That's 10 actions per turn. Like I said - 9-15 turns to resolve using the params above. That's 90-150 actions. That's ONE territory dispute, and not even a big one. I can impose limits on how many units can occupy a territory, but even 10v10 doesn't seem unreasonable. So DOUBLE all that and you're talking 200-300 actions to resolve a single territory dispute. So yeah... So...I guess I'm looking for suggestions on overall design, to make this something that's actually feasible to play in a single sitting.
|
# ¿ Apr 3, 2012 18:14 |
|
Rocko Bonaparte posted:I'm thinking maybe look at Ogre Battle for some inspiration, since I think it's doing a similar thing with multiples attacking multiples. Well these are just the base units. There are 6 unit types for each side with varying stats/abilities. Here's an example combat run: pre:Peasant 1 is attacking Goblin 6 Peasant 1 misses! Peasant 2 is attacking Goblin 6 Peasant 2 misses! Peasant 3 is attacking Goblin 6 Peasant 3 misses! Peasant 4 is attacking Goblin 6 Peasant 4 hits Goblin 6 Goblin 6 takes 2 hp of damage! Peasant 5 is attacking Goblin 6 Peasant 5 hits Goblin 6 Goblin 6 takes 2 hp of damage! Goblin 6 is attacking Peasant 1 Goblin 6 misses! Goblin 7 is attacking Peasant 1 Goblin 7 hits Peasant 1 Peasant 1 takes 2 hp of damage! Goblin 8 is attacking Peasant 1 Goblin 8 hits Peasant 1 Peasant 1 takes 2 hp of damage! Goblin 9 is attacking Peasant 1 Goblin 9 hits Peasant 1 Peasant 1 takes 2 hp of damage! Peasant 1 is dead! Goblin 10 is attacking Peasant 2 Goblin 10 misses! day 0, turn: 1 Peasant 2 is attacking Goblin 6 Peasant 2 misses! Peasant 3 is attacking Goblin 6 Peasant 3 hits Goblin 6 Goblin 6 takes 2 hp of damage! Goblin 6 is dead! Peasant 4 is attacking Goblin 7 Peasant 4 hits Goblin 7 Goblin 7 takes 2 hp of damage! Peasant 5 is attacking Goblin 7 Peasant 5 hits Goblin 7 Goblin 7 takes 2 hp of damage! Goblin 7 is attacking Peasant 2 Goblin 7 hits Peasant 2 Peasant 2 takes 2 hp of damage! Goblin 8 is attacking Peasant 2 Goblin 8 hits Peasant 2 Peasant 2 takes 2 hp of damage! Goblin 9 is attacking Peasant 2 Goblin 9 hits Peasant 2 Peasant 2 takes 2 hp of damage! Peasant 2 is dead! Goblin 10 is attacking Peasant 3 Goblin 10 misses! day 0, turn: 2 Peasant 3 is attacking Goblin 7 Peasant 3 hits Goblin 7 Goblin 7 takes 2 hp of damage! Goblin 7 is dead! Peasant 4 is attacking Goblin 8 Peasant 4 hits Goblin 8 Goblin 8 takes 2 hp of damage! Peasant 5 is attacking Goblin 8 Peasant 5 misses! Goblin 8 is attacking Peasant 3 Goblin 8 hits Peasant 3 Peasant 3 takes 2 hp of damage! Goblin 9 is attacking Peasant 3 Goblin 9 misses! Goblin 10 is attacking Peasant 3 Goblin 10 misses! day 0, turn: 3 Peasant 3 is attacking Goblin 8 Peasant 3 hits Goblin 8 CRITICAL HIT! Goblin 8 takes 4 hp of damage! Goblin 8 is dead! Peasant 4 is attacking Goblin 9 Peasant 4 hits Goblin 9 Goblin 9 takes 2 hp of damage! Peasant 5 is attacking Goblin 9 Peasant 5 misses! Goblin 9 is attacking Peasant 3 Goblin 9 hits Peasant 3 CRITICAL HIT! Peasant 3 takes 4 hp of damage! Peasant 3 is dead! Goblin 10 is attacking Peasant 4 Goblin 10 hits Peasant 4 Peasant 4 takes 2 hp of damage! day 1, turn: 0 Peasant 4 is attacking Goblin 9 Peasant 4 misses! Peasant 5 is attacking Goblin 9 Peasant 5 misses! Goblin 9 is attacking Peasant 4 Goblin 9 misses! Goblin 10 is attacking Peasant 4 Goblin 10 misses! day 1, turn: 1 Peasant 4 is attacking Goblin 9 Peasant 4 hits Goblin 9 Goblin 9 takes 2 hp of damage! Peasant 5 is attacking Goblin 9 Peasant 5 misses! Goblin 9 is attacking Peasant 4 Goblin 9 misses! Goblin 10 is attacking Peasant 4 Goblin 10 hits Peasant 4 Peasant 4 takes 2 hp of damage! day 1, turn: 2 Peasant 4 is attacking Goblin 9 Peasant 4 hits Goblin 9 Goblin 9 takes 2 hp of damage! Goblin 9 is dead! Peasant 5 is attacking Goblin 10 Peasant 5 hits Goblin 10 Goblin 10 takes 2 hp of damage! Goblin 10 is attacking Peasant 4 Goblin 10 hits Peasant 4 Peasant 4 takes 2 hp of damage! Peasant 4 is dead! day 1, turn: 3 Peasant 5 is attacking Goblin 10 Peasant 5 hits Goblin 10 Goblin 10 takes 2 hp of damage! Goblin 10 is attacking Peasant 5 Goblin 10 misses! day 2, turn: 0 Peasant 5 is attacking Goblin 10 Peasant 5 hits Goblin 10 Goblin 10 takes 2 hp of damage! Goblin 10 is dead! day 2, turn: 1
|
# ¿ Apr 3, 2012 18:59 |
|
Centripetal Horse posted:Is there a reason that simply adjusting the Attack Rating and Defense numbers is not an option? It seems to me to be the simplest way to speed up combat. Glancing at your numbers, it seems that your example leads to around two out of three attacks missing. 2/3 attacks missing with these units, yes. The primary role for both is to hold territories. Each side has a mid-level fighter (Man-At-Arms/Zombie), and a high-level one: (Knight/Wolf). But then there's support units (healing spells) and offensive casters as well. So like here's an example run between a Knight vs 5 Goblins (should be a blowout for the Knight): pre:Knight 1 is attacking Goblin 2 Knight 1 hits Goblin 2 Goblin 2 takes 12 hp of damage! Goblin 2 is dead! Goblin 3 is attacking Knight 1 Goblin 3 misses! Goblin 4 is attacking Knight 1 Goblin 4 misses! Goblin 5 is attacking Knight 1 Goblin 5 misses! Goblin 6 is attacking Knight 1 Goblin 6 misses! day 0, turn: 1 Knight 1 is attacking Goblin 3 Knight 1 hits Goblin 3 Goblin 3 takes 12 hp of damage! Goblin 3 is dead! Goblin 4 is attacking Knight 1 Goblin 4 misses! Goblin 5 is attacking Knight 1 Goblin 5 misses! Goblin 6 is attacking Knight 1 Goblin 6 misses! day 0, turn: 2 Knight 1 is attacking Goblin 4 Knight 1 hits Goblin 4 Goblin 4 takes 12 hp of damage! Goblin 4 is dead! Goblin 5 is attacking Knight 1 Goblin 5 misses! Goblin 6 is attacking Knight 1 Goblin 6 misses! day 0, turn: 3 Knight 1 is attacking Goblin 5 Knight 1 hits Goblin 5 Goblin 5 takes 12 hp of damage! Goblin 5 is dead! Goblin 6 is attacking Knight 1 Goblin 6 misses! day 1, turn: 0 Knight 1 is attacking Goblin 6 Knight 1 hits Goblin 6 Goblin 6 takes 12 hp of damage! Goblin 6 is dead! day 1, turn: 1 Here's Wolf (AR: 80, Def: 60) vs 5 Peasants: pre:Peasant 1 is attacking Wolf 6 Peasant 1 hits Wolf 6 Wolf 6 takes 2 hp of damage! Peasant 2 is attacking Wolf 6 Peasant 2 misses! Peasant 3 is attacking Wolf 6 Peasant 3 misses! Peasant 4 is attacking Wolf 6 Peasant 4 misses! Peasant 5 is attacking Wolf 6 Peasant 5 misses! Wolf 6 is attacking Peasant 1 Wolf 6 misses! day 0, turn: 1 Peasant 1 is attacking Wolf 6 Peasant 1 hits Wolf 6 Wolf 6 takes 2 hp of damage! Peasant 2 is attacking Wolf 6 Peasant 2 misses! Peasant 3 is attacking Wolf 6 Peasant 3 misses! Peasant 4 is attacking Wolf 6 Peasant 4 misses! Peasant 5 is attacking Wolf 6 Peasant 5 misses! Wolf 6 is attacking Peasant 1 Wolf 6 misses! day 0, turn: 2 Peasant 1 is attacking Wolf 6 Peasant 1 misses! Peasant 2 is attacking Wolf 6 Peasant 2 misses! Peasant 3 is attacking Wolf 6 Peasant 3 misses! Peasant 4 is attacking Wolf 6 Peasant 4 misses! Peasant 5 is attacking Wolf 6 Peasant 5 misses! Wolf 6 is attacking Peasant 1 Wolf 6 misses! day 0, turn: 3 Peasant 1 is attacking Wolf 6 Peasant 1 misses! Peasant 2 is attacking Wolf 6 Peasant 2 misses! Peasant 3 is attacking Wolf 6 Peasant 3 misses! Peasant 4 is attacking Wolf 6 Peasant 4 misses! Peasant 5 is attacking Wolf 6 Peasant 5 misses! Wolf 6 is attacking Peasant 1 Wolf 6 misses! day 1, turn: 0 Peasant 1 is attacking Wolf 6 Peasant 1 misses! Peasant 2 is attacking Wolf 6 Peasant 2 misses! Peasant 3 is attacking Wolf 6 Peasant 3 misses! Peasant 4 is attacking Wolf 6 Peasant 4 hits Wolf 6 Wolf 6 takes 2 hp of damage! Peasant 5 is attacking Wolf 6 Peasant 5 misses! Wolf 6 is attacking Peasant 1 Wolf 6 hits Peasant 1 Peasant 1 takes 10 hp of damage! Peasant 1 is dead! day 1, turn: 1 Peasant 2 is attacking Wolf 6 Peasant 2 misses! Peasant 3 is attacking Wolf 6 Peasant 3 misses! Peasant 4 is attacking Wolf 6 Peasant 4 hits Wolf 6 Wolf 6 takes 2 hp of damage! Peasant 5 is attacking Wolf 6 Peasant 5 misses! Wolf 6 is attacking Peasant 2 Wolf 6 hits Peasant 2 Peasant 2 takes 10 hp of damage! Peasant 2 is dead! day 1, turn: 2 Peasant 3 is attacking Wolf 6 Peasant 3 hits Wolf 6 Wolf 6 takes 2 hp of damage! Peasant 4 is attacking Wolf 6 Peasant 4 misses! Peasant 5 is attacking Wolf 6 Peasant 5 misses! Wolf 6 is attacking Peasant 3 Wolf 6 hits Peasant 3 Peasant 3 takes 10 hp of damage! Peasant 3 is dead! day 1, turn: 3 Peasant 4 is attacking Wolf 6 Peasant 4 misses! Peasant 5 is attacking Wolf 6 Peasant 5 misses! Wolf 6 is attacking Peasant 4 Wolf 6 hits Peasant 4 Peasant 4 takes 10 hp of damage! Peasant 4 is dead! day 2, turn: 0 Peasant 5 is attacking Wolf 6 Peasant 5 misses! Wolf 6 is attacking Peasant 5 Wolf 6 misses! day 2, turn: 1 Peasant 5 is attacking Wolf 6 Peasant 5 misses! Wolf 6 is attacking Peasant 5 Wolf 6 hits Peasant 5 Peasant 5 takes 10 hp of damage! Peasant 5 is dead! day 2, turn: 2
|
# ¿ Apr 3, 2012 19:08 |
|
Centripetal Horse posted:If I read the log properly, the knight killed one goblin per turn, and each goblin took one action per turn. I mean, there is no way to shorten that if everybody gets one action per turn, and turns are evenly distributed. Is an initiative system out of the question? If the knight were acting 1.5x as often as the goblins, things would speed up. Yeah. He's 2 tiers above actually. I will have to play with the numbers some more. Time to write that config file loader so I can just edit them in a file.
|
# ¿ Apr 3, 2012 20:52 |
|
Manslaughter posted:Yeah about this game HaB, I just want to say misses in a turn-based game are the most fun-destroying things ever. Perhaps it's the masochistic Blood Bowl player in me, but that's sort of the gameplay I am trying to emulate with my combat. In Blood Bowl, one roll of the dice can screw you so hard your mom gets pregnant. I guess the chief difference is that in BB, that results in a turnover which means your turn is now done, whether you've finished moving players or not. There's a few other factors to the combat which I haven't taken into account yet. The time of day affects combat. Evil creatures are stronger at night, while Good creatures are weaker and vice versa. The only times they are unmodified are Dawn/Dusk. Also Fear comes into play. There is a chance of a unit being afraid of a more powerful unit, and if they are in Fear, they have to shake it off before they can move/attack. At the beginning of each Turn, units may have to take a Fear check (either by spell or ability). if they fail, they are in Fear. Their chances of shaking it off increase with each round, until they either shake it, or it wears off naturally. I'm wondering if the solution to making an entire game playable in one sitting is to give the player a way to opt-out of manual combat on a territory by territory basis. Like - the game just resolves the combat based on units, etc. and just tells the players the result. But if they want to play one manually, they have the option. At least you can skip over non-critical (strategically speaking) or stupidly one-sided combats this way. Like 5 Knights vs 2 Goblins. Goblins Die. Knights get the Territory - no combat needed. I still have plenty to do while I continue to ponder this. I haven't done any gameplay or rendering code yet. I think my next goal will be to get the world map up and working, with computer resolved combats. That will give me a good long while to think about all this crap. I'm kinda making two games in one here, but I can't see a way to make either component compelling enough on its own without having the other. Just the world map = basically Risk. Just the Territory/Combat parts opens up a bunch of other questions - how do you decide which units are there? Could be a point system like BB/WH40K uses. You get 1000 points to "buy" an army, arrange them on the battle field and fight it out. But there's some special units that add a lot of strategic value even from a World Map perspective that have strategic roles in combat, too. poo poo. I guess it's just too many variables to worry about it right now. until I have some code up and running with all the units in place, it will be hard to tell.
|
# ¿ Apr 3, 2012 21:22 |
|
seiken posted:I see a few fundamental problems with your design, let's see if I can articulate them properly. I guess I have jumped the gun in posting anything, and probably should have waited till I had all the units functioning before worrying about it. I have appreciated the advice so far, including yours. The strategy element enters in to timing, and again, if you've played Blood Bowl, this will make total sense. Let's say we're playing out a combat that is slanted fairly well in your (Good) favor on a pure AR/Dmg strength basis. If I can maneuver correctly, I can keep just out of your attack range until say Dusk, when I start to push in, timing it so that my units are in range right at Night fall. Now I get a large bonus to Attack rating, Defense, critical hit chance AND how much damage I do. Overall strength at least for that turn is overwhelmingly in my favor. Of course if I don't manage to even things up and get away until Day, then I am equally as screwed as you just were. Of course you have the same options, and I would need to impose some kind of limit - like if an entire day goes by with neither player actually making an attack then the territory remains undecided until after the next World map phase, at which point both players might adjust the number of units in that territory. But I feel ya, and admittedly, I have left out a whole bunch of things about the design. There are actually 6 units per side, and really only the lower 3 are just varying strengths of grunt/infantry units. The upper 3 for each side have more strategic value. Here's the unit layouts and a brief description: GOOD Peasant - weak, barely combat trained, easily prone to fear Man-At-Arms - medium strength/def, not quite as easily cowed as the Peasant Knight - heavy fighter, and more importantly - very mobile. Priest - basic support unit. Can fight okay, but better used as a healer, and can turn Evil creatures. Spells are Heal - just what it sounds like, and Bless - gives friendly units an increased attack rating and makes them less prone to Fear for a time. Seer - a spy unit essentially. From the World map can cast a spell to view enemy troop movements. Can also turn Evil. Also has the spell Rally - instantly removes Fear from friendly units. Hero - Has both a melee attack and a long-range attack and is almost completely unaffected by Fear. Can cast Rally. EVIL Goblin: equivalent to the peasant Zombie: stronger than a Man-At-Arms, but slower Wolf: Heavy fighter with a lot of speed. Similar to Knights, but lower Def. Vampire: Difficult to Turn. Can cast Rally, similar to a Hero, and can also Enthrall an Good unit, placing it under Evil control for a limited time. The big drawback? Cannot Move OR Attack during the day, and if successfully hit by ANY unit during the Day, dies instantly. Banshee: incorporeal, and invisible until is casts a spell, or a Seer detects it. Cannot fight and cannot be hit, but can be turned. It's one spell is Moan which causes all enemy units to make a Fear check immediately. Wizard: Cannot fight physically. Can cast 3 spells: Darkness - hides one territory from a Seer's Sight spell. Sleep - puts all friendlies within range to sleep for the duration (saving throw permitted, sleeping targets wake up when hit, but take double damage from a blow while sleeping). And Fireball - basically a tactical nuke. Affects ALL units in a single territory, friend OR foe. Each unit gets a saving throw - if passed, they only take half damage, otherwise, they take full damage. In fact - manipulating Fear is one of the BIGGEST strategic elements to the game, and I suspect will make combats go much faster, since units currently affected by Fear are essentially sitting ducks. Turn is the equivalent of Fear, and I can probably just use the terms interchangeably. So for example, you make some feints at a Good team which has a Priest - just nickel and diming with Zombies/Goblins. He blows all his mana points Healing and blessing, then you Banshee in, Fear the entire other side, and move some wolves in to clean up right as Night falls. So I hope that clears things up a bit. It's not an infantry game, really. And Evil may look WAY more interesting to play, but I will be very conscious of game balance. I'm trying to emphasize Good vs Evil, so I don't want Good to have a bunch of destructive spells and things.
|
# ¿ Apr 3, 2012 23:46 |
|
seiken posted:I haven't played blood bowl, so apologies if I missed the point. The fear and unit abilities sound good and should hopefully make things more interesting. I just want to say you didn't mention attack range till now so I don't know how that changes things. I'm interpreting it as you get these strategic choices on the "world map" of range and when to engage and so on. But, if I understand correctly, as soon as you enter the "battle screen" the time of day, advantages of each side and so on are fixed for the duration of the battle, and at that point you just have the unit abilities to make things interesting. So you still gotta make the battles reasonably non-trivial if they are to be manually controlled even without anything like time of day and range and what have you. Maybe the "world screen"/"battle screen" are more intertwined than I thought and I'm talking nonsense. poo poo, man. I'm not even sure I've gotten that far myself. My initial combat system came from actually playing with miniatures on paper maps and rolling dice. Once I came up with a working system, I coded it. But hell...it could be something completely different by the time I'm done.
|
# ¿ Apr 4, 2012 04:17 |
|
SupSuper posted:A lot of us here are in the same boat. Only thing I have found that even comes close to addressing what you're talking about is this: http://gameprogrammingpatterns.com/introduction.html Apparently that's some dude's as yet unfinished book on Design Patterns, but specifically applied to game programming. The few chapters he has are pretty good, but it's barely even started. Having been reading this thread from it's inception, I can echo what most people have said already: get your game up and running, THEN worry about architecture. Completing a game, from what I can tell- seems to be about 90% sheer willpower, and 10% coding. Speaking from experience, times I have tried to write an engine, even when I already had a fully formed idea, I lost interest pretty fast. This latest time is the furthest I have ever gotten, and I haven't even thought about "design" or "engines". I just want to be able to play my game. Even if it's programmer art and runs at 3 fps. So far - I haven't lost interest, mostly because I can see GAME things happening. Look! my dudes fight other dudes! Look! that dude's walking now! If you don't know how to do some specific task, google for someone else's way and use that - just get it done and keep moving forward. Who cares if it fits in your architecture? it works for now and that's good enough. You can always optimize and tweak and find better ways of doing things later.
|
# ¿ Apr 5, 2012 00:28 |
|
Hmm... K, I am sorta stumped on how to begin something here. Mostly the storage of the data. If I have a world map that's divided into territories - picture a state map divided into counties, say - and I want to highlight a particular county when the mouse is hovering over it, how would I store the "shape" of the county? I'm using XNA - does it have some sort of open-ended-number-of-sides polygon? I haven't noticed one anywhere. I figure I could store like a List<Vector2> or something, but for map-style shapes that seems like it could get pretty complex. What I'm shooting for is a map editor where you can load in a flat terrain image, and then "draw" the territory shapes on it, which it will then save out to some machine-readable map format, or even just XML describing each territory. So...thoughts?
|
# ¿ Apr 6, 2012 20:00 |
|
A bunch of people posted:Er...wow. Well, I will do some research on all that stuff. I think the problem is - while I have been an application developer for YEARS, I am very new to Game Programming and am pretty math stupid on top of that. Like I looked at that Point In Polygon page, and I understand it...but how to get from that understanding to code, I just go "who to the what now?" Guess I will start by cracking open my Data Structures for Game Programmers book. I think it might have quadtrees in it. I think that will at least give me a leaping point. But yeah...math...not my strong suit at all. \:
|
# ¿ Apr 7, 2012 00:14 |
|
PDP-1 posted:How many regions are you planning to have to sort through? Quadtrees are most likely overkill if you'll have less than a few hundred. It's easy to waste tons of time coding up the ~*magical perfect system*~ only to find that you've added a lot of complexity for no real performance gain and it sounds to me like you might be heading down that road. Yeah it will be more like 20-30 tops, and even that's probably an over estimate.
|
# ¿ Apr 7, 2012 01:58 |
|
Blarg. I have been navel-gazing for so long at this that I have now crawled too far into my own bellybutton to remember which way is up. I have scaled down my previous game idea, and am now translating the pen and paper game that sparked the original idea in the first place. My map editor is now nearly complete, but I am struggling with finding a decent way to store something. The map is divided into ~20 territories - irregular polygons. Some of them are part of the Road on the map, others are not. A unit can move one territory at a time, unless they are on the road, in which case they can move two territories along the road, but only one if they leave the road. Since they are irregular - and therefore don't really share any coordinates I can compute neighbors from, and there's only 20 of them anyway, I figure I'll just precompute available moves from each territory, like: from territory A, you can reach B, C, F, G. From B: C D E F. etc. Trying to figure out the best way to store it. Each Territory has a flat list of available moves? Some sort of hash table? A tiny midget with a little book telling who can move where from what and you bring him some banana chips and a territory and he says "you can move here." ? I need caffeine. PS. I am using XNA 4.
|
# ¿ Apr 26, 2012 16:32 |
|
OtspIII posted:How are you generating the shapes? Seiken's ideas for storing the data sound good, but is what you're looking for advice on how to store the data or also how to find it in the first place? I'm using the map editor to define the shapes. Can basically go clicky clicky on the map and make closed polygons on top of the map image loaded into the background. An ancient Mayfair game called Transylvania.
|
# ¿ Apr 26, 2012 18:48 |
|
ZombieIsland posted:Hey guys, I am looking to get into Game Development. I know the language I want to learn is C# and then go to XNA. But, does anyone know of any good Tutorials or anything like that? The kind of games I want to make are 2D/platformer. I really don't know where I should start in learning, if anyone could point me in the right direction I would really appreciated it. Riemer's tutorials are a pretty good place to start, depending on your level of understanding of C#. http://www.riemers.net/
|
# ¿ Jul 2, 2012 13:21 |
|
Jewel posted:Riemers' tutorials are only really good for 3D games. If he wants to learn the basics of XNA, try even this super simple, but nice site (it got me started on XNA!) http://www.xnadevelopment.com/tutorials.shtml There's a 2D tutorial on Riemer's now that at least has the very basics of spriting and collisions, etc.
|
# ¿ Jul 3, 2012 02:40 |
|
Madox posted:Hey guys - For the last week I've been making a GUI front end for the LibNoise perlin noise library. If you use perlin noise to make height maps or textures, try out my tool and tell me what you think. Your timing couldn't be better. I just started looking into libnoise for my terrain editor. I will have to wait till I get home to try this out, but from the screenshots and docs it looks good.
|
# ¿ Jul 17, 2012 17:49 |
|
Senso posted:I've been fiddling with C++ and Allegro and I'm at the point where I have NPCs on the screen moving randomly. Thing is, their walk function is called each time a frame is drawn (I set my FPS to 40). I have some kind of mutex that makes sure random_walk() returns if it's currently running. If I understand you correctly, you need to decouple your movement code from your timestep, as explained here: http://gafferongames.com/game-physics/fix-your-timestep/
|
# ¿ Oct 3, 2012 13:58 |
|
Vivian Darkbloom posted:I've started playing around with this project. Is there any recommended way to make a province map, where the provinces are irregular shapes instead of tiles or hexes? I guess I'll need to make a digital copy of my province map and get it into pygame somehow. I was working on a game project that did this same basic thing, and was storing the territories as a collection of points, but as I was driving around the other day in the car, it dawned on me that something like a Flood Fill algorithm probably would have been a lot faster. Could even save the results as your "map" file. So - select a point, flood fill to find the limits of the territory and there you go. Assuming your territories are actually closed, that is.
|
# ¿ Nov 19, 2012 16:46 |
|
There was a C# game library someone had posted a link to several pages back, and now I can't find it. I seem to remeber it being Open_L. I thought it was OpenAL, but that's just for audio. This was an all-in-one thing similar to XNA or something but not as complete. Anyone?
|
# ¿ Dec 21, 2012 15:35 |
|
xgalaxy posted:There is OpenTK. THAT'S IT. Thanks, man. I was racking my brain.
|
# ¿ Dec 21, 2012 17:53 |
|
Pfhreak posted:Stop here. What else have you done? Published any other games? You are trying to paint the Sistine Chapel here... Heh. What my esteemed colleague here is trying to say, put more gently: If you haven't done game programming before - it's usually better to start small. Make a breakout clone or a pong clone. MMORPGs are developed by MASSIVE teams of really GOOD (in most cases) programmers, or at the very least EXPERIENCED ones. If you bite off WAY more than you can chew, it is likely to sour you on the entire process. So - baby steps. Make a SMALL, single player game. Learn how that works. Make a SMALL networked game. Learn how THAT works. Make a 3D game using someone else's engine - Learn that. Each thing is a building block and another tool in your arsenal. If you look around game coding messageboards, and had a nickel for every person who essentially said "I've never made games before, but I'm working on an MMORPG!" and was subsequently never heard from again, you'd be all "no no, Mr. Rockefeller - lunch is on ME today." I have been an application developer for years, and I can do that in my sleep. Game programming is a TOTALLY different animal. I too don't know much advanced math, but I had to learn some to do even the SIMPLEST games. But saying "I'm new to programming and I am working on an MMORPG" is akin to showing up and saying "I learned how to say 'hola' in Spanish. Brb - gonna go translate War & Peace!" Don't get me wrong - I wish you all the luck in the world, but you should be realistic about the size of the task you're taking on. Good luck.
|
# ¿ Jan 17, 2013 17:38 |
|
|
# ¿ Apr 26, 2024 23:52 |
|
So I'm sure this question has been asked to death and I checked the first page thinking it might be in a pre-emptive FAQ, and I also browsed through the last few pages, but no luck. I know the usual response is "make a game" and I have done that before. But let's assume I want to start from literally zero - what's the best set of libraries to write a game with? Would prefer to use C++ since it's been years and I'd like to bone up. Developing on a Mac and possibly Windows, so cross compatibility would be nice. Mobile platforms not currently necessary. My initial outing is essentially a board game, so 2D oriented, I guess. Is SDL still a thing? I am comfortable in pretty much any C-style language, and have dabbled in Python/Ruby but I'd have to spend a lot of time looking up syntax with those two. Haxe looks pretty neat - is it viable for writing an entire game in? Thanks in advance.
|
# ¿ Oct 6, 2013 16:28 |