Show Posts
|
|
Pages: 1 [2] 3 4 ... 82
|
|
21
|
Developer / Playtesting / Re: Almasy Tactics - Browser Strategy Game
|
on: July 10, 2010, 05:34:22 AM
|
classes = {} for className, classPriority in pairs(classes) do if (className == target.class) then priority = classPriority break end end I'm wondering, couldn't that whole bit just be priority = classes[target.class] ?
|
|
|
|
|
22
|
Community / DevLogs / Re: Infested Planet (Strategy)
|
on: July 10, 2010, 04:49:28 AM
|
|
Re-using existing tool is definitely a great idea! For my game Vessel-IV for the Cockpit compo, I also used Inkscape exclusively as a level editor. I used polygonal shapes as the level geometry, small color-coded circles represented entities like the player and the enemies, and paths for patrolling enemies were defined using paths (is that the term? I forget) in Inkscape. It worked a charm and saved me lots of time. Probably I wouldn't even have finished the game if I had to do my own editor on top of the game. (I hate writing editors.)
|
|
|
|
|
23
|
Player / General / Re: 0.999...
|
on: July 09, 2010, 05:25:45 AM
|
No it's not, it's a mathematical object, it exist conceptually. It's not really unless you give it some structure; define the set that this "number" is from, provide operations on your new numbers, show that they exhibit some useful properties. Complex numbers didn't come about because some dude shouted "hey, i is square root of -1!" and the others were all like "duude. mind=blown", but because people figured out you could actually give them a useful algebraic structure that gives you a way of computing with them and generalizes what we know about real numbers. Structure baby, it's what math is all about.
|
|
|
|
|
24
|
Developer / Technical / Re: Generating a dungeon
|
on: July 09, 2010, 01:01:10 AM
|
However what I want to do here is fill a 20x20 square completely with rectangular rooms.
In that case, maybe a subdivision algorithm would be suitable? Start by considering the whole 20x20 grid as one large room. Then, iteratively, choose the largest room (or maybe randomize a bit here) and put a wall randomly somewhere into it, splitting the room into two smaller ones. Repeat to satisfaction. That sounds good, but I still want to keep the "Range" setup I posted in the OP. After I finish subdividing a room, do I need an algorithm to find all the "small" rooms, or can I somehow do that during the subdivision? What I mean is that I still want each room to be a separate entity. I need that for item/enemy placement and also other reasons. I don't quite understand your concerns here to be honest. Just represent each room as a pair of points, (lowerLeft,upperRight), and keep them in a list. At first your list has only one entry. Whenever you split a room, remove it from the list, and instead push two new rooms onto the list. Do you have troubles coming up with an algorithm to split a room in this way? Or are you worried about these "ranges", as you call them? The latter should be very easy to compute in a postprocessing step, just add a fringe of width 1 to every room.
|
|
|
|
|
25
|
Developer / Technical / Re: Generating a dungeon
|
on: July 08, 2010, 11:37:44 AM
|
However what I want to do here is fill a 20x20 square completely with rectangular rooms.
In that case, maybe a subdivision algorithm would be suitable? Start by considering the whole 20x20 grid as one large room. Then, iteratively, choose the largest room (or maybe randomize a bit here) and put a wall randomly somewhere into it, splitting the room into two smaller ones. Repeat to satisfaction.
|
|
|
|
|
26
|
Developer / Technical / Re: Seamless "infinite" worlds
|
on: July 06, 2010, 02:50:46 PM
|
Ugh, 'streaming' turns up with mostly audio and video streaming, even when I search together with 'game engine'.
Try 'streaming terrain', that turns up a fair bit. I realize it's probably a bit more narrow in focus than what you had in mind, but even that is hard enough, so.
|
|
|
|
|
28
|
Developer / Technical / Re: Determining Minimum Requirements for Game...
|
on: July 06, 2010, 03:33:56 AM
|
You don't generally even need to display minimum specs nowadays unless your game requires absolutely top-end hardware.
Yeah. Either your game is free and it's a moot point anyway since people can just download it and try if it works on their machine, or you charge for it, in which case you'll need a demo anyway for publicity, so again people can just try it out. I think the whole minimum specs thing just isn't as relevant today as back when people bought games in boxes from a shelf.
|
|
|
|
|
29
|
Developer / Technical / Re: The grumpy old programmer room
|
on: July 03, 2010, 01:03:41 PM
|
Ended up just compiling sfml from source for my system, which was surprisingly hassle-free. Yeah. That tends to be one of the things that work much better on a Linux system. 
|
|
|
|
|
31
|
Developer / Technical / Re: Transition to 3D and Controlling Characters in Space
|
on: June 27, 2010, 05:18:01 AM
|
Maybe by intersecting things with a huge rectangle that extends out from the screen?
Basically this, except what you're looking to intersect with is something like a rectangular cone; the technical term is frustum, so you might want to check with the XNA documentation if something like this already exists. If not, basically you need to set up four planes for the edges of this cone, with their normal vectors pointing inside; an object is inside the cone if it is inside with respect to each of the four planes. Such plane-vertex checks are very cheap, basically it's just one dot product. EDIT: This might help: http://www.gamedev.net/community/forums/topic.asp?topic_id=435736
|
|
|
|
|
33
|
Developer / Technical / Re: Transition to 3D and Controlling Characters in Space
|
on: June 26, 2010, 01:57:01 PM
|
I was using euler angles because it seemed like the natural extension of "angle" in 2D space, which I know how to control. Also,the physics engine I'm using only allows you to apply torques along arbitrary vectors, so it seemed natural to use pitch-yaw-roll. That's not quite the same though: pitch-yaw-roll gives you three fixed axes along which you can rotate, while quaternions let you rotate along any arbitrary axis very easily. So I'd say quaternions match the model of the physics engine more closely. What I'd really like is the ability to say "I am in this orientation A, and I want to get to orientation B (where A and B are quaternions). What torques should I apply to get there?" Thanks for the suggestion though, muku. I'll do research on quaternions.
I'm not sure if by torque you mean the physical concept, or just the axis and angle to rotate about. The latter is easy with quaternions: just compute C = A^-1 * B; this will be the quaternion representing the rotation from orientation A to orientation B. (Inverting a quaternion is a very cheap and simple operation, as opposed to inverting a 4x4 matrix.) If you want the axis and the angle, use this formula to convert the quaternion C to axis-angle representation. So basically you need three things: representing an axis-angle rotation as a quaternion, inverting a quaternion, and multiplying two quaternions. Every one of the dozens if not hundreds of quaternion tutorials on the internet will teach you about those. If you have troubles, feel free to ask here!
|
|
|
|
|
34
|
Developer / Technical / Re: Transition to 3D and Controlling Characters in Space
|
on: June 25, 2010, 11:39:46 PM
|
The most obvious solution is "turn towards the target and then fly towards it. Then stop and turn to the orientation you want to be at." But I'm having trouble with even doing this (for instance, how do you turn "towards" something in 3D space?  ) For general 3D rotations, I'd really recommend ditching Euler angles and instead using quaternions to avoid all the well-known problems (gimbal lock, in particular). Once you have that, you can use quaternion slerp to smoothly interpolate between two orientations.
|
|
|
|
|
35
|
Community / Townhall / Re: The Oil Blue
|
on: June 25, 2010, 02:46:42 AM
|
|
I was sort of expecting this to allude to current events, but from the looks of it it doesn't, making it sit a bit awkwardly with me... still looks like it could be an interesting game, I'll check it out when I get the time.
|
|
|
|
|
36
|
Developer / Technical / Re: Elastic physics - help
|
on: June 25, 2010, 12:36:39 AM
|
The grappling hook in The Unicyclist works using a system like the one you describe (see
, from about 25s in). Aaah, I had the idea to make a unicycling game quite a bit like that a while ago. I guess that idea's out of the window 
|
|
|
|
|
37
|
Developer / Technical / Re: Playing it silly with Singleton and static
|
on: June 24, 2010, 09:11:55 AM
|
Ah, so it's like C's atexit() function, but locally scoped. Yup, you might say so, minus the runtime overhead (I imagine atexit() puts something into a table or list which has to be checked when the program exits, while scope() is completely static). Plus you get scope(success) and scope(failure) which trigger only when no exception/an exception occurs.
|
|
|
|
|
38
|
Developer / Technical / Re: Playing it silly with Singleton and static
|
on: June 24, 2010, 09:01:42 AM
|
I guess I just don't understand the language then, what are acquire() and dispose()?
Ah sorry, that's not part of the language. Those were just examples to illustrate a possible use. More real life example: void main() { SDL_Init(); scope(exit) SDL_Terminate();
// game main loop etc }
|
|
|
|
|
39
|
Developer / Technical / Re: Playing it silly with Singleton and static
|
on: June 24, 2010, 08:41:47 AM
|
How is that any different than just using a local object? You have to declare the class first, that's a lot of boilerplate code. Especially if many of these uses are one-off things, you litter your code with classes which you don't really needed in the first place. Look at the example you posted further up: 14 lines for the Finalizer struct. If you want to execute just one line of code at the end of the scope, that's a hell of a lot of overhead.
|
|
|
|
|
40
|
Developer / Technical / Re: Playing it silly with Singleton and static
|
on: June 24, 2010, 07:57:53 AM
|
By the way, the D language has scope guards (for success, failure and unconditional ones) built in which makes this kind of thing very pleasant to do. It really changes the way you do error handling.
I had to learn Python for work, and although the more I use it, the more I come to hate it, it's try-except-finally-else construct is a nice way of handling that. It's terribly verbose though. Especially if you don't want to catch any exceptions, the following code is much more concise: void foo() { auto x = acquire(); scope(exit) dispose(x);
// do stuff here that might throw... }
It has the additional advantage of grouping the acquisition and the disposal together logically, instead of tearing them apart. I come across this sort of situation very rarely in C++, so I'm not sure it needs something to explicitly handle these cases. I still want nested functions, though.
Yeah. D has those too  Wouldn't want to live without them anymore.
|
|
|
|
|