stevenremot / roguel-ike

Coffee-break roguelike for Emacs
GNU General Public License v3.0
24 stars 4 forks source link

Libraryify? #1

Closed joelmccracken closed 10 years ago

joelmccracken commented 10 years ago

This is awesome!

I've been playing with some similar code, but never have published it. It seems like we wer thinking down similar routes, though, especially with the heavy use of EIEIO.

My goals were different, though: I wanted to hack on something that is more Dwarf Fortress inspired.

What are your thoughts? would this be a decent starting place for something like that?

stevenremot commented 10 years ago

Thank you for the compliment!

An Emacs Dwarf fortress would be really cool. I think you could benefit from parts of my code, like the data structure related to level and entities, the level rendering system, and the utilities like field of view, line of sight and shortest path calculation.

I just reached the point where all the core features in my code have been implemented, and I'm willing to work to extract anything that can be useful for anyone else and to put it in a separated library.

The potential issues could be that my code relies heavily on my level data structure, and that the field of view calculation is very slow. Thanks to EIEIO and generic methods the first issue shouldn't be difficult to overcome, and the second one is just a matter of optimization.

What do you think about this?

joelmccracken commented 10 years ago

Sounds cool!

On Wed, Feb 5, 2014 at 11:48 AM, Steven Rémot notifications@github.comwrote:

Thank you for the compliment!

An Emacs Dwarf fortress would be really cool. I think you could benefit from parts of my code, like the data structure related to level and entities, the level rendering system, and the utilities like field of view, line of sight and shortest path calculation.

I just reached the point where all the core features in my code have been implemented, and I'm willing to work to extract anything that can be useful for anyone else and to put it in a separated library.

The potential issues could be that my code relies heavily on my level data structure, and that the field of view calculation is very slow. Thanks to EIEIO and generic methods the first issue shouldn't be difficult to overcome, and the second one is just a matter of optimization.

What do you think about this?

Reply to this email directly or view it on GitHubhttps://github.com/stevenremot/roguel-ike/issues/1#issuecomment-34206963 .

stevenremot commented 10 years ago

Nice!

I will work on this separation tomorrow. I will try to define generic data structures and operations that could be used in other games, and put it in a separated directory.

By the way, do you think my motion system could be useful in your game? It allows to apply forces to game entities to allow projectiles, or even projection after strikes. You can try it in the game by using the skill "Punch" with an orc or a human having at least 10 strength.

stevenremot commented 10 years ago

I got a first version of the library specification. It exports field of view, line of sight, and path finding algorithms. You can see it at https://github.com/stevenremot/roguel-ike/blob/master/documents/abstract-lib.org

It is based on EIEIO generics to allow users to define the bare minimum regarding which features they want to use. It is flexible enough to not impose a data structure to the user.

For now algorithms are provided in the form of functions, I judged it was not really useful to create whole classes for it.

I will now start to apply my spec. I will incrementally add other features, like the event dispatcher and the time management system.

If you think something could be done in a better way than the one I chose, don't hesitate to tell me!

joelmccracken commented 10 years ago

Cool! You have been super responsive, which is awesome. Thanks.

I'm not sure when I will really have time to hack on this. I am slowly getting more time for open source though.

Sent from my iPhone

On Feb 6, 2014, at 7:23 AM, Steven Rémot notifications@github.com wrote:

I got a first version of the library specification. It exports field of view, line of sight, and path finding algorithms. You can see it at https://github.com/stevenremot/roguel-ike/blob/master/documents/abstract-lib.org

It is based on EIEIO generics to allow users to define the bare minimum regarding which features they want to use. It is flexible enough to not impose a data structure to the user.

For now algorithms are provided in the form of functions, I judged it was not really useful to create whole classes for it.

I will now start to apply my spec. I will incrementally add other features, like the event dispatcher and the time management system.

If you think something could be done in a better way than the one I chose, don't hesitate to tell me!

— Reply to this email directly or view it on GitHub.

stevenremot commented 10 years ago

You're welcome, I'm on holidays until the end of this month so I have plenty of time to hack on this! The next months I may be much less available, with school projects which should take the major part of my time so I want to reach an acceptable point of the development before.

Don't worry if you don't have time to work on it right now, abstracting the core part of my game will benefit to me too.

stevenremot commented 10 years ago

Hey,

I think I finished libraryifying the most useful and generic features, I put them in the folder roguel-ike-lib for now. I finally extracted :

I didn't put my time management system, because I'm not sure I coded it in a generic way.

I close this issue as this is the most I can do for now, but I will think from time to time about what could be abstracted and put in the library.

joelmccracken commented 10 years ago

Cool. That makes sense. Thanks :)

Sent from my iPhone

On Feb 9, 2014, at 10:23 AM, Steven Rémot notifications@github.com wrote:

Hey,

I think I finished libraryifying the most useful and generic features, I put them in the folder roguel-ike-lib for now. I finally extracted :

The level rendering system The line of sight algorithm The field of view algorithm The path finding algorithm The math utilities The event dispatch system I didn't put my time management system, because I'm not sure I coded it in a generic way.

I close this issue as this is the most I can do for now, but I will think from time to time about what could be abstracted and put in the library.

— Reply to this email directly or view it on GitHub.