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
haveblue
Aug 15, 2005



Toilet Rascal

Morpheus posted:

Does the player go through an 'attack' animation that includes the sword he is holding? If so, I do I declare that -this- part of the animation (the swordy part) will damage the monster?

More or less. You'd have a keyframe which you decide is the moment the attack happens, and at that moment you'd determine which, if any, mob is under attack and deliver the damage.

A lot of games fake melee attacks by firing an invisible short-range projectile, if that helps.

Adbot
ADBOT LOVES YOU

haveblue
Aug 15, 2005



Toilet Rascal

Pfhreak posted:

Separate question. If I draw a trianglelist with a vertexbuffer and indexbuffer in XNA, does it matter in which order I add the triangles to the indexbuffer?

I am NOT asking if it matters which order the vertices are added. I know that winding order is very important.

I am asking if it matters which order I have the triangles in the indexbuffer.

No, not really. The only cost to a suboptimal (i.e. totally random) order is a tiny amount of performance from poor caching, but there is no "wrong" order that will seriously break things.

haveblue
Aug 15, 2005



Toilet Rascal
You can do all of that except possibly the shaders in Python, so if you're just getting into game dev should be fine.

I wouldn't be surprised if it can do shaders anyway and I just don't know about it.

haveblue
Aug 15, 2005



Toilet Rascal
Sorry, that really is the best way (draw solid black and then wireframe). The depth test is only evaluated for a pixel when it's touched by a primitive, drawing outlines isn't enough.

haveblue
Aug 15, 2005



Toilet Rascal

Chris Awful posted:

Is it possible to set the origin in opengl to the topleft part of the screen, and keep it there when resizing the window?

You can't make it happen magically for free within GL itself, but it's pretty easy to put something that restores that setup in the reshape handler or whatever your windowing system uses.

haveblue
Aug 15, 2005



Toilet Rascal

HolaMundo posted:

I've been trying to figure out how game worlds like the ones in Braid are achieved (you can see a bit here http://www.davidhellman.net/blog/the-art-of-braid-part-4/). Instead of using tiles (with a fixed size) they use "pieces" which can be resized and placed anywhere in the level.
I'm guessing it might not be so hard, but I googled to find articles about this or atleast what data structures can be used but had no luck.

Does anyone have any idea about this? Or if you know of any article explaining how it works, please post a link to it.

The most advanced data structure for a collection of 2D regions is probably the quadtree, but modern hardware is so far past the demands of Braid's scenes that he may as well just do a simple bounds check on everything in the world or throw it at DX/GL and let the clip stage deal with it.

haveblue
Aug 15, 2005



Toilet Rascal

Luigi Thirty posted:

I thought of this but dismissed it as the cheap way out.

Just because it involves less typing and math doesn't mean it's the cheap way. The engine's built-in transformation system is probably faster than doing it yourself in the high-level language, and involving the full GameObject hierarchy means you can now fire projectiles from any relative location you can express with that system, rather than hard-coding angles and offsets. Plus, you open the door for adjusting the position in the future without having to touch the code that instantiates and configures the projectile, which would come in handy if you have someone else working with you, especially an artist who can't necessarily code.

Not that any of that necessarily applies to you or this particular project, but it's good to get into the habit of thinking about implications.

haveblue
Aug 15, 2005



Toilet Rascal
HTML5/JS is the "best" solution in that it seems set to become the preferred method in the future, but there are no slick, friendly dev environments for it yet the way there are for all the others. If you just want to whip up a quick game, as a learning experience, use Flash, Unity, or Silverlight.

haveblue
Aug 15, 2005



Toilet Rascal
You could probably do bitfield pathfinding with marching squares, which is fairly simple.

haveblue
Aug 15, 2005



Toilet Rascal
A few years ago Marvel sued the City of Heroes dev (NCSoft) for allowing players to infringe Marvel copyrights with their character creator. They settled, but it looked like NCSoft had the upper hand by the end. So it's not quite as gray as all that- you can allow your users some freedom to use your game without being directly liable for what they do, but if you name your game "Pokamom" and have a /put_rom_here directory you will probably get in trouble.

Either way, I'm not a lawyer.

haveblue
Aug 15, 2005



Toilet Rascal

Hanpan posted:

Anyone have any idea what kind of language developing something like Super Meat Boy would be best suited to? I've seen a lot of those kind of games recently and I'm keen to know what powers it.

I think SMB started out as a Flash game before it was remade for Xbox. Any of the major languages can do a 2D platformer, but Flash is probably faster and easier for that specific sort of game.

haveblue
Aug 15, 2005



Toilet Rascal

roomforthetuna posted:

I have a question that should be pretty simple - what's the best (or a good) way to make a color-configurable object in 3D, such that you can have ten of the same object with different colors and without ten duplicates of the model and without changing the vertex data between renders?

For example, say I wanted to use a flag object with a fixed pattern but three user-configurable colors. I figure one way would be to split the object into three sub-objects and render them each with different colored lighting. Is there a better way than that?

More or less. You'd split up the base geometry into one class and the characteristics of each instance of the flag into a second, then instantiate three of the second that all refer back to the single base instance and have them call the base's render method after setting up their unique transformation and lighting.

haveblue
Aug 15, 2005



Toilet Rascal
Put it this way- anything you are currently calling glTexEnv or glActiveTexture to accomplish (I forget what the DX fixed-function equivalent to these are) can be done much more cleanly and easily with a shader.

haveblue
Aug 15, 2005



Toilet Rascal
And besides, if your hobbyist indie game becomes popular enough that cheating is a serious problem that must be addressed, you've succeeded beyond your wildest dreams anyway.

haveblue
Aug 15, 2005



Toilet Rascal

AuMaestro posted:

(especially popular with roguelike games for some reason)

Save file integrity checks are actually an official trope of the roguelike genre. NetHack is extremely devious about this and everyone imitates it.

haveblue
Aug 15, 2005



Toilet Rascal

Vino posted:

There's a CEntity class for the server and a C_Entity class for the client,

This is a horrible, horrible naming convention (unless you just pulled it out of your rear end for this example).

quote:

How's it work in Unreal? I've never coded in Unreal.

As I understand it Unreal works at the level of individual variables. Object instances are identical on the server and all clients (with the server authoritative) and certain members are tagged as replicated, which causes them to be asynchronously kept up to date with the values of their remote equivalents. You can request different priorities, interpolation types, etc for each of them. The core network layer marshals all the pending updates into bundles, invisibly.

haveblue
Aug 15, 2005



Toilet Rascal
That article was written in early 2009 and the Cortex A8 (3GS/4/iPad) supports hardware square root, so I don't think it applies any more.

haveblue
Aug 15, 2005



Toilet Rascal
JSON?

haveblue
Aug 15, 2005



Toilet Rascal
It's only called that because it was invented for AJAX serialization, it's a generic heirachic key-value format and you can find parsers for just about anything.

haveblue
Aug 15, 2005



Toilet Rascal

roomforthetuna posted:

Would the iPhone browser support Java games? If so, that would probably make it the best option for Sagacity, apart from the whole "it pretty much sucks to work with compared to Flash" thing, but I'm sure that would have been true of HTML5 as well.

No Java or plugins of any kind on the phone. It's JS/HTML5 or nothing.

haveblue
Aug 15, 2005



Toilet Rascal

Morpheus posted:

Why would you? A single value would be sufficient, wouldn't it?

Edit: Oh wait you mean multiplying each point by a matrix to rotate...that works too.

What if you want to both rotate and translate the point, or build an articulated character using 2D skeletal animation? Matrices still have the same advantages in 2D.

haveblue
Aug 15, 2005



Toilet Rascal
It will also help you a lot, if you haven't done it, to give the button its own ability to do basic state changes in response to clicks (changing highlight or image, etc) and handle mousedown/tracking rect/mouseup or cancel rather than trying to handle all that in backend code.

haveblue
Aug 15, 2005



Toilet Rascal
FBX is terrible for live engines, it's meant for writing exporters.

haveblue
Aug 15, 2005



Toilet Rascal

Physical posted:

Yep I understand its a multi-pass render. I'm not confident with shaders yet. If you've got anything else please educate me.

Can you further explain how the triangles get rasterized on their trip between the vertex and pixel shader? What are they getting rasterized to? The screen plane? And do they get rasterized in 2D or 3D?

The vertex shader outputs in screen space (2D). It is responsible for the projection transformation that converts the positions from 3D to 2D.

The triangles are then rasterized on the screen and the pixels they cover are sent to the pixel shader.

Adbot
ADBOT LOVES YOU

haveblue
Aug 15, 2005



Toilet Rascal

Physical posted:

Also are texture coordinates in 2D or 3D? I would think they are in 2D and are only represent UV coords. And What does the W do? How in Maya would UVW mapping help me more than projection mapping?

You're right about texture coordinates, they are UVs on the surface of the object. The W coordinate is used for 3D textures, which are a solid volume of samples rather than a single image.

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