|
mit_senf posted:So I've been considering implementing destructible 2D terrain a-la Worms for a game, but I'm having trouble coming up with a good way to do so. You can "cheat" if your map has certain properties. For instance, if your map doesn't allow caves or overhangs, you could use a heightmap, i.e. for each X coordinate store a height only rather than every single pixel. Then you can still add "loose" particles that are "glued" to the heightmap when they fall. My small example game (java applet): http://flywheel.be/wouter/copter/
|
# ? Aug 13, 2010 10:04 |
|
|
# ? May 25, 2024 15:24 |
|
dizzywhip fucked around with this message at 21:55 on Nov 9, 2020 |
# ? Aug 14, 2010 00:39 |
|
I'm looking to play around and implement 'boids' in actionscipt. I'd like to use the concept in a really simple game. I've used Flixel, and I kind of liked it, but I also want to know what other options are out there for generic lightweight flash platforms. What's good and what isn't?
|
# ? Aug 16, 2010 23:15 |
|
Pfhreak posted:I'm looking to play around and implement 'boids' in actionscipt. I'd like to use the concept in a really simple game. I've used Flixel, and I kind of liked it, but I also want to know what other options are out there for generic lightweight flash platforms. What's good and what isn't? Just use the DisplayObject tree and basic Events. They're super easy to work with and will help you learn more about AS3 and Flash in general. That said, Flixel has some things right (using a single ENTER_FRAME event updating an array of objects). Flixel is great for its speed, but if you want vector boids (and I'm assuming you do, as they rotate a lot) learn some flash. Or if you just want another bitmap library, FlashPunk is supposed to be really good.
|
# ? Aug 17, 2010 01:43 |
|
iopred posted:Just use the DisplayObject tree and basic Events. They're super easy to work with and will help you learn more about AS3 and Flash in general. What are the free solutions for doing this? I've used flashdevelop, and had great success with AS3 there, but what would I use for the vector graphics?
|
# ? Aug 17, 2010 22:32 |
|
Pfhreak posted:What are the free solutions for doing this? I've used flashdevelop, and had great success with AS3 there, but what would I use for the vector graphics? FlashDevelop is perfect. You can either draw with Flash's Draw API: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Graphics.html?allClasses=1 If you go this route, use the lightweight class "Shape" and add it to the display list. or embed SVG which you can edit with free SVG editors like Inkscape: http://www.streamhead.com/how-to-use-vector-graphics-in-flashdevelop-svg-in-flash/
|
# ? Aug 17, 2010 22:58 |
|
I was casually perusing the open-source game engines, looking for something that can take care of a lot of the nitty gritty so I can spend a lot of time on game logic. I was looking for a 3d engine, but for which I could develop something that renders most of the world in basically tiles; the world representation might be mostly 2d, but it would be a 3d environment. Think something like an adventure/action RPG. I was hoping there was something out there to take care of manipulating models for the most part and getting all the crap drawn with me kind of just pointing and grunting. Performance-wise, I hoped it would have an easy way to break everything up while allow seamlessly crossing a large number of tiles. I can program in C++, C, Python, and Java without any problem; I just as well assume it would be in C++. I was looking at Irrlicht, since it seems to provide decent enough drawing facilities and adding sound and such at first glance doesn't seem like the end of the world. Is there something perhaps more suitable?
|
# ? Aug 18, 2010 06:39 |
|
Where is some good Mac game programming starter information? Basic crap like getting keypresses and the ways to draw to the screen. Going to try to slap together a tetris clone or something.
|
# ? Aug 19, 2010 04:33 |
|
Rocko Bonaparte posted:I was casually perusing the open-source game engines, looking for something that can take care of a lot of the nitty gritty so I can spend a lot of time on game logic. I was looking for a 3d engine, but for which I could develop something that renders most of the world in basically tiles; the world representation might be mostly 2d, but it would be a 3d environment. Think something like an adventure/action RPG. I was hoping there was something out there to take care of manipulating models for the most part and getting all the crap drawn with me kind of just pointing and grunting. Performance-wise, I hoped it would have an easy way to break everything up while allow seamlessly crossing a large number of tiles. I can program in C++, C, Python, and Java without any problem; I just as well assume it would be in C++. Irrlicht is really easy to use, though, so you might enjoy it. Models can be loaded and added to the scene with only a couple lines of code, and you can easily draw 2D images. It also includes a bunch of tutorials that show just how easy to use it is. As for 2D tiles in a 3D environment, do you mean you want your tiles to actually be a mesh in your scene that you can manipulate? Irrlicht provides some 2D drawing functions so you can easily draw your 2D level then draw your 3D scene on top of it. But, if you want that 2D level to be a part of that 3D scene, it starts becoming difficult. You would be required to create your own custom scene node to draw your tiles. It also doesn't have any easy way to "break everything up while allow seamlessly crossing a large number of tiles." That would be your responsibility to do if you used Irrlicht. Basically, without knowing how much programming you are willing to do, I don't know if Irrlicht would be a good choice. Its main job is just to draw things on your screen. Everything else would have to be programmed by you.
|
# ? Aug 19, 2010 16:31 |
|
Krackbaby posted:I've created games in C++/Java/Python via PyGame/Lua and Game Maker (using a mixture of the GM gui and GML). Oh, man thank you so much for this response. This is exactly the kind of thing I was looking for. I will take your advice to heart. Which for me means continuing on my course with python. thx.
|
# ? Aug 19, 2010 22:46 |
|
Nalin posted:What is this "nitty gritty" that you don't want to spend time on? Irrlicht is mainly just a graphics engine with some support for additional things like input handling. It is probably the least complete package for game making that I can think of off hand. quote:Irrlicht is really easy to use, though, so you might enjoy it. Models can be loaded and added to the scene with only a couple lines of code, and you can easily draw 2D images. It also includes a bunch of tutorials that show just how easy to use it is. quote:As for 2D tiles in a 3D environment, do you mean you want your tiles to actually be a mesh in your scene that you can manipulate? Irrlicht provides some 2D drawing functions so you can easily draw your 2D level then draw your 3D scene on top of it. But, if you want that 2D level to be a part of that 3D scene, it starts becoming difficult. You would be required to create your own custom scene node to draw your tiles. It also doesn't have any easy way to "break everything up while allow seamlessly crossing a large number of tiles." That would be your responsibility to do if you used Irrlicht. I figured it would be pretty easy to cull the game world down to what's in the immediate vicinity of the view. I have done that before so that doesn't bother me too much. I suppose architecturally I could split the world up into various groups of scene nodes and be able to turn off these larger groups as I move around. Then each would have the various surfaces all plopped together within the group. Could Irrlicht then take care of the matter of getting it all in place, looking pretty? Could it then help me if I had something running around bopping stuff there?
|
# ? Aug 20, 2010 04:29 |
|
Bob Morales posted:Where is some good Mac game programming starter information? Basic crap like getting keypresses and the ways to draw to the screen. Going to try to slap together a tetris clone or something. https://www.idevgames.com has a ton of information via forum or tutorials. They also release mac game development related news.
|
# ? Aug 20, 2010 04:38 |
|
Cross posting this from iOS games thread: My game, Kittyball, just went live! http://itunes.apple.com/us/app/kittyball/id384866969?mt=8 quote:Help Kittyball escape from the evil Dogcube in a high-speed chase full of zooms and jumps! Kittyball’s simple one-button design makes it easy to learn AND has amazing replay value. You’ll love playing Kittyball over and over -- if you don’t die from cuteness overload first! Just touch the screen to increase gravity and make Kittyball zip down the slopes!
|
# ? Aug 20, 2010 04:50 |
|
I need algorithm help. I'm playing around with implementing flocking, and I'm having some reasonably good success so far after only an hour or two. Right now I've got any number of boids tracking my mouse with some real hacked together collision response. Problem is, I'm checking distances between every single node every frame for collision detection. This works just fine for 30 boids at a time but obviously does not scale well to 300 boids. Currently, every frame I compute the distance between every boid, which is an n^2 algorithm. I know there is a better way to do this, but beer and lack of sleep are preventing it from coming to my mind. Would a KD Tree be a reasonable route? It seems like I could use that to query for only the 10 nearest neighbors, but I'd have to rebuild the tree every frame as my critters are moving around. Thats what, n log n for the building of the tree? Anyone know of an actionscript 3 implementation I can borrow? (Or maybe actionscript has a collision algorithm built in that would make this problem easier?)
|
# ? Aug 20, 2010 05:22 |
|
Pfhreak posted:I need algorithm help. I'm playing around with implementing flocking ... Edit: Duh. I didn't understand the problem you were having. The problem of finding nearest neighbors is one that has often crept up in computational physics. See: Molecular Dynamics, Stochastic Rotation Dynamics, Monte Carlo, etc. The solution usually ends up being some kind of binning, and then checking the current bin, then neighboring bins until a match is found. Not my field, so I can't really get more specific than that. emf fucked around with this message at 07:02 on Aug 20, 2010 |
# ? Aug 20, 2010 06:33 |
|
emf posted:I can't help you with a fancy algorithm, but maybe this will help: I remember reading in some science magazine (Nature, Scientific American, or American Scientist, or some drat thing) that flocking behavior can be reproduced when individual entities track as few as two other (nearby and leading) entities. Maybe you want to bump it to keep the flock more coherent. Maybe worth a try? The problem is determining which flock entity is 'nearby'. Right now I look at all of them and then pick the closest one, which is way slower than doing some sort of divide and conquer algorithm
|
# ? Aug 20, 2010 06:41 |
|
Pfhreak posted:I need algorithm help. I'm playing around with implementing flocking, and I'm having some reasonably good success so far after only an hour or two. Right now I've got any number of boids tracking my mouse with some real hacked together collision response. Keep two lists, one sorted by x and one by y. When you look for the closest boid, search your lists for the closest boid above and below, and to the left and right. Then do the x*x+y*y thing. O(lg n) lookups, O(1) compares. Turns into O(n lg n) for each frame.
|
# ? Aug 20, 2010 06:45 |
|
You could place a coarse grid over your screen area where the size of each grid element is about 2x or 3x the diameter of a single boid and contains a list of all the boids contained in its area. On each update step have every boid register itself with the grid element that it is in, and then do 'respond to neighbor' checks between only boids in the same element and its adjacent grid squares. The registering each boid step should be O(n), and the neighbor checks are still O(n^2) but with small values of n. Also, like LOLLERZ pointed out, use distance squared and not distance when doing your comparison checks. It saves computing the square root which is relatively expensive and doesn't add anything since both d and d^2 are monotonic functions.
|
# ? Aug 20, 2010 14:35 |
|
PDP-1 posted:You could place a coarse grid over your screen area where the size of each grid element is about 2x or 3x the diameter of a single boid and contains a list of all the boids contained in its area. On each update step have every boid register itself with the grid element that it is in, and then do 'respond to neighbor' checks between only boids in the same element and its adjacent grid squares. Yep, I'm using distance squared already. I kind of like this 'bucket' idea. It doesn't help the worst case (unless the buckets change their dimensions on the fly) but it sounds like it will likely speed things up in the average case.
|
# ? Aug 20, 2010 14:47 |
|
Rocko Bonaparte posted:I don't want to worry too much about collision detection, or least at the point of determining if surfaces within the scene truly collided, rather than doing some of the initial culling. I'd also like something that can load models and perform various actions associated with the model without having to have a lot of micromanagerial code attached to it. Rocko Bonaparte posted:I imagined the game having a mostly angled top-down view, with most of the world drawn up in a grid of tiles. There could be hills and ramps though, and special objects, but I figured the bulk of it would be tiles. Creating the world then would be a matter of making an editor to paint all these tiles. Rocko Bonaparte posted:I figured it would be pretty easy to cull the game world down to what's in the immediate vicinity of the view. I have done that before so that doesn't bother me too much. I suppose architecturally I could split the world up into various groups of scene nodes and be able to turn off these larger groups as I move around. Then each would have the various surfaces all plopped together within the group. Could Irrlicht then take care of the matter of getting it all in place, looking pretty? Could it then help me if I had something running around bopping stuff there?
|
# ? Aug 20, 2010 19:23 |
|
Does anyone here have experience with the Farseer physics engine? Also, if so, have you used it with XNA? How was it?
|
# ? Aug 23, 2010 19:14 |
|
I've used it, haven't done too much advanced with it but it's straight forward to use and fairly flexible.
|
# ? Aug 23, 2010 19:28 |
|
Could you go into a little more detail if possible? Are there any other engines you'd recommend over it for purely C# XNA development? Do you have any comment on performance, or any particular annoying things that you've encountered while using it? I'm thinking of starting some sort of side-scrolling Metroid-style game and am trying to find a decent physics engine which handles basic 2D collisions and has a decent API. Nothing overly complicated.
|
# ? Aug 23, 2010 19:36 |
|
I haven't used any other engines, but from what you said you're making this should be fine. Performance has been fine, I've never encountered any issues and I'm also working on a side scrolling game so you'd probably have similar amounts of enemies and platforms. You can assign every object to up to about 20 collision categories and set what it collides with. So you can have your level geom as Cat1, and the feet of people as Cat2 and tell the game that Cat1 collides with Cat2. Every object has an OnCollision and OnSeperation event that you can override, so you can damage the player when they land based on their velocity. Objects also have tags, so you could tag level geom to be what surface type it is and so on. I've found it really flexible and it speeds things up loads. It can be a bit of a pain at the start while you find your way around it, and there's a lack of well explained examples. The one thing against it is that it doesn't do anything to stop tunneling(but the next version will whenever it's released), so if you have an object moving fast it can pass through other objects or get stuck in them. In my case I disable collision checks at certain times to support jumping up to higher platforms and sometimes objects get stuck inside others and go a bit mental when you turn the collisions back on. I haven't gotten round to working out how to handle that just yet.
|
# ? Aug 24, 2010 13:58 |
|
(Hate to crosspost, but this was in the 3D programming thread when I should have put it here first) I've been dinking around with OpenGL on Mac OS X, putting together a simple puzzle game. Right now my game objects are solid rectangles that I just do this for: glColor3f(1.0, 1.0, 1.0) glBegin(GL_QUADS) glVertex3i(x,y, x+height,y+height) ... glEnd() So I figure I should add some bitmapped graphics. I found a 'sprite sheet' or whatever you call it on a free game art website. Cool, right? Sort of. I load the file, assign it to a texture. Then I draw a quad, and texture it. First question: Is it possible to change the coordinates of the texture I load so that I can specify texture coordinates on a pixel-by-pixel basis? When I do my glOrtho for my screen, I use the actual dimensions so that when I draw a line from 0,0 to 640,480, it goes all the way across the screen (instead of having to use 0,0, 1,1 or something) The idea would be that I could pick my sprites from the sprite sheet by just saying glTexCoord2i(1,32), instead of having to multiply the coordinates 1 and 32 by 1/texture_size, and passing those to glCoord2f(.015625, .1875). I guess I could have already wrote and debugged the code to just use those types of values by the time it took me to write this post. Second question: What's the easiest way to make the hot pink (or green, or whatever the background color is) transparent? Ideally I want to end up being able to do something like drawTexture(x, y, BRICK) or whatever the object is at that location of the game grid, basically assign each sprite to it's own GLuint texture. But it looks like I am choosing the texture coords for each one when I draw it. I'd like to do that when I load them. Bob Morales fucked around with this message at 14:25 on Aug 24, 2010 |
# ? Aug 24, 2010 14:22 |
|
seregrail7 posted:The one thing against it is that it doesn't do anything to stop tunneling(but the next version will whenever it's released), so if you have an object moving fast it can pass through other objects or get stuck in them.
|
# ? Aug 24, 2010 14:35 |
|
onecircles posted:I've always wanted to make videogames. For a while I got into game maker and made some cool little prototypes, then for a while there was no room in my life for working on videogames so I put it on the back burner. I just want to point out to you that learning any programming language is a good idea. There are several key concepts and structures you need to grasp, and most languages implement them in some way. Just like how learning any spoken/written language reinforces all the other ones you already know.
|
# ? Aug 24, 2010 17:07 |
|
Orzo posted:They actually released a new version 2 days ago with 'continuous collision detection', which, from the description, sounds like the solution to the problem. Anyway, thanks for your input. Cool, I'll check that out. I'm wondering how much hassle gong form 2 to 3 will be though...
|
# ? Aug 24, 2010 21:23 |
|
Intel Penguin posted:I just want to point out to you that learning any programming language is a good idea. Yeah. You are right about that. I am learning so much in the MIT course in the OP(of the python thread), and I'm still at the beginning. I'm starting to feel that it doesn't matter what programming language I learn, so much as the fact that I am learning any programming language. Right now I'm trying to get a handle on what the development process for a game that you program yourself looks like. It seems that if you take the programming approach to video games (as opposed to game maker) you get a lot more freedom, but you pay development time and you have to really know how every single part of the game works in detail. Right now the prospect of learning how to, for instance, paint the screen, sounds daunting to me. In my old gm days I just put my objects in rooms and defined their behavior. In game maker, the engine is already provided for you. If you program a game, it seems the first thing you have to do is make your engine. which reminds me. I have a question for any programmers itt. Say I am making a side scrolling game with a big map like Super Metroid. I really cannot imagine creating a map like that in code. The developers must have built a gui based program that they could use to "paint" the tiles into the world map. So my question is this. Is it assumed that during the development cycle you will build your own little gui programs for, say, building the worlds you will be working with etc? Or do people commonly use third party utilities for this? I hope the question makes sense. Thanks! edit: Mistakenly referenced the python thread in this thread. The MIT course I said was in the op was not in the op. It was in the op of the python thread. Woopsie! onecircles fucked around with this message at 02:05 on Aug 25, 2010 |
# ? Aug 24, 2010 23:56 |
|
A map or level editor is an essential part of any game with maps or levels. The quality you put into it if you are all by yourself is a simple tradeoff, estimating the amount of time you will spend creating and reworking the levels for your game by hand against the amount of time spent on a full-featured level editor. As a bonus, if you make your level editor good enough, not only do you get to iterate over your levels more easily and efficiently (making your game better), you might also get it close enough that an extra layer of polish makes it releasable along with your game, allowing your players to create their own levels and share them with one another.
|
# ? Aug 25, 2010 00:18 |
|
onecircles posted:So my question is this. Is it assumed that during the development cycle you will build your own little gui programs for, say, building the worlds you will be working with etc? Or do people commonly use third party utilities for this? I've heard of people hard-coding content. I've heard of people manually editing resource files in Notepad or a hex editor. I've even heard of people creating tilemaps in mspaint by assigning each tile a different color. None of these approaches scale well. It's generally expected that you'll need to write some kind of editor unless your game is trivially small. Super Metroid is an incredibly difficult project for a beginner. I strongly recommend making a Tetris clone first.
|
# ? Aug 25, 2010 00:24 |
|
I'm starting to realize that game development is really difficult! Not only do you have to make your game, you have to make the tools you use to make your game. BOOTSTRAPS!!! Null Pointer thanks for the advice. I am absolutely not planning to make a super metroid clone any time soon. That is my favorite game of all time, and I understand the amount of work that was put into it. I have an idea for one. One day, if I get good enough, then I will make it. Right now I am just working on programming. When I advance far enough at that, my first project will probably be a Conways Life implementation.
|
# ? Aug 25, 2010 01:59 |
|
I just finished Cave Story, and it has given me a newfound enthusiasm towards development. God that was a well put together game. So simple but so effective!
|
# ? Aug 25, 2010 03:59 |
|
I'm having decent enough fun with Irrlicht so far. As brought up earlier, I'm trying to create my own scene node type for represent world data in the tiled representation I want. It will probably be awhile before I get far with it just out of time, but I wanted to ask about some more general concepts here. Generally what kind of detail do people leave to individual nodes in a scene graph? I think this is a general question since scene graphs are common enough. Is it common to, say, have an entire game level in one scene graph node? What about models and objects? Generally how are they generally organized in a scene graph? I also have an issue with texturing. Image I have a grid of 2x2 squares that have the same texture across them in a way that the surface appears continuous. Now let's say I push down the centermost vertex. How can I maintain that continuity across the different squares?
|
# ? Aug 25, 2010 06:23 |
|
onecircles posted:So my question is this. Is it assumed that during the development cycle you will build your own little gui programs for, say, building the worlds you will be working with etc? Or do people commonly use third party utilities for this? code:
Once you have an engine that can run this, then you can worry about making an editor that lets you 'pretty it up' and iterate gameplay ideas in a more visually appealing format. Rocko Bonaparte posted:I also have an issue with texturing. Image I have a grid of 2x2 squares that have the same texture across them in a way that the surface appears continuous. Now let's say I push down the centermost vertex. How can I maintain that continuity across the different squares?
|
# ? Aug 25, 2010 16:23 |
|
Integrate the level editor with the game. Can't jump over something? Make it shorter. Area too easy? Throw in a few bad guys.
|
# ? Aug 25, 2010 18:21 |
|
PDP-1 posted:Assuming that the squares are laying in the (X,Z) plane and Y is up, just use the (X,Z) coordinates as the UV coordinates of the texture, and set the texture sampler to wrap mode. I'm not sure what you mean by 2x2 squares, but you may possibly have to scale a bit, like X/2->U and Z/2->V to get it to look the way you want. Actually a more interesting problem I think could be if I, say, dragged one of the end mid points up. Ehh let me scribble is out: code:
|
# ? Aug 25, 2010 18:24 |
|
If your point 'O' starts out a (1,0) and you move it up to (1,0.5) without changing the UV coordinates, then yes you will get texture stretching/compression. But, if you are mapping the (X,Z) spatial coordinates onto the (U,V) texture coordinates within your shader then when you move the point the UV coordinates change along with the new location and the texture will look the same as before, but just be mapped to a different surface shape. The texture won't be distorted, it just won't be sampled at (1,0) anymore. In crappy pseudo-HLSL it'd look something like this: code:
|
# ? Aug 25, 2010 19:54 |
|
Bob Morales posted:Integrate the level editor with the game. Can't jump over something? Make it shorter. Area too easy? Throw in a few bad guys. This can get pretty tricky for more complicated games, but doing it properly can have a wonderful impact on the architecture of your game engine. Being able to pause a game in progress, change level data and resume, for example, will force you to centralize access to resources and bundle up persistent state in an opaque fashion. It may be an overly ambitious idea for your first game with levels, but definitely something to try eventually.
|
# ? Aug 25, 2010 21:27 |
|
|
# ? May 25, 2024 15:24 |
|
I have to admit right off the bat that I haven't read through the entire thread (it's massive!), however I have read the first few pages and checked the game programming wiki. Okay, here goes.. I've been programming on and off for about two years now, got the basics of Java and C++ down. I've been spending a lot of time learning SDL (with C++), and that's what I'm using for my current project(s). My problem is that I'm absolutely terrible with (OO) design and I usually either a) Never get started/get lost in the design b) Start without a design and get stuck somewhere and have to rewrite loads of code This is because I really don't know where to start. I completely love the idea behind OO, and I've used it a lot for smaller projects but with complex things like game engines it's just a bit too much. One of my first wannabe game projects was a roguelike (in the loosest sense possible), but I gave that up after rewriting the entire code several times a day when adding features. Now I'm trying to get something similar going (minimalistic RPG) but my head hurts from trying to figure out how to plan it. I have already made simple games without much OO, straightforward arcade games (in case anyone is wondering!) so it's not that I'm trying something way out of my league, it's just.. something I never really learned! I'm very much a "learn by seeing"-person, so seeing how others organize their code helps me a lot, but all the code I've come across this far has been so complex that it's hard to see how it's all connected. What I want is a very basic structure that can be expanded without having to rewrite everything. Are there any resources or books for this sort of thing? It's just all so new to me, it's hard to wrap my head around it! I've gone through all the tutorials at http://www.sdltutorials.com and while they've helped a lot it's still missing some important things (which I guess will get posted eventually as the author is still writing tutorials). All resources, books and webpages (especially if it concerns RPG-style games and not just SHMUPS) are VERY welcome!
|
# ? Aug 25, 2010 23:11 |