1. Real-Time Battle System

I was wondering how you would program a real-time battle system for a rpg
(role playing game). It is where the character and the enemy do not take turns
battling each other.

new topic     » topic index » view message » categorize

2. Re: Real-Time Battle System

DOS or Windows?

Regardless, you can't use a simple procedural design... Event-based is
the way to go.

On Mon, 21 Feb 2005 13:46:56 -0800, Andy <guest at rapideuphoria.com> wrote:
> 
> posted by: Andy <videogamefreak101 at hotmail.com>
> 
> I was wondering how you would program a real-time battle system for a rpg
> (role playing game). It is where the character and the enemy do not take turns
> battling each other.
> 
> 
> 
> 


-- 
MrTrick

new topic     » goto parent     » topic index » view message » categorize

3. Re: Real-Time Battle System

So I would have to program an event system and then include in the main
file?

new topic     » goto parent     » topic index » view message » categorize

4. Re: Real-Time Battle System

Well, the thing about a real-time RTS is that everything happens
concurrently. This is difficult of course, because classic programming
just does one thing at a time.

So you'd need an eventloop to be constantly running, querying each
component in the game to see if stuff is happening, and occasionally
updating the screen state and getting user input.

As a test, I suggest you create a screen of say 15 circles. By
clicking on a circle then clicking on another location, you can make
the circle 'move' to that location, not instantly, but slowly, over
several iterations. While that circle is still moving, you can do the
same with another, and another, and etc...
That should help wrap your head around what is required for real-time strategy.

Perhaps it would be beneficial in the game (not the above test though)
to have two programs - a graphics/interface program and a backend
program, and have the two communicate via IPC.


On Mon, 21 Feb 2005 17:58:09 -0800, Andy <guest at rapideuphoria.com> wrote:
> So I would have to program an event system and then include in the main
> file?

-- 
MrTrick

new topic     » goto parent     » topic index » view message » categorize

5. Re: Real-Time Battle System

Rob wrote a nice event timing system for his Langwar game (in
EUPHORIA\DEMO\LANGWAR folder). I used it to make a simple version of a
Matrix screen (search for Scrolling Demo). This timing system works
great on DOS and Linux and could probably be adapted for use in
Windows by using the Multimedia Timers (not Win32Lib's timers). Its
been a while since I've used it, but it may very well suit your
purposes.

~Greg


On Tue, 22 Feb 2005 13:05:39 +1100, Patrick Barnes <mrtrick at gmail.com> wrote:
> 
> Well, the thing about a real-time RTS is that everything happens
> concurrently. This is difficult of course, because classic programming
> just does one thing at a time.
> 
> So you'd need an eventloop to be constantly running, querying each
> component in the game to see if stuff is happening, and occasionally
> updating the screen state and getting user input.
> 
> As a test, I suggest you create a screen of say 15 circles. By
> clicking on a circle then clicking on another location, you can make
> the circle 'move' to that location, not instantly, but slowly, over
> several iterations. While that circle is still moving, you can do the
> same with another, and another, and etc...
> That should help wrap your head around what is required for real-time
> strategy.
> 
> Perhaps it would be beneficial in the game (not the above test though)
> to have two programs - a graphics/interface program and a backend
> program, and have the two communicate via IPC.
> 
> 
> On Mon, 21 Feb 2005 17:58:09 -0800, Andy <guest at rapideuphoria.com> wrote:
> > So I would have to program an event system and then include in the main
> > file?
> 
> --
> MrTrick
> 
>

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu