Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
wlievens
Nov 26, 2006

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.

I could use a matrix of bitfields representing whether each pixel is destroyed or not, but it seems like there would be a more advanced approach. What are some potential ideas for implementing such a system?

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/

Adbot
ADBOT LOVES YOU

dizzywhip
Dec 23, 2005

dizzywhip fucked around with this message at 21:55 on Nov 9, 2020

Pfhreak
Jan 30, 2004

Frog Blast The Vent Core!
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?

iopred
Aug 14, 2005

Heli Attack!

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.

Pfhreak
Jan 30, 2004

Frog Blast The Vent Core!

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.

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.

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?

iopred
Aug 14, 2005

Heli Attack!

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/

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!
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?

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

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.

Nalin
Sep 29, 2007

Hair Elf

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++.

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?
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.

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.

onecircles
May 6, 2009

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).

Game Maker is fine for creating games, and I've seen examples of people doing impressive things with GM using GML. That said, I can assure you that during development you will run into situations where you spend more time trying to overcome GML's limitations than dealing with the programming problems at hand. Ultimately the time you spend struggling with GML can be more productively spent learning something like Python (assuming you have the motivation to do so).

I tried GM because I wanted to see how rapidly I could prototype something using it. I started with the GUI just to see how powerful it was, and how much I could get done with it, but quickly ran into enough limitations/problems that I knew I had to switch to mostly GML. After figuring out GML, I was able get further, but found myself fighting the language at times. There are certain game archetypes GM is particularly suited for, once you start breaking out of those molds, you quickly see the limitations you are under.


This is purely a matter of art. Technically speaking Pygame is perfectly capable of producing great looking 2D, it's really just a matter time and energy spent on aesthetics and the skill of the artist.

I think since GM is much more accessible it tends to draw a lot of people in who are good artists but not necessarily good programmers.


I would encourage you to make something dead simple in PyGame after learning the bare basics of Python. At the very least it will give you an idea of what you are getting yourself into.

Even though Python is generally thought of as a friendlier language, it has land mines of its own. Balancing the frustration of learning to program against the frustration with the limitations of GM is ultimately what should give you your answer. Neither is worth learning if it saps your motivation to the point where you give up.
^^^^^ This last point is excellent.


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.

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!

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.
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.

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.
That's what seemed good about it.

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 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.

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?

Oh My Science
Dec 29, 2008

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.

LOLLERZ
Dec 9, 2003
ASK ME ABOUT SPAMMING THE REPORT FORUM TO PROTECT ~MY WIFE'S~ OKCUPID PERSONALS ANALYSIS SA-MART THREAD. DO IT. ALL THE TIME. CONSTANTLY. IF SHE DOESN'T HAVE THE THREAD, SHE'LL WANT TO TALK TO ME!
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!

MARVEL at the lush handmade graphics!
SAVOR the addictive gameplay!
DELIGHT in our overwhelming hyperbole!

OpenFeint coming soon!

Kittyball is great for kids too! Our “press anywhere” interface is easy for little hands, and the super-cute graphics and fast-paced action will keep them busy for a long time!

“Everyone should buy this game!” - Blake Householder
“This is the best game in all possible universes!!!” - Sarah Householder
“My daughter loves it!” - Sarah’s dad
“Kittyball is a puny cat morsel and should be chomped by me, the handsome and angular Dogcube! BARK!” - Dogcube

Kittyball is by Blake Householder with art by Sarah Householder. :D
I worked on this game for several months, and my then-fiancee-now-wife made all the art for it. We're pretty excited!

Pfhreak
Jan 30, 2004

Frog Blast The Vent Core!
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?)

emf
Aug 1, 2002



Pfhreak posted:

I need algorithm help. I'm playing around with implementing flocking ...
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?

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

Pfhreak
Jan 30, 2004

Frog Blast The Vent Core!

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

LOLLERZ
Dec 9, 2003
ASK ME ABOUT SPAMMING THE REPORT FORUM TO PROTECT ~MY WIFE'S~ OKCUPID PERSONALS ANALYSIS SA-MART THREAD. DO IT. ALL THE TIME. CONSTANTLY. IF SHE DOESN'T HAVE THE THREAD, SHE'LL WANT TO TALK TO ME!

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.

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?)

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.

PDP-1
Oct 12, 2004

It's a beautiful day in the neighborhood.
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.

Pfhreak
Jan 30, 2004

Frog Blast The Vent Core!

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.

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.

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.

Nalin
Sep 29, 2007

Hair Elf

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.
Well, Irrlicht does have some basic collision detection. See tutorial #7. If you need anything more advanced, there are some community projects that integrate various physics engines with Irrlicht, such as irrBullet and irrODE. Tutorial #4 shows some animation basics. There are no tutorials for bone animation, nor have I experimented with it, so I can't help you there. Also, keep in mind that the tutorials on the website are old and doesn't include all the tutorials that come with the source code.

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.
Yeah, you will probably need to create your own custom scene node to do that. An easy solution that doesn't involve too much coding would be to generate a texture when the level loads and stick it on a heightmap. The video::IImage class has many drawing functions that you can use to piece together an image made out of your tiles before converting it to a video::ITexture.

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?
Irrlicht should automatically cull scene nodes. Before it draws, it checks the bounding box of each registered scene node to determine if it is in view of the camera. Any additional culling would most likely be up to the scene node. As for getting it all in place, it would be up to you to position everything in the scene. If you do end up using heightmaps, I have seen a tiled terrain scene node on the forums which will automatically tile multiple terrains together.

Orzo
Sep 3, 2004

IT! IT is confusing! Say your goddamn pronouns!
Does anyone here have experience with the Farseer physics engine? Also, if so, have you used it with XNA? How was it?

seregrail7
Nov 3, 2006
I've used it, haven't done too much advanced with it but it's straight forward to use and fairly flexible.

Orzo
Sep 3, 2004

IT! IT is confusing! Say your goddamn pronouns!
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.

seregrail7
Nov 3, 2006
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.

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

(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

Orzo
Sep 3, 2004

IT! IT is confusing! Say your goddamn pronouns!

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.
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.

Intel Penguin
Sep 14, 2007
hooray

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.

Now I've decided to work at it again, but this time by approaching it from the programming side, by becoming a competent programmer, rather than from the games and ideas side.

When I used to work with game maker I never learned any GML. It seemed a bit of a waste to learn a whole computer programming language that is only functional in this one very small space (game maker). I need to be able to program to do the cool stuff I want to do though. So I decided I would learn python. There is a module extension for python called "Pygame" that is designed for making games.

I'm planning on becoming competent in Python before I even begin with Pygame.

Now I'm looking around on the Pygame website at the projects that have been made with it, and I am not impressed. They really look awful, especially when compared to some of the game maker projects I've seen and played before.

I also watched a video by "thenewboston" on youtube detailing some of the stuff you can do in Pygame and how to do it, and it just seems really inefficient and impractical.

Sometimes it is best to create something using a Gui rather than by code. You could theoretically program line by line, the computer graphics in final fantasy - the movie, but this is an unspeakably inefficient way of going about it. Best just use Maya instead.

Mind you, I am not an experienced programmer, or an experienced maker of games really. I also don't really know what's going on in pygame, as I'm mainly focusing on python right now.

But what I'm worried about is that I might not be taking the correct path. My far off goal is to be one of those cool guys that makes their own awesome games from scratch. Folks like cactus, darth lupi, tapeworm etc. All these guys use game maker!

I don't know what to do. I want to be a competent programmer if I'm going to make games, but I don't want to get so wrapped up in the minutiae of one particular aspect of game development and never make any games as a result. For instance, I don't want to learn C++ to make games. I am only one man. I don't want to bite off more than I can chew. To make videogames on your own you have to know how to do a lot of things pretty well. Art, math, music, programming.

Many people, including myself, have been dismissive of game maker because it operates through a GUI. If you rely upon that GUI too heavily, you won't be able to make anything very complex or interesting, but I've come to realize that a GUI is a tool. And creative people need tools to make their work more efficient.

To take an example from python: I read on some website that even developers that work primarily in other languages like knowing python because they can use it to go through the conceptual development phase of building the software many times faster than in the lower level languages.

Do any of you guys use Game Maker? Do you program in Python or Pygame? What are your impressions of these.

I want to make my own videogames. I have retro sensibilities. Maybe I should just learn Game Maker and GML. Is there any way to make python or any other (real) programming language work with game maker?

I am honestly prejudiced against GML. Why would I learn it when I could spend the energy learning a real language that has uses outside of games?

Thanks in advance to anyone who takes the time to comment on the things I've said or give me advice or answer my questions.

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.

seregrail7
Nov 3, 2006

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...

onecircles
May 6, 2009

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

Star Warrior X
Jul 14, 2004

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.

Null Pointer
May 20, 2004

Oh no!

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?
You'll be able to find applications to make most of your content (e.g. Photoshop,) but it's difficult or impossible to find tools that will do everything your game needs.

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.

onecircles
May 6, 2009
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!!! :black101:

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.

Pfhreak
Jan 30, 2004

Frog Blast The Vent Core!
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!

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!
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?

PDP-1
Oct 12, 2004

It's a beautiful day in the neighborhood.

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?
It sounds to me like you're just starting out and at that stage I'd recommend not worrying about making a dedicated level editor, and just use a simple text file for now. If you make a LevelLoader object that takes the level name as input and returns a tilemap array as output, the internals of the LevelLoader can work with text files for now and later on you can change it up to work with some kind of more complex format.

code:
###############################
#.............................#
#........M.........M.........F#
#.......####......####....#####
#..............M..............#
####.........####........######
#.............................#
#.P................#####...M..#
###############################
Here's an example text file level I made in under a minute. The player starts at P and has to get to the finishing point F while avoiding monsters M. Hash marks are solid blocks, periods are clear space.

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?
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.

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

Integrate the level editor with the game. Can't jump over something? Make it shorter. Area too easy? Throw in a few bad guys.

Rocko Bonaparte
Mar 12, 2002

Every day is Friday!

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.
It's more complicated than that. Imagine each square's surface is mapping texture coordinates from (0,0) to (1,1), such that in either direction the texture is repeated twice. But then I start deforming things by taking the centermost point and move it around. What do I have to do to keep the same scaling, but retain that continuity?

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:
+---+---+
|   |   |
+---+---+
|   |   |
+---O---+
Say I took the point at 'O' and I stetched it up while retaining the positions everywhere else. How can I ensure that I can have that shape but not distort the texture? I am expecting I have to start to split up this mesh to keep the 1:1 proportion of texture/surface, since stretching any of the points up or down in effect increases its surface area.

PDP-1
Oct 12, 2004

It's a beautiful day in the neighborhood.
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:
struct VS_Input{
  float4 Position :POSITION0;
};

struct VS_Output{
  float2 UV :TEXCOORD0;
};

VS_Output vertex_shader(VS_Input input){
  VS_Output output;
  output.UV.x = input.Position.x;
  output.UV.y = input.Position.z;
  return output;
};

float4 pixel_shader(VS_Output input){
  float4 c = tex2D(textureSampler, input.UV);
  return c;
};
With something like that you can move the vertex position around, and the UV coordinates will change automatically in response without stretching/compressing anything.

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."

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.

Adbot
ADBOT LOVES YOU

Your Computer
Oct 3, 2008




Grimey Drawer
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!

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply