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
Star Warrior X
Jul 14, 2004

Or you could just subtract the diameter of the capsule from the height of the capsule. Yeah, his feet might stick out just a bit, but he won't be floating.

Adbot
ADBOT LOVES YOU

Crazak P
Apr 11, 2003

PUNISHER > SPIDERMAN

TSDK posted:

equations

Thanks, I'm implementing it now. However, I went to look up what powf was to make sure it was what I thought it was. I came across this as a search result.

quote:

Urban Dictionary: powf
powf - 2 definitions - The sound the female genitalia makes when trapped air is released. More often found when they are taken from behind.

Bastard
Jul 13, 2001

We are each responsible for our own destiny.
About creating a 2d game framework:

I've been messing around a bit with simple 2d games in both Flash and Java, and it struck me as a nice sideproject for me and a friend to make a 2d game engine. Although at this stage it's still a rough plan mostly inside our heads and on various pieces of paper, it sounds pretty neat in theory. The other guy has been experimenting with the Java Darkstar engine recently, and he is very impressed with it, so we are planning to add multiplayer capabilities (if ever so basic) using Darkstar.

So far we've come up with several features, and some very basic architecture. Some basic thoughts behind what this engine should be able to do:
  • Game logic like collision checking, asset management, sound management, etc.
  • Game related elements like inventories, weapons, menus etc
  • Pathfinding
  • Various basic game types (platformer, racer, rpg, adventure etc)
  • Multiplayer

And, should this project make it past the black void of never-finished projects:

  • Built-in editor for rapid prototyping

But of course, the question remains: What to build it in? Flash or Java? I know that choosing the right programming language for the job is always something that can be discussed forever, so here are some of the pros and cons we have found:

Flash/Actionscript:
Pros
  • (mostly) cross OS compatible
  • Games can be web based or desktop clients
  • Installed on a lot of computers
  • Small footprints for installer/updates
  • "Trusted" by regular users
  • Flash is, from it's beginnings, aimed at things like animation and multimedia.

Cons
  • Connection with Darkstar gives extra overhead through usage of middleware for AMF<->Java
  • No proper usage of the GPU for graphics yet (although this has been changed in Flash 10, but I don't know to what extent)
  • No threads

Java
Pros
  • (mostly) cross OS compatible
  • No extra overhead for connection with Darkstar
  • Better usage of peripherals (like a gamepad)
  • Games can be web based or desktop clients
  • Installed on quite a number of computers
  • (mostly) cross OS compatible
  • Threads

Con
  • Both webbased (applets/webstart) or desktop clients (through the commandline etc/.jar etc) are more of a hassle to use for the regular user
  • Larger footprints for installer/updates
  • Not as commonly known by regular users

So basically, we can go either way. Now my question at the end of this story is:

What would you do/recommend in this particular situation? Any particular constructive comments, ideas, pitfalls etc?

Readme to prevent stupid comments
Please don't bring up C#, XNA, C etc. Although those are all very good other options, we are choosing between Flash and Java, because we already have experience with those languages. Creating something like this in a (for us) completely new language seems a bit much. Also, please don't go down the path of "hur hur just use an existing one like pygame". We want to create something new for the learning experience.

terminatusx
Jan 27, 2009

:megaman:Indie Game Dev and Bringer of the Apocalypse
You should definitely consider looking at Flex instead of Flash for your game engine. It is more appropriate for game development, and uses actionscript (as3) like flash. Though I don't know if I'd recommend it over Java.

Bastard
Jul 13, 2001

We are each responsible for our own destiny.

terminatusx posted:

You should definitely consider looking at Flex instead of Flash for your game engine. It is more appropriate for game development, and uses actionscript (as3) like flash. Though I don't know if I'd recommend it over Java.

Yeah, should've made that more clear. When I said Flash, I meant AS3. Any comments on why you don't know if you'd recommend it over Java? Or is it just a gut feeling? :)

terminatusx
Jan 27, 2009

:megaman:Indie Game Dev and Bringer of the Apocalypse

Bastard posted:

Yeah, should've made that more clear. When I said Flash, I meant AS3. Any comments on why you don't know if you'd recommend it over Java? Or is it just a gut feeling? :)

It's just a gut feeling :D .. I don't have enough knowledge of Java to know if it's a better choice for what you want to do. Just wanted to throw my 2 cents in about the Flex > Flash thing

nolen
Apr 4, 2004

butts.
I'll throw in my opinion and say go with AS3. Flex Builder has a fantastic debugger and you have other multiplayer options with the huge plethora of socket servers offered to the Flash Player.

Though now that I think about it, Flex Builder is running on Eclipse. I guess the debugging might not be so different if you ended up going with Java.

kmqat
Aug 18, 2008

Bastard posted:

So far we've come up with several features, and some very basic architecture. Some basic thoughts behind what this engine should be able to do:
  • Game logic like collision checking, asset management, sound management, etc.
  • Game related elements like inventories, weapons, menus etc
  • Pathfinding
  • Various basic game types (platformer, racer, rpg, adventure etc)
  • Multiplayer

quote:

What would you do/recommend in this particular situation?
Honestly? Go back to the drawing board and try to come up with a better idea than "let's program the guts of every game ever into a gigantic framework."

quote:

Also, please don't go down the path of "hur hur just use an existing one like pygame". We want to create something new for the learning experience.
Pygame doesn't really give you anything that Flash doesn't out of the box. Since I'm not sure exactly what level of library functionality will make you feel insulted, I'll just drop a link to PulpCore here with no particular insinuations about whether or not you should use it.

Bastard
Jul 13, 2001

We are each responsible for our own destiny.

frig posted:

Honestly? Go back to the drawing board and try to come up with a better idea than "let's program the guts of every game ever into a gigantic framework."

We're still at the drawing board so that shouldn't be a problem ;). Every day we write down new ideas, refine exising ones and remove others, so any comments are welcome :) But I'm curious, what exactly strikes you as "too much"? I agree that the various basic game types is a bit much (it's causing a lot of interesting discussions over here), but I think features like collision detection, pathfinding etc are pretty much necessary in any game engine

frig posted:

Pygame doesn't really give you anything that Flash doesn't out of the box. Since I'm not sure exactly what level of library functionality will make you feel insulted, I'll just drop a link to PulpCore here with no particular insinuations about whether or not you should use it.

It's not insulting at all :). I posted that line to emphasise that we are looking to build a game engine, not a game itself. And of course we're looking at existing libraries, we're not going to re-invent the wheel completely. So thanks for the link to Pulpcore, it looks very interesting.

Edit: I spel gud

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.
Why would you want to write a game engine when it's a learning experience? Why not make a drat good game instead? That way you'll end up with an actual product, instead of ending up with a tool you then have to actually build a game with.

Bastard
Jul 13, 2001

We are each responsible for our own destiny.

Sagacity posted:

Why would you want to write a game engine when it's a learning experience? Why not make a drat good game instead? That way you'll end up with an actual product, instead of ending up with a tool you then have to actually build a game with.

It seems you misread my post. The learning experience is not about learing to make a game, but about what goes on behind the scenes. For a very, very basic example: "User presses button, causing in-game weapon to fire, bullet hits enemy, enemy dies".

This leads to: How does mapping a button to an action work? How do hitscan weapons work? When do you allocate resources such as sound and animation? etc.

Learning things like that is what we want to accomplish for ourselves, not making another Zybourne Clock. In the end, we're programmers, not game designers.

kmqat
Aug 18, 2008

Bastard posted:

We're still at the drawing board so that shouldn't be a problem ;). Every day we write down new ideas, refine exising ones and remove others, so any comments are welcome :) But I'm curious, what exactly strikes you as "too much"? I agree that the various basic game types is a bit much (it's causing a lot of interesting discussions over here), but I think features like collision detection, pathfinding etc are pretty much necessary in any game engine
Collision detection, sure. Tying together a 2D scene graph and a physics engine like Box2D (there are Java and Flash ports of this, btw) is something that has been done and is generally useful. The rest, though, sounds dubious. Pathfinding algorithms that are applicable to a platformer AND a racer AND an RPG? How much have you and your friend done with game AI? How are you going to generalize these "game related elements" like inventories and weapons enough to span all these game genres and yet end up with something more specific than what your language already gives you in terms of objects and containers?

Perhaps more to the point, how are you going to get the level of feedback you need on your design decisions to make something good and useful if you're not actually going to make a game with it?

My suggestion is this:
1. Narrow down the scope of your engine to one of the listed game types.
2. Come up with an idea for a demo game to develop along with the engine.
3. Add only the features you need to implement the demo game, then extract the engine from that codebase.
4. Choose another, somewhat different game to implement using your engine. Add features or refactor as necessary.

Any similarity to the development lifecycle of successful commercial game engines is entirely coincidental.

quote:

The learning experience is not about learing to make a game, but about what goes on behind the scenes. For a very, very basic example: "User presses button, causing in-game weapon to fire, bullet hits enemy, enemy dies".

This leads to: How does mapping a button to an action work? How do hitscan weapons work? When do you allocate resources such as sound and animation? etc.
:what:

This sounds a lot like learning to make a game to me.

Hubis
May 18, 2003

Boy, I wish we had one of those doomsday machines...

Bastard posted:

It seems you misread my post. The learning experience is not about learing to make a game, but about what goes on behind the scenes. For a very, very basic example: "User presses button, causing in-game weapon to fire, bullet hits enemy, enemy dies".

This leads to: How does mapping a button to an action work? How do hitscan weapons work? When do you allocate resources such as sound and animation? etc.

Learning things like that is what we want to accomplish for ourselves, not making another Zybourne Clock. In the end, we're programmers, not game designers.

I'd play devil's advocate to this by pointing out that, if you're learning what needs to be done to make a game and in turn how to do it, then you "don't know what you don't know". From personal experience, I'd say the best approach is to try and make a simple game (a Gauntlet clone is a really good example that covers a lot of bases) and take notes on what systems you needed, the way you implemented it, and what improvements/regrets you might have after the fact.

Trying to design a utility library from step one is almost always the wrong thing to do -- you almost always spend too much time overdesigning your system with no gaurentees that the decisions you are making are even any good. It would be much better to do a simple all-in-one program; then for the second iteration, pull out the code you want to keep into a library while re-writing the systems you think could be done better.

GoodbyeKitty
Jun 25, 2004

"I know I'm going away for a while. How long? Who knows.
I know it won't be no fucking 30 years, though."
I know this thread is more of a "from the ground up" game development thread, but I would like to err on the side of safety and not risk probation for starting a thread that ultimately only needs one answer:

I am working with Hammer on a new map for GE:S since my old map was wiped out by a virus. One thing that has irked me to no end when working with cylindrical primitives is that you can not really, in Hammer anyways, "fit" a texture across cylinder faces so that it fits perfectly once. It can be done, as I figured out using Pythagorean Theorem (Hurrrrr!) to calculate and add the hypotenuses of the sides together, but the whole process is incredibly laborious and a hindrance to time efficiency when I want to commit to a map as a whole.

So I took the sum of all the sides and added them together. In a 25 sided cylinder with almost perfect square dimensions (I dragged the box out to 1024x1024, but Hammer decided it would be better at 1022x1020, I suppose to adjust for the extra face and to keep all vertices on grid points) the sum of all the sides ended up being
about 3110.38. I omitted some decimal positions since the texture scale box only goes to hundredths anyways, and the texture scale for a 512x512 texture to fit perfectly across that on the x-axis was 6.07. This is obviously a lot of work, though, since it requires you to drag out with the selection tool a box at both terminating ends of the hyptoenuses (usually with other geometry present, though that can be turned off with visgroups) and figure out the calculations by the dimensions of the box.

I realize for a perfectly square, even-sided cylinder or any other non-square object, Hammer tries its damnedest to make the objects symmetrical. The average length of the sides on my cylinder is 124.4152. There was one nondiagonal surface at the "bottom" (x/y) of the cylinder that measured 124 units. When cut in half, though, the cylinder mirrors across the x axis perfectly.

I know there will be exceptions when creating cylinders with strange, non-square outer dimensions, so if my idea were to work, it would be limited barring someone knowing (ahem) exactly how Hammer draws and interpolates the vertices of the cylinder.

This is where my idea comes in. I might even figure this out - and I will post the resolution if I do. I want to write a small, command-line based program that will take the inputs of the dimensions of the cylinder to determine the total perimeter of the faces, AND the dimensions of the texture, to determine the scale of the texture so that it may correctly wrap perfectly around the cylinder. The way that I did it worked perfectly, with a 512x512 texture being scaled to 6.07 to fit around 3110.38 units. I am not sure how to do this, so does anyone have any suggestions?

I also hate Maya/3D Studio Max so I refuse to have to open that up to wrap a texture around a cylinder to get its scale.

MasterSlowPoke
Oct 9, 2005

Our courage will pull us through
Do you want it to work with Hammer or is it just a calculator you will use in conjunction with Hammer? Like, will it process your .map (or whatever they use) and automatically fix cylinders?

GoodbyeKitty
Jun 25, 2004

"I know I'm going away for a while. How long? Who knows.
I know it won't be no fucking 30 years, though."
As of now I am not really experienced enough to write a whole application that would output anything other than the required information. Summarily I would like to know what motions Hammer goes through in the construction of primitives that have an arbitrary number of sides. For all I know it may have been done, but I have seen nothing on the web for it yet (and I'm grinding my teeth, hoping someone will point out that I am in fact an ignorant boob and the formula is at such and such URL. Or maybe I'll get a Rick Roll).

MasterSlowPoke
Oct 9, 2005

Our courage will pull us through
You're going to need to explain what you want to do a little more, preferably with pictures? Let me see if I have it: on the cylinder you need to set a texture scale so the whole cylinder is covered by a single iteration of the given texture. Is the polygon making up the core of the cylinder regular (all sides have the same length)?

edit: just basic playing with the numbers, but a circle inscribed in a 1020x1020 box has a circumference of 3204 which is pretty close to the perimeter of your 25-gon. maybe you can just use that number and tweak the texture scale down until it looks ok?

MasterSlowPoke fucked around with this message at 01:09 on Feb 19, 2009

heeen
May 14, 2005

CAT NEVER STOPS
Does Hammer support patches, like Gtkradiant?

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!
No, it does support displacement meshes though, which have similar capabilities, which are better for terrain and worse for curved architecture.

You're going to run into the issue of the scale varying on the faces because Hammer's default texturing works by projecting textures axially-aligned on the axis most perpendicular to the face. That means angled surfaces are stretched out more by default.

Best thing to do would be to make it export a .map and import that. Source's .map format stores texture projection axes per face (so it can keep textures in position even if you rotate a brush) so it's not that hard to do.

OneEightHundred fucked around with this message at 19:17 on Feb 19, 2009

GoodbyeKitty
Jun 25, 2004

"I know I'm going away for a while. How long? Who knows.
I know it won't be no fucking 30 years, though."

MasterSlowPoke posted:

You're going to need to explain what you want to do a little more, preferably with pictures? Let me see if I have it: on the cylinder you need to set a texture scale so the whole cylinder is covered by a single iteration of the given texture. Is the polygon making up the core of the cylinder regular (all sides have the same length)?

edit: just basic playing with the numbers, but a circle inscribed in a 1020x1020 box has a circumference of 3204 which is pretty close to the perimeter of your 25-gon. maybe you can just use that number and tweak the texture scale down until it looks ok?

Okay, so basically when I calculate the length of the individual faces on the cylinder, the average is 124.4152, most of them are within the hundredths of a unit of 124 units. A formula to calculate perimeter is dubious at best, because of the usage of decimal places. What I want to figure out, basically if it is possible, is how to determine the perimeter with precision. Hammer obviously uses an algorithm of some sort to try and make the faces with a consistent average length when the object has more or less square dimensions. A person could indeed try to use a shortcut calculation (perhaps like circumference, since the cylinder is close in shape to a circle) to gauge the estimated length and then try to tweak the scale backwards from that, but it is way too much work to be worth it. It is a pain because I will have to apply that scale, and then alt+right click the adjacent textures until I have gone around the cylinder completely, and since it will continue to keep aligning the texture to the edge of the face, it can make it easy to get confused about where it was supposed to end because it will continue to infinitely align the texture. When I use a precise measurement, this does not happen because Hammer is satisfied that the texture has wrapped around the cylinder perfectly.

It's just the time-efficiency approach I am looking to integrate. Another approach I have contemplated is making smaller cylinders, where the texture is perfectly wrapped, and then scaling them up to the desired size with scaling texture lock on. In my theory, I can create any object of any size by just simply having this on and the texture scale is intact, and usually if I am working with non vis-blocking surfaces (displacements, func_detail/func_brushes, anything that doesn't chop) it is safe, but Hammer likes to dick around with vertex placement when using more unconventional scaling numbers like for example %35 or 66% or 27% and that can cause vertices to be off the grid, which can be disastrous for architecture that does block VIS, and while easily fixed, it would mean after realigning the points to the grid I would have to go back through and use the before-mentioned process again to determine the appropriate texture scale.

I apologize if this post is more incoherent, I haven't been awake very long.

lilbean
Oct 2, 2003

I have two quick XNA question. I'm tempted to play with the system but I can't find the answers to this. Can you push title updates our on the community games on the 360? And can a game make arbitrary connections to web services and what not, or is the network only accessible through the presence API and what have you?

vanjalolz
Oct 31, 2006

Ha Ha Ha HaHa Ha
I've also got an XNA question (which has probably been answered a hundred times): What game library should I use to make a 3D third person RPG style game?
Is XNA good enough to do the whole thing with out someone else's game engine? I've made games before and I've done a unit on 3D, but other than that I know nothing about 3D games.

MasterSlowPoke
Oct 9, 2005

Our courage will pull us through
You'd probably do better asking that question on the XNA's official forums. They'd be more familiar with all the various middlewares people make.

Seat Safety Switch
May 27, 2008

MY RELIGION IS THE SMALL BLOCK V8 AND COMMANDMENTS ONE THROUGH TEN ARE NEVER LIFT.

Pillbug

vanjalolz posted:

What game library should I use to make a 3D third person RPG style game?
Is XNA good enough to do the whole thing with out someone else's game engine? I've made games before and I've done a unit on 3D, but other than that I know nothing about 3D games.
You should be fine to make a simple third person camera using XNA. I don't know if any specific middleware exists, but XNA exposes (most of) the D3D functionality.

You can probably find some example code for the specific implementation details of a third-person camera. I believe the 3D XNA tutorial has some. Other details (such as user interface) can probably be worked out the D3D way and platform specific bits like data files can probably be figured out with a quick trip to the XNA documentation.

captain_g
Aug 24, 2007

vanjalolz posted:

I've also got an XNA question (which has probably been answered a hundred times): What game library should I use to make a 3D third person RPG style game?
Is XNA good enough to do the whole thing with out someone else's game engine? I've made games before and I've done a unit on 3D, but other than that I know nothing about 3D games.

You should definitely use an engine to start this project. Otherwise you'll get frustrated fast, since you have to write something that resembles an engine/framework, from ground to up and this is not a trivial task for an experienced developer.

Ogre seems to be the most complete of these engines that are available currently. It has plenty of examples around and it is very beginner friendly. C# is also supported and you might want to check out MOgre.

I haven't found any mature free engines for XNA, yet and I would definitely not pay any money for commercial indie engine like reactor, unity or torque.

captain_g fucked around with this message at 11:26 on Mar 3, 2009

Morpheus
Apr 18, 2008

My favourite little monsters
So while I was out yesterday I was talking to a friend who proposed the idea of procedural 2d dungeon generation based on a non-directed graph. Each node would be a room, and each path would be a door to another room. This way you could plan a dungeon better than just using the generation algorithms that are just carving out rooms randomly based on simple seeds. What do you guys think? I've been trying to think of how to translate from a graph to a dungeon, without just tunnels everywhere connecting the rooms, which never made sense to me.

POKEMAN SAM
Jul 8, 2004

Morpheus posted:

So while I was out yesterday I was talking to a friend who proposed the idea of procedural 2d dungeon generation based on a non-directed graph. Each node would be a room, and each path would be a door to another room. This way you could plan a dungeon better than just using the generation algorithms that are just carving out rooms randomly based on simple seeds. What do you guys think? I've been trying to think of how to translate from a graph to a dungeon, without just tunnels everywhere connecting the rooms, which never made sense to me.

I thought this is how it's done traditionally? This is the only way I've seen it done.

Edit: Also spring models to get everything together.

Morpheus
Apr 18, 2008

My favourite little monsters

Ugg boots posted:

I thought this is how it's done traditionally? This is the only way I've seen it done.

Edit: Also spring models to get everything together.

Pretty much any algorithm I find is completely random. Either there's a 'walker' than randomly walks all over the place and creates a room now and then, or just a whole lot of rooms are randomly created, and then the algorithm attempts to join them by tunnels. As far as I know, there's no order to them, but I could be wrong.

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!
A good dungeon builder is one of those things that's been done little enough that the best solution is probably one you can innovate yourself. In particular, try tailoring an algorithm to the kind of dungeons you expect to get out of it. i.e. do they need to fit a certain geometric theme, do large sections of it need to have a particular set of characteristics, etc.?

newsomnuke
Feb 25, 2007

Have you seen DungeonMaker? It's by far the best generator I've come across.

Scaevolus
Apr 16, 2007

ultra-inquisitor posted:

Have you seen DungeonMaker? It's by far the best generator I've come across.
This is really more of a maze generator than something that generates rooms joined by passages. You need to specify a lot of it yourself if you don't want a ton of dead ends.

terminatusx
Jan 27, 2009

:megaman:Indie Game Dev and Bringer of the Apocalypse

OneEightHundred posted:

A good dungeon builder is one of those things that's been done little enough that the best solution is probably one you can innovate yourself. In particular, try tailoring an algorithm to the kind of dungeons you expect to get out of it. i.e. do they need to fit a certain geometric theme, do large sections of it need to have a particular set of characteristics, etc.?

Had to chime in here cuz there's nothing cooler to me than procedurally-generated dungeons.. I'm gonna have to "innovate" a "good dungeon builder" myself for a current project fairly soon. thankfully most of the dungeons will be tiny in size, like 2x2, 4x4, 8x8. :v:

Has anyone here actually made a "dungeon builder" or some form of procedurally generated levels?

Seat Safety Switch
May 27, 2008

MY RELIGION IS THE SMALL BLOCK V8 AND COMMANDMENTS ONE THROUGH TEN ARE NEVER LIFT.

Pillbug

terminatusx posted:

Has anyone here actually made a "dungeon builder" or some form of procedurally generated levels?
Sure, but mine was the "drunk walk" style. I briefly considered doing it a proper way but time was fairly short.

I pretty much drunk-walked through the map until I hit my given "mileage" and then slapped down a handful of prefab rooms intersecting the paths.

The real problem with generating levels procedurally is trying to keep the gameplay challenging in them; I thought the hard part would be the geometry, but boy was I wrong. The stuff you see in Nethack and the like is massively ugly code that's just built entirely from iteration.

I'd love to see someone use genetic programming to try and build levels which conform to a player's playing style.

Morpheus
Apr 18, 2008

My favourite little monsters

Seat Safety Switch posted:

Sure, but mine was the "drunk walk" style. I briefly considered doing it a proper way but time was fairly short.

I pretty much drunk-walked through the map until I hit my given "mileage" and then slapped down a handful of prefab rooms intersecting the paths.

The real problem with generating levels procedurally is trying to keep the gameplay challenging in them; I thought the hard part would be the geometry, but boy was I wrong. The stuff you see in Nethack and the like is massively ugly code that's just built entirely from iteration.

I'd love to see someone use genetic programming to try and build levels which conform to a player's playing style.

That would be impressive to see. If you notice the player is exploring a lot, branch out the level and fill branches with treasure. If the player makes beelines for the exit, make the maps more straightforward or open, and instead use enemies more often...would be cool.

Me, I'm doing a more open roguelike, and I've got to figure out random city generation algorithms on the small scale. Being able to, say, make a suburban area where suburbia has an x to y amount of houses, z% chance of a police department, and stuff like that while still making the place look 'normal' (houses in front of streets that go somewhere), that's something I'm working towards.

Scaevolus
Apr 16, 2007

Morpheus posted:

Me, I'm doing a more open roguelike, and I've got to figure out random city generation algorithms on the small scale. Being able to, say, make a suburban area where suburbia has an x to y amount of houses, z% chance of a police department, and stuff like that while still making the place look 'normal' (houses in front of streets that go somewhere), that's something I'm working towards.

Have you seen Subversion's city generation process?

Avenging Dentist
Oct 1, 2005

oh my god is that a circular saw that does not go in my mouth aaaaagh

Scaevolus posted:

Have you seen Subversion's city generation process?

All that and it manages versioning my source code!

newsomnuke
Feb 25, 2007

Scaevolus posted:

This is really more of a maze generator than something that generates rooms joined by passages. You need to specify a lot of it yourself if you don't want a ton of dead ends.
I got the impression that Morpheus was after something that allowed more user 'shaping' and wasn't completely 'random' which is why I mentioned it. Plus it does a lot more than simple mazes:

Morpheus
Apr 18, 2008

My favourite little monsters

ultra-inquisitor posted:

I got the impression that Morpheus was after something that allowed more user 'shaping' and wasn't completely 'random' which is why I mentioned it. Plus it does a lot more than simple mazes:

You're right, but what I think would be better would be for the user to 'shape' the map according to functionality...so to speak. Not just changing some numbers around.

For example, let's say I want to generate a guard house. This means one medium-sized room (where the guards do paperwork or whatever), two to five small rooms (jail cells), and another smallish room (armory). The jails should connect to the big room, the armory should also connect to the big room, and the armory should be locked. In terms of item generation, well, there should be some minor items in the big room, and a larger amount in the armory, and none in the jails. Maybe some humanoid monsters or something could be in the cells.

All this can technically be done with a single graph and customizable nodes. And I should be able to say "Generate Guardhouse" that makes a random, functional guardhouse based on the design, not some random seeds.

But this sounds pretty pipe-dream-ish.

terminatusx
Jan 27, 2009

:megaman:Indie Game Dev and Bringer of the Apocalypse

Morpheus posted:

All this can technically be done with a single graph and customizable nodes. And I should be able to say "Generate Guardhouse" that makes a random, functional guardhouse based on the design, not some random seeds.

But this sounds pretty pipe-dream-ish.

THAT MEANS IT WILL BE AWESOME!!! :science:

Adbot
ADBOT LOVES YOU

ndb
Aug 25, 2005

I have a possibly stupid question.

I'm using pygame to make a very small game, and I don't understand how to figure out in the event loop what button is being pressed.

I don't understand how to find out what button is being pressed. This is some code that I found:

code:
for index in range(0, joy.get_numbuttons())
     if(joy.get_button(index)):
        foo.t()
     else:
        foo.f()
However, wouldn't that just call foo.t or foo.f if any button is found to be pressed? How do you differentiate between buttons?

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