Modifying Wesnoth to give continuous play

Discuss the development of other free/open-source games, as well as other games in general.

Moderator: Forum Moderators

Post Reply
chombee
Posts: 5
Joined: May 27th, 2006, 5:36 pm

Modifying Wesnoth to give continuous play

Post by chombee »

Thinking of using Wesnoth for a project. I want to use the basic game engine (not the actual stategy game logic) and the artwork from Wesnoth. Specifically, I've noticed Wesnoth can do the following things that I want:

* Display a nicely looking virtual environment and items and characters on top of the environment.

* Smoothly move characters from A to B in the environment. When you move in Wesnoth, the character slides from A to B. I know there are no walking/running animations yet, but that's okay. There also appears to be some pathfinding, looks like there is some sort of weighted search there.

* Add and remove characters and items from the environment during play.

* Display pop-up textboxes for dialogue, menus and keyboard input from the player.

I would very much likely to seperate out these features of the Wesnoth engine and write my own code to control them. For example, I'd like to have a continuous (not turn-based) Wesnoth world, in which the player moves around by mouse-clicking exactly as in Wesnoth now, and AI characters slide around following planned paths from A to B as now, but the player and all the characters move at the same time, it's not turn-based. I don't mind if all the characters pause while any dialog or menu is activated.

Does anyone have any clues on how I could achieve this hack? Which parts of the code would be of interest? How much work it's likely to be?

Thanks
Dragon Master
Posts: 1012
Joined: February 11th, 2006, 1:04 am
Location: Somewhere

Post by Dragon Master »

No idea how to code that, but I will tell you if you accomplish this you would need to change unit movement distances to speed. example: Horseman will cover more hexes than a heavy infantry in the same amount of time. You would also have to tweak the AI because it would literally rape you if you played realtime. You will also have to jump the hurdle of how combat will work then. Also, how will gold and upkeep work?
I do however believe that making Wesnoth real-time would damage the gameplay because you lose some of the strategy without a turn-based approach.
Disto
Posts: 2039
Joined: November 1st, 2004, 7:40 pm
Location: Cambridge, UK

Re: Modifying Wesnoth to give continuous play

Post by Disto »

chombee wrote: * Smoothly move characters from A to B in the environment. When you move in Wesnoth, the character slides from A to B. I know there are no walking/running animations yet, but that's okay. There also appears to be some pathfinding, looks like there is some sort of weighted search there.


Actually there are, just not very good yet, purely because of art time and restrictions.
Creator of A Seed of Evil
Creator of the Marauders
Food or Wesnoth? I'll have Wesnoth
User avatar
Jetrel
Posts: 7242
Joined: February 23rd, 2004, 3:36 am
Location: Midwest US

Re: Modifying Wesnoth to give continuous play

Post by Jetrel »

Disto wrote:
chombee wrote: * Smoothly move characters from A to B in the environment. When you move in Wesnoth, the character slides from A to B. I know there are no walking/running animations yet, but that's okay. There also appears to be some pathfinding, looks like there is some sort of weighted search there.


Actually there are, just not very good yet, purely because of art time and restrictions.
There is some support in the code, but we basically have no animations yet; just some test crap.
chombee
Posts: 5
Joined: May 27th, 2006, 5:36 pm

Post by chombee »

No idea how to code that, but I will tell you if you accomplish this you would need to change unit movement distances to speed. example: Horseman will cover more hexes than a heavy infantry in the same amount of time. You would also have to tweak the AI because it would literally rape you if you played realtime. You will also have to jump the hurdle of how combat will work then. Also, how will gold and upkeep work?
I do however believe that making Wesnoth real-time would damage the gameplay because you lose some of the strategy without a turn-based approach.
What I'm interested in is creating is a very simple interactive storytelling game in which all you can do is walk around, talk to characters, pick up static objects and give them to characters, and also listen in on conversations between other characters, and not much else. The interesting part will be the character behaviour, story generation and dialogue system running in the background. Also, this game is meant as a research prototype, so doesn't need to be as consistent or complete as you would expect from an actual game.

So... it doesn't matter about movement speeds of different units. They can all just move at the same speed (it doesn't matter if this seems silly or unrealistic, and there will be no strategy to worry about, it's not a game that you can win or lose, you just play and experience a little story).

The AI will have to be completely replaced, as I want AI characters to wander around the environment and act out roles in this interactive story. I don't want them trying to fight the player! The combat elements of Wesnoth would be completely removed.

Gold and upkeep would be completely removed also.

I agree that making Wesnoth real-time would hurt the gameplay (I've really been enjoying playing it the last couple of days), but it seems I haven't been clear enough. I'm not interested in using or modifying Wesnoth as a game, I just want to re-use parts of the underlying graphics, animation and game engine.

Basically I'm working on this interactive storytelling engine with character AI and story control, and I want a Free Software game-like engine/interface I can hook it up to. I haven't found much, so at the moment I don't really know what I'm going to do.
Darth Fool
Retired Developer
Posts: 2633
Joined: March 22nd, 2004, 11:22 pm
Location: An Earl's Roadstead

Post by Darth Fool »

chombee wrote:
No idea how to code that, but I will tell you if you accomplish this you would need to change unit movement distances to speed. example: Horseman will cover more hexes than a heavy infantry in the same amount of time. You would also have to tweak the AI because it would literally rape you if you played realtime. You will also have to jump the hurdle of how combat will work then. Also, how will gold and upkeep work?
I do however believe that making Wesnoth real-time would damage the gameplay because you lose some of the strategy without a turn-based approach.
What I'm interested in is creating is a very simple interactive storytelling game in which all you can do is walk around, talk to characters, pick up static objects and give them to characters, and also listen in on conversations between other characters, and not much else. The interesting part will be the character behaviour, story generation and dialogue system running in the background. Also, this game is meant as a research prototype, so doesn't need to be as consistent or complete as you would expect from an actual game.

So... it doesn't matter about movement speeds of different units. They can all just move at the same speed (it doesn't matter if this seems silly or unrealistic, and there will be no strategy to worry about, it's not a game that you can win or lose, you just play and experience a little story).

The AI will have to be completely replaced, as I want AI characters to wander around the environment and act out roles in this interactive story. I don't want them trying to fight the player! The combat elements of Wesnoth would be completely removed.

Gold and upkeep would be completely removed also.

I agree that making Wesnoth real-time would hurt the gameplay (I've really been enjoying playing it the last couple of days), but it seems I haven't been clear enough. I'm not interested in using or modifying Wesnoth as a game, I just want to re-use parts of the underlying graphics, animation and game engine.

Basically I'm working on this interactive storytelling engine with character AI and story control, and I want a Free Software game-like engine/interface I can hook it up to. I haven't found much, so at the moment I don't really know what I'm going to do.
This certainly would be possible to do by ripping out the appropriate parts of the game engine. I would start by looking at the display.cpp and work your way down. You will need to do quite a bit of C++ coding, and you would probably want to steal the WML parsing code as well. It will take a bit of work, and you could probably get a working prototype faster just writing your own code from scratch (maybe using wesnoth as an example to learn from), but of course by incorporating the wesnoth bits in, you can benefit from all the graphical goodies being worked on. Good luck, and please do keep us informed about your progress, or if you have any specific questions about how the code works.
User avatar
irrevenant
Moderator Emeritus
Posts: 3692
Joined: August 15th, 2005, 7:57 am
Location: I'm all around you.

Post by irrevenant »

chombee wrote:What I'm interested in is creating is a very simple interactive storytelling game in which all you can do is walk around, talk to characters, pick up static objects and give them to characters, and also listen in on conversations between other characters, and not much else. The interesting part will be the character behaviour, story generation and dialogue system running in the background. Also, this game is meant as a research prototype, so doesn't need to be as consistent or complete as you would expect from an actual game.
Have a look at Adonthell. It should do everything you need.

You'd probably find it easier than making all the necessary changes to Wesnoth...

[EDIT] Oops! Apparently the screenshot page is broken and it doesn't have collecting objects yet, but it's still probably closer to what you're after.
chombee
Posts: 5
Joined: May 27th, 2006, 5:36 pm

Post by chombee »

Right, thanks irrevenant and Darth Fool.

I did look at Adonthell, but it has a segfault after the introductory story. So I didn't pursue it much further.

Now I have some idea of what kind of work it would take to hack Wesnoth and where to start, so thanks. I still don't know where I'm going to go with this project, or whether I'll use Wesnoth. Hopefully I should come to some conclusion soon.
Kess
Posts: 52
Joined: February 10th, 2006, 6:27 pm
Location: Some hemisphere

Post by Kess »

I'm not sure if it is the segfault you encountered, but as far as I know the devs have fixed at least one bugging segfault in Adonthell... I believe they released a new version some months(?) back, if not it should be in the repository.

By the way, your ideas sound interesting! Please report any success/failure of what you're doing. At least I would love to hear of any progress. ^__^
Post Reply