Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - george

Pages: 1 2 [3] 4 5 ... 14
Programming / Re: Graph Grammar and Voronoi based Dungeon Generation
« on: April 04, 2013, 01:08:44 AM »
I'm curious about the hexes too.

That's an amazing generator and visualizer, were you inspired by any particular graph design tool or did you just make what you felt you needed?

Programming / Re: pedantic object oriented question
« on: March 30, 2013, 03:29:54 PM »
I guess I would just ask you this: do you know that iterating over a 1000 objects vs. 2 is a real efficiency gain?

Why not mock up a list of 1000 objects and a list of two and then time the iteration?

That said, I don't think many games would iterate over every map cell to deal with a thing. On the other hand, most games would not subdivide their things into many data structures either.

Programming / Re: pedantic object oriented question
« on: March 30, 2013, 04:14:59 AM »
No, I think the question is a good one. Here's my take on it.

It's best to minimize how spread out your data is across your code, and keep things general. So for example, I would not have references pointing backward (a Critter knowing which map it's in), only forward. A map has a list of levels, a level has a list of things, each thing has a list of their things, etcetera. You can see that this is very general -- everything is a thing, and they can contain other things.

Then for the cases where you want to look at the map and see what's where, or look at a thing and see where it is, I would write the appropriate methods/functions.

It's true that if you want to ask a thing where it is, you need to do a lookup in a more roundabout way than simply querying a property on the thing (though the complexity is well hidden by the method/function anyway). But I would argue that most of the time this will not be a performance critical part of your code. If it is, you can always optimize. Ultimately I think this approach has benefits for OO concepts like reusability, encapsulation and minimizing inter-dependencies.

Programming / Re: "Event driven" roguelike architecture question
« on: March 29, 2013, 03:38:22 PM »
Hmm. However, what about the case where the monster's, or player's, speed changes? Like the player gets stat boosts, increasing his speed. Or the monster is hit with a "slow monster" spell or something like that (it exists in several games).

Also, am I right in guessing that the "entities" should be of a type "Actor" or something similar that is also the type for "event" objects (this is how it is in JADE, according to the "JavaDoc")?

How you design your types is completely up to you, and there are many ways of doing it. If you don't have strong ideas about it then I'd advise keeping it simple no matter what example you follow.

If a thing's speed changes it doesn't make much difference to the queue of things. You just see it in the next iteration. For example,

[Player->500, ThingA->600, ThingB->700]

Player picks up boots of speed +100. ThingA steps in slimy ooze (speed -100), ThingB gets feet stuck in trap (speed -500).

(note that speeds are how long until you can do something, so bonuses subtract and penalties add -- you can do it the other way too of course, depends on the system)

[Player->400, ThingA->700, ThingB->1200]

Programming / Re: Noob Timing - George read this! :-)
« on: March 29, 2013, 03:27:40 PM »
I feel obligated to reply, but since I'm no expert at roguelike timing (I can just read lots of rgrd archives ;) ), luckily I don't feel like I have to make insightful observations.

Though I would like to hear more about that powers-of, I don't quite follow how that works.

Programming / Re: "Event driven" roguelike architecture question
« on: March 29, 2013, 02:13:02 AM »
Game world events are sort of independent of the time system. For example, take a typical over-engineered ( ;) ) speed-based time system. All things are in a queue and they each have a 'timer' on them that represents when they go next.

[ThingA->200, ThingB->350, ThingC->700]

If it is turn-based these timers are in 'speed units'. Each turn you can do some operation that decrements the speed units. A typical one is to subtract the amount of time the player action took then have all the things with a zeroed timer act. There are lots of variations. I even summarized a bunch once, .

If it's realtime the timers can be in milliseconds and you just go about your business.

Now it should be clear that an 'event' is nothing more than a 'thing' (perhaps with no physical presence). So you just take it from there.

7DRLs / Re: A ton of quick 7DRL looks
« on: March 22, 2013, 01:29:15 AM »
Thanks Jo!

Haha, this is ridiculous!

Traditional Roguelikes (Turn Based) / Re: Warp Core Breach (7DRL 2013)
« on: March 16, 2013, 11:31:13 PM »
Congratulations on finishing, sounds interesting. I think my version of pyglet is rather old so I'll wait to see if you get an exe up.

Traditional Roguelikes (Turn Based) / Re: The Conception (7DRL 2013)
« on: March 16, 2013, 11:29:26 PM »
You have great style ondras!

Programming / Re: game loops and information screens
« on: February 28, 2013, 12:01:53 AM »
Indeed, with Python you definitely don't need to use classes or anything like that, and it might even be easier at first if you ignore them.

When you're starting out feel free to just define global variables (datastructures like dictionaries, lists, strings, what have you) and use those freely in functions throughout your program.

You'll see people rail against this but it probably won't matter for the size of programs you're writing at this stage, and it'll definitely be easier to focus on the basics -- data, and functions. Might even be beneficial later on too. I think a lot of people go overboard on OO.

Programming / Re: some getting-started python questions
« on: February 24, 2013, 07:09:47 PM »
Not off the top of my head. If I were you I'd search at github, Pyweek, and Ludum Dare.

Programming / Re: some getting-started python questions
« on: February 23, 2013, 09:59:37 PM »
I can appreciate choosing a minimal library. Fwiw, I always liked the API of Pyglet over Pygame.

Programming / Re: some getting-started python questions
« on: February 23, 2013, 09:28:06 PM »
Libtcod is the go-to RL library for a lot of people using Python.

Challenges / Re: Early 7DRL Declaration
« on: February 11, 2013, 06:16:30 AM »
You know, it would be pretty hilarious if someone made a mouse or touch gesture RL, but with like 72 gestures you had to learn.

Pages: 1 2 [3] 4 5 ... 14