|
hihifellow posted:... Not to budge in but I would love to see this if you posted it.
|
# ? Jan 22, 2009 02:44 |
|
|
# ? May 11, 2024 13:27 |
|
octan3 posted:Not to budge in but I would love to see this if you posted it. Okay, a bit of background. I had all my background tiles on one big image, and would then section it off into rectangles and just draw whats inside the rectangle. If you've seen old sprite sheets it's the same thing, and in here I had both the drawn tile and its black & white counterpart all on the same sheet. Excuse whatever ugliness is still here, my schooling with C# does not go beyond a couple web tutorials. This probably belongs in the terrible code thread, really. I think the only variables here that are not defined in the function is mplayercoords, which is a Vector2 of where the mouse was clicked in tile coordinates, and mcoords, which is another Vector2 of where the mouse click happened in screen coordinates. The whole idea behind this function is to adjust the mplayercoords variable so it has the right coordinate. Keep in mind every example I found on the internet of how to do this was pages and pages long. code:
|
# ? Jan 22, 2009 04:29 |
|
Thanks for posting the code. Could you also use a special mousemap? I found this one gamedev: http://www.gamedev.net/reference/articles/article2026.asp
|
# ? Jan 22, 2009 19:42 |
|
Vinlaen posted:Thanks for posting the code. That's actually one of the first articles I read about this. I'm sure it works great, I just could never wrap my head around HOW to do it. It's the same idea, generating an imagemap so the engine has a better idea of where you clicked.
|
# ? Jan 22, 2009 20:56 |
|
hihifellow posted:That's actually one of the first articles I read about this. I'm sure it works great, I just could never wrap my head around HOW to do it. It's the same idea, generating an imagemap so the engine has a better idea of where you clicked.
|
# ? Jan 22, 2009 21:30 |
|
I'm making an asteroids clone, and when the lasers are fired from the ship, it's only performing collision on the last entry into my BeamList. See here http://ie.youtube.com/watch?v=xQTgsnQ5AGo&fmt=18 As a beam is fired, it's added to a List of type Beam. I then call code:
I should note - I had collision detection working fine, but it was very computationally expensive (check every beam on screen with every asteroid - when I deployed it to my 360 it nearly shat itself), so now I'm only checking beams against asteroids in the same cell. PS - this post was made because I usually solve the problem within an hour of posting myself, so here's hoping! gently caress me, i was just setting the cellShowCollision to false in the wrong spot. Told you i'd fix it after posting! Kennedy fucked around with this message at 17:40 on Jan 25, 2009 |
# ? Jan 25, 2009 16:52 |
|
Ok, what about isometric tile sizes? Most tutorials online are using 64x32 but I can't seem to draw a perfect diamond inside that size. I've also tried 32x16 but that doesn't work either. However, 32x15 works perfectly. How are people using 64x32 and drawing perfect diamonds inside of them?
|
# ? Jan 25, 2009 21:32 |
|
here's my attempt at 64x32 isometric tiles: e: here's a magnification and grid for clarity terminatusx fucked around with this message at 03:21 on Jan 28, 2009 |
# ? Jan 28, 2009 01:57 |
|
Can someone share insights in developing an entity system? As in what properties, how extendable, parent-child relationship, spawning, management etc. Is duck-typing practicable? Or a mixture of static typing and dynamic properties?
|
# ? Feb 2, 2009 21:43 |
|
heeen posted:Can someone share insights in developing an entity system? Shmup: the main concern here was managing thousands of bullets, with potentially hundreds created or destroyed each frame. To this end I developed a somewhat complex system which used two static 'buffers' and swapped bullets between them as they were created and destroyed. The bullet class itself was lightweight, designed to fit into 128 bits for maximum efficiency. The other main class was Ship, which was designed to be subclassed to extend functionality. Isometric: this was a more conventional entity system, with entities designed to be controlled by script and dynamic properties. Properties such as visuals, physics, etc are dynamically added or removed. There are no subclasses, just one base class whose behaviour is defined entirely by script and properties. Dynamic property systems are all the rage right now, but getting them running at a good speed can be a bitch (especially when there are several thousand in the world), and you'll probably have to write your own specialised containers or use a combination of existing ones. An excellent case study is Looking Glass Systems' Dark Engine, which was used for the Thief games and System Shock 2. There's a presentation on it here which, while old, is informative. Roguelike: I used a base entity class with a very few hardcoded engine properties (position, physics, etc). Entities are extended by script, and all these extended properties exist only in the script system - duck-typing as it seems to be known. It's possible to transparently modify both script and hardcoded variables from script. This is extremely slow because it has to do a container-based lookup every time I access a property in script, but I get away with it because it's turn-based. I'm sure I will hit slowdown later on when I have more entities with more complex logic up and running; I'll cross that bridge when I get to it. All in all, extremely flexible but sloooow. As far as management goes, I don't bother with static pre-allocated arrays. It's turn-based, a little dynamic memory management won't be noticed.
|
# ? Feb 2, 2009 23:49 |
|
heeen posted:Can someone share insights in developing an entity system? What language are you writing your gamecode in?
|
# ? Feb 2, 2009 23:51 |
|
OneEightHundred posted:Are you networking this or making a single-player game? I'm writing the engine in c++ and want to add scripting in js later. For now it is single player only. I think I'm going to use the hybrid method described above: A few fixed entity classes for things like models, lights, physics, plus a script namespace for dynamic properties to avoid the bottleneck mentioned above.
|
# ? Feb 3, 2009 03:54 |
|
I want to create a highly accurate colony simulator where the player develops a frozen world using only renewable energy as a power source. A territorial map would be used for placing mines, power plants, rail and power lines over great distances, while a rts/fps view would be used for colony construction. Rather then a series of connected buildings like most rts, each colony would be an arcology, a self-contained city built to minimize heat loss. As much as I want to avoid graphics, being able to walk through the arcology would be the primary pay-off for actually succeeding at the game. I don't want to rewrite the game twice because I picked the wrong engine the first time. XNA, Orge3d, Irrlicht and Torque seem to be the major SDEs/graphic engines/ game engines recommended for 3d game development. I'll be happy to start with crude 3d graphics and focus on the game mechanics, but at the very end of the development cycle I'd like to significantly improve the graphics without having to redo everything from the start. It doesn't have to look pretty, I just don't want it to look ugly. I'm well aware how much work this project would be, so I already hate myself for wanting to do it. jonus fucked around with this message at 22:58 on Feb 3, 2009 |
# ? Feb 3, 2009 22:49 |
|
jonus posted:I don't want to rewrite the game twice because I picked the wrong engine the first time. If you actually had to rewrite a game because you changed graphics engines, it would speak way more to your talent (or lack thereof) as a programmer than to your choice in graphics engine.
|
# ? Feb 3, 2009 23:02 |
|
heeen posted:I'm writing the engine in c++ and want to add scripting in js later. For now it is single player only. I think I'm going to use the hybrid method described above: The extension/generic approach is used in shooters a lot, it basically means almost everything derives from one main object type, a couple specialized types derive from that (i.e. projectile, vehicle, player), and everything else is an extension of one of those. The compositing approach basically involves making entities a sort of "command center" for other subsystem instances, i.e. a monster would have references to a renderable to display it, a physics instance to interact with the world, an AI state to decide what to do, a network replication instance, etc. Compositing is more flexible, extension is easier to work with. Things that are constantly spawned/destroyed and have limited interactivity, i.e. particles, are generally best separated from everything else so they can be specialized and handled efficiently. OneEightHundred fucked around with this message at 23:27 on Feb 3, 2009 |
# ? Feb 3, 2009 23:25 |
|
Avenging Dentist posted:If you actually had to rewrite a game because you changed graphics engines, it would speak way more to your talent (or lack thereof) as a programmer than to your choice in graphics engine. The things he listed are a lot more than just "graphics" engines. They impose a lot of constraints from the asset pipeline all the way to how entities are defined, processed and how they communicate; and there is little, if any, common ground between any of them.
|
# ? Feb 3, 2009 23:43 |
|
krysmopompas posted:Right, because you can simply compile on XNA or Irrlicht at the flick of a switch if your programmer dick is big enough. I'm more speaking of "what kind of programmer would 99% finish a game and then say hey wait I just spent six months writing code for an engine that I knew was crap and unsuitable to my needs". If you're using a hypothetical awful engine and you get more than 10% of the way through a project before realizing that the engine is crap, then you've got problems. You could probably save a fair amount of the game logic at that point anyway, even if you have to restructure message-passing a little. Besides that, the question seemed to be "can I make something pretty in engine X?" and really all you need to do is look at a few screenshots to answer that. Nevertheless, my programmer dick is big enough that all my code compiles under all languages and all APIs at the same time.
|
# ? Feb 4, 2009 00:04 |
|
Avenging Dentist posted:I'm more speaking of "what kind of programmer would 99% finish a game and then say hey wait I just spent six months writing code for an engine that I knew was crap and unsuitable to my needs". If you're using a hypothetical awful engine and you get more than 10% of the way through a project before realizing that the engine is crap, then you've got problems. I'm not sure how someone new to development is going to be able to tell the difference between an engine being unsuitable, and not knowing what needs to be done or how best to achieve it. Hell, you have tech directors of major companies unable to tell the difference as well. Anyhow, I think the key thing from his post isn't "pretty graphics" but the combination of the rts and fps view modes. Moving a camera around is an extremely simple task, but most engines do their damnedest to only assume that one way of moving it will work with 99% of the code already written. p.s. I am glad for your penis.
|
# ? Feb 4, 2009 00:58 |
|
Sorry if this has been discussed already, but what do you guys think of XNA? I've read that it's a pain in the rear end unless you're trying to develop an Xbox 360 game, because there's lots of poo poo to install and even then it might not work right. I don't suppose they've made it easier to use if any of that was true?
|
# ? Feb 4, 2009 01:20 |
|
krysmopompas posted:Is there a Godwin-like law for invoking 3drealms yet? I'm not sure DNF can even be counted as a single game anymore. More like several canceled games. krysmopompas posted:I'm not sure how someone new to development is going to be able to tell the difference between an engine being unsuitable, and not knowing what needs to be done or how best to achieve it. Hell, you have tech directors of major companies unable to tell the difference as well. Well, someone new to development in general is probably going to have a hell of a time making a game (except for Pac-Man or something, I guess). But I think it depends a lot on the type of project. If you're trying to make a game with bleeding-edge graphics, you're under a lot harsher restrictions, since you need to be aware of performance at all times. If you're not trying to make the next Crysis, you're afforded a little bit more leniency and can hack things in that an engine might not be well-suited for. Extreme example: with a simple sidescroller on modern machines, you'd hardly have to worry about performance at all. That's what makes stuff like PyGame possible. Who cares about optimizations when you're already getting 1000 FPS? krysmopompas posted:Anyhow, I think the key thing from his post isn't "pretty graphics" but the combination of the rts and fps view modes. Moving a camera around is an extremely simple task, but most engines do their damnedest to only assume that one way of moving it will work with 99% of the code already written. I'd hope that you could resolve stuff like that in the prototyping stage, which is an especially important step if you aren't 100% sure what engine you want. Besides, I was responding primarily to this: quote:I'll be happy to start with crude 3d graphics and focus on the game mechanics, but at the very end of the development cycle I'd like to significantly improve the graphics without having to redo everything from the start. krysmopompas posted:p.s. I am glad for your penis. So am I. Compile times are pretty long though since it's an NP-hard problem. tl;dr: if your game doesn't have especially high performance requirements, it probably doesn't matter too much what engine you use if you get past prototyping, since that's probably where you'll find the big problems.
|
# ? Feb 4, 2009 01:25 |
|
raditts posted:Sorry if this has been discussed already, but what do you guys think of XNA? I've read that it's a pain in the rear end unless you're trying to develop an Xbox 360 game, because there's lots of poo poo to install and even then it might not work right. I don't suppose they've made it easier to use if any of that was true?
|
# ? Feb 4, 2009 01:37 |
|
Mustach posted:The latest XNA seems to have fixed most of the problems that people had with deployment in the earlier versions. As an intermediately-skilled programmer I set out one day to learn C# and the XNA framework. Weeks later I had a pretty sweet little prototype of a game. The ONLY issues I had that caused an immense amount of frustration was deploying it into an installer. It never seemed to work on other people's machines, regardless of what version of .NET framework they had installed. If what you said is true in that they've fixed the deployment problems in the past version, then XNA and C# gets 2 thumbs up from me, and should be no problem for an experience programmer to tackle. There's also a ton of tutorials from the XNA community to help you on your way.
|
# ? Feb 4, 2009 01:51 |
|
Here is the exact type of map that I'm trying to obtain: http://www.tangerinepop.com/experiments/AS2/YCollision/ Right now I have a very simple, very flat, isometric map that is rendered like this: code:
However, I'd really like to make my map a little more interesting to having sloping tiles or various height terrain. (eg. think of Final Fantasy Tactics, or the link I've listed above) How can this be accomplished? I'm assuming that this involves changes to the rendering, collision detection, mouse picking, etc, etc.
|
# ? Feb 5, 2009 20:21 |
|
jonus posted:I want to create a highly accurate colony simulator where the player develops a frozen world using only renewable energy as a power source. A territorial map would be used for placing mines, power plants, rail and power lines over great distances, while a rts/fps view would be used for colony construction. Rather then a series of connected buildings like most rts, each colony would be an arcology, a self-contained city built to minimize heat loss. As much as I want to avoid graphics, being able to walk through the arcology would be the primary pay-off for actually succeeding at the game. I've always wanted to make this game too, but the design overhead is staggering. Every time I sit down to write this game, I inevitably lose focus, jump iterations, and crash and burn when Ogre or XNA doesn't behave quite right. I've settled for making a much smaller game that I'll actually complete (and I'm nearly at an alpha build after only 2 weeks). What sort of game projects have you completed in the past? Because if the answer is none, or the answer is "a couple, but I can't show them off here..." then there's a strong chance this project is simply too big right now. Believe me, I want this game as much, or more than you do. I'd love to write it some day, but the amount of work that would go into it, especially if you are doing it in 3D cannot be understated.
|
# ? Feb 5, 2009 22:19 |
|
Question: Is there a good tool for making navigation meshes or waypoints for my game? Background: I am making an XNA game for the 360. My game world is currently a model that is attached to the BEPU physics engine. While the player can drive around the map on his/her own, the world is rather barren. I need to add traffic and pedestrians to my map. What I'm looking for is a tool that will allow me to create waypoints or navigation meshes for my game so that I may add cars and pedestrians that follow them. Optimally, the waypoints will be a series of connected points on the surface of my map model. Every connection between points can have a weight (max speed). The ability to put custom attributes on connections or points would be great too (this would allow me to tie traffic lights into connections). I don't care if everything's saved to xml, serialized C# code, or whatever - so long as as it's in a format I can open. Is there any tool that will let me do this? diadem fucked around with this message at 02:57 on Feb 9, 2009 |
# ? Feb 9, 2009 02:39 |
|
raditts posted:Sorry if this has been discussed already, but what do you guys think of XNA? I've read that it's a pain in the rear end unless you're trying to develop an Xbox 360 game, because there's lots of poo poo to install and even then it might not work right. I don't suppose they've made it easier to use if any of that was true? If you are a .NET coder, XNA is a sinch. The community is amazing and helpful and the tools are great. The XNA developers frequent the forums and people with published games under their belt have no qualms offering great advice. Check out these video tutorials to see how easy it is. My only complaint is how floating points are handled. XNA is compiled into CLR code. While X86 CLR code is fine, Power PC CLR code can't handle floating points for poo poo. What this means is that you'll have to be very careful with your physics in the 360. That's my only complaint, though. Everything else is awesome. Good tools, good community, well supported, and easy to use. I really like the idea of the peer reviews allowing anyone to put their game on the x-box, even if it does let a lot of crap in. edit: If you are making a windows game, XNA may not be the best, but it is still easy. With Visual Studio 2008 and XNA 3.0, you can simply right click your project and click publish to create an installer. When a user runs your installer, it will automatically download any missing dependencies (like the latest .net framework). If you want to publish your windows game to the 360, just right click your windows project and select "create a 360 version." There are a few exceptions, but most are obvious. The debugger even works with the 360 - you can put in break points in your code while the 360 is running and they will work seamlessly. diadem fucked around with this message at 02:55 on Feb 9, 2009 |
# ? Feb 9, 2009 02:46 |
|
diadem posted:What I'm looking for is a tool that will allow me to create waypoints or navigation meshes for my game so that I may add cars and pedestrians that follow them. Editing attributes may be a bit more difficult to get the UI for, but you could probably do the whole thing in-game if you wanted to.
|
# ? Feb 9, 2009 08:52 |
|
What do you guys think of the Blender game engine?
|
# ? Feb 9, 2009 12:48 |
|
OneEightHundred posted:There isn't really a tool for waypoints specifically, but you'd probably want to make an in-game editor for it, simply because you get much better waypoints if you can already confirm a point can be navigated to, and you can get a precise feel of its location. This is a very interesting idea. I never even considered this. Thanks .
|
# ? Feb 9, 2009 13:38 |
|
Actually another thing to consider with waypoints is autoconnection. Half-Life series games do this and it cuts out a lot of work, just write something that attempts to simulate a walk between any nearby points to get the connections up automatically. Cache the results though, it can be a very slow process. You can always assign attributes to points to control which ones will be navigated, i.e. flag sidewalk points as such so they don't cut through alleys or whatever.
|
# ? Feb 9, 2009 21:48 |
|
Could someone explain calculating wind for 2D projectile motion? So we start out with projectile motion without wind. The following equations calculate the x,y position of the object, assuming we're using earth gravity. x = vx * time y = vy * time - 0.5 * g * time^2 I assume wind is just another force acting on an object. I only want the wind to go in an x direction. Do I need a drag coefficient? If so, we can use 0.5. Also, if we need mass we can just just 1kg. I just need this to be a simple model. If someone could give me the equations for x and y, and explain how they got it, I'd be really appreciative. Thanks Crazak P fucked around with this message at 00:00 on Feb 11, 2009 |
# ? Feb 10, 2009 23:49 |
|
I've been re-designing multiplayer roleplaying text game I made a few years ago, and wanted some input on an idea I had to get around a problem in my previous game. The problem is, on the server side, nothing is ran concurrently. This caused issues when we wanted to implement long running commands. So if a player's command takes 3 seconds to run, all players don't have their commands processed for 3 seconds. We can't just blindly run each command in a separate thread. However, most have relatively limited context. The idea is to force commands to declare their "scope" upfront: what they might write, and what they might read. Then, make a command scheduler of sorts, that will make sure to only run a command if nothing in its scope is in conflict with another currently running command's scope. I'm a bit concerned that having to declare a scope upfront might be cumbersome. Does this seem reasonable? Is there a better way to go about it?
|
# ? Feb 11, 2009 00:29 |
|
Unless you're going to go for a complete fluid dynamics simulation, then anything you write is going to be an approximation. As such, you're better off figuring out what sort of motion or effect you're after, and then working towards an equation that describes that. You could take a very simplistic approach to wind and just say that it's a constant force along X. In which case, it becomes exactly like your equation with gravity. Something like: code:
You can also add in very simple drag (again, constraining it to the horizontal if you so wish) by having the force vary with some function of vx. Pick a drag function to play with, plug in vx to get out f, divide by m, and plug that in as the acceleration. Try something simple like: code:
|
# ? Feb 11, 2009 00:29 |
|
Freakus posted:I've been re-designing multiplayer roleplaying text game I made a few years ago, and wanted some input on an idea I had to get around a problem in my previous game. If you're willing to recreate your server, Erlang would be a good choice. There are other languages around built with concurrency in mind, but speaking from my experience with it ONLY, I'd say it'd work extremely well for a MUD server. My current game project is similar to MUDs, and Erlang processes are well-suited for message sending between one another, so "player" processes can communicate easily with "room" or "zone" processes, etc. Commands can be processed in parallel in the same manner. There's an Erlang thread around that might help you get some more info on it, too.
|
# ? Feb 11, 2009 02:21 |
|
I've been doing some work with implementing collision detection in my 3d game, and after some thought it seems that capsule bounding volumes would be a good fit for my character models. I'm not sure exactly how it would work with the ground though. As I understand it, this would be the bounding volume for this crudely drawn man, and where it would rest on the ground: Clearly he's floating a few feet off the ground. I could see it working if I then test a more accurate geometry collision test but as the characters are almost always on the ground using the bounding volume would be worthless, so that can't be the solution. I'm not really quite sure how to solve this. MasterSlowPoke fucked around with this message at 11:26 on Feb 14, 2009 |
# ? Feb 14, 2009 11:16 |
|
Generally bounding volumes are used as an early-exit to avoid more expensive collision-detection.
|
# ? Feb 14, 2009 11:41 |
|
Yeah, I got that, but how am I supposed to use the bounding volume and keep the guy on the floor.
|
# ? Feb 14, 2009 12:18 |
|
MasterSlowPoke posted:Yeah, I got that, but how am I supposed to use the bounding volume and keep the guy on the floor. code:
|
# ? Feb 14, 2009 12:23 |
|
But seeing as the guy is almost always on the floor, nearly every frame I'm going to be doing a hull intersection test?
|
# ? Feb 14, 2009 12:28 |
|
|
# ? May 11, 2024 13:27 |
|
MasterSlowPoke posted:But seeing as the guy is almost always on the floor, nearly every frame I'm going to be doing a hull intersection test? If the capsule intersects with something, you always do a full intersection test. Using bounding volumes like that is to help you speed things up for when objects aren't near each other.
|
# ? Feb 14, 2009 12:29 |