Modern RL Idea

Page 2 - Seeking answers? Join the Tom's Hardware community: where nearly two million members share solutions and discuss the latest tech.
G

Guest

Guest
Archived from groups: rec.games.roguelike.development (More info?)

The Sheep <sheep@atos.wmid.amu.edu.pl> wrote:
> Jim Strathmeyer napisal(a):
>> [blabering about in game profiling]
> You think you could write one? Please?

There should be one in one of the Game Programming Gems books. I'll take
a look when I get home and have the time. (Could be awhile...)

Anything I write would also be very implementation specific. Like, it
would be Linux/Cygwin C++ and using my Singleton class...

--
Jim Strathmeyer
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.development (More info?)

David Damerell wrote::

> Quoting Timothy Pruett <drakalor.tourist@gmail.com>:
>
>>David Damerell wrote:
>>
>>>Quoting Timothy Pruett <drakalor.tourist@gmail.com>:
>>>
>>>>One weapon you can use would be particularly fun, mainly because no RL
>>>>has ever featured the equivalent, to my knowledge. Grenades.
>>>
>>>SLASH'EM, for one.
>>
>>Really? Never played SLASH'EM, so I wouldn't really know. I'm a bit
>>more intrigued to try it now though. Are they actual time-delayed
>>grenades, or ones that just blow up right away?
>
> Time-delayed, except when fired from a grenade launcher. The delay varies
> a lot with cursed grenades, somewhat with uncursed, and not at all with
> blessed.

And monster can pick them up an throw them back at you :)

--
c.u. Hajo
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.development (More info?)

Jim Strathmeyer wrote:
> Krice <paulkp@mbnet.fi> wrote:
>
>>Btw the event system is a bit too much for my programming skills.
>>For example I found out that if I set a fuse of dynamites and throw
>>one away it doesn't explode because it has different id. The event
>>stores the item's id, but I'm now aware that the id can change.
>>Also the item can be destroyed and the event code doesn't know it.
>
> Then ask for help! That's what we're here for!
>
> Why does the ID change? When you change it, why cna't you also change it
> in the event-system? When the item is destroyed, why can't you inform
> the event-system? Feel free to post code.

This is the sort of place where pointers or transparent, assignable
references (such as Java and Smalltalk variables, aside from Java
primitive types like int) would be useful. The trick is double
indirection: various places refer to a handle object, which in turn
refers to the actual object data structure. The reference to the data
structure is localized to just one site, so you can hot-swap objects
easily. This sort of thing is in all high level OO languages for a very
good reason, besides general usefulness: these systems need to
physically move objects to consolidate free space after each GC sweep.

--
http://www.gnu.org/philosophy/right-to-read.html
Palladium? Trusted Computing? DRM? Microsoft? Sauron.
"One ring to rule them all, one ring to find them
One ring to bring them all, and in the darkness bind them."
 

Antoine

Distinguished
Oct 5, 2003
241
0
18,680
Archived from groups: rec.games.roguelike.development (More info?)

Jim Strathmeyer wrote:
> Krice <paulkp@mbnet.fi> wrote:
> > What is a consistant timing?
>
> I just meant to express that time also passes on the maps/levels that
> you aren't on. The maps are actually on a priority queue, the same
way
> that creatures on a map are in a priority queue. So when a player
goes
> to another level, time still passes on the previous level, and
monsters
> can even go up and down stairs to go after or escape from the player.
It
> works well for me right now because my game is small, and will
probably
> stay small. As the game gets bigger than a simple dungeon, I will
have
> to find some way to deal with the computational complexity involved.
> (Threading, or just faking things away from the player, ie what's the
> result when the group of 20 orcs ambushes 30 travelers, but then 4
royal
> knights happen to pass by, instead of doing it turn for turn.)
>
> Also, some people mentioned using old machines to test the efficiency
of
> their games. Doesn't anybody use profiling? I implemented profiling
when
> I took a Computer Gaming class and don't remember it being very hard,
> and also remember it being very helpful/cool. Profiling is definitely
> done in all modern games, and seems like a much better alternative to
> just trying your game on an old CPU, though I've never seen an
roguelike
> 'article' about it anywhere.

I did quite a bit of profiling for Guild (using the inbuilt tool in
Visual Studio), it beats the hell out of just guessing which part of
your program is slow. There is a bit of an initial learning curve which
can be offputting, but it's worth it (if your game runs slowly).

For me the big time costs were AI (especially some parts of the AI: for
example the code for scared monsters running away turned out to be much
more time-consuming than that for aggressive monsters attacking),
pathfinding, LOS (although this got better when I stopped recalculating
the LOS of every group of monsters in every turn), and certain lookups
that I did very frequently. This was very helpful in directing my
optimising efforts (otherwise I might have wasted time rewriting code
which looked inefficient but didn't actually waste much run time).

It also led me to simplifying some parts of the functionality - for
instance, measuring the loudness of a sound in terms of the crow-flies
distance from noise to hearer, rather than the shortest clear path
through the corridors.

I never figured out, though, how to subtract the time spent waiting for
keyboard input from the profile. There must be some way of doing it.

A.
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.development (More info?)

Jim Strathmeyer wrote:
> Why does the ID change?

Dynamites can be stacked. If one dynamite is thrown away the engine
creates a duplicate of it with different ID of course.

> When you change it, why cna't you also change it in the event-system?

Maybe in the duplicate code check if the ID has some event going on
and create another event of the same kind.

> When the item is destroyed, why can't you inform
> the event-system?

Of course I can:)
The problem is that I have a vague idea of what to do, but it's
probably not the best way to do it and that leads to a lot of
re-programming work.. Sometimes I envy the people who are much
better programmers and who know exactly how to get things work
properly in the first place.
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.development (More info?)

Sherm Pendley wrote:
> Otherwise, you use a profiler to find out *why* it's not running so
> well.

Some time ago I tried to find a free profiler for DevC++.. It seems
that there aren't many of them around..
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.development (More info?)

Krice wrote:
> Sometimes I envy the people who are much
> better programmers and who know exactly how to get things work
> properly in the first place.

That comes with experience.

--
http://www.gnu.org/philosophy/right-to-read.html
Palladium? Trusted Computing? DRM? Microsoft? Sauron.
"One ring to rule them all, one ring to find them
One ring to bring them all, and in the darkness bind them."
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.development (More info?)

On Thu, 21 Apr 2005 17:55:39 -0400, Timothy Pruett
<drakalor.tourist@gmail.com> wrote:

>One weapon you can use would be particularly fun, mainly because no RL
>has ever featured the equivalent, to my knowledge. Grenades. Throw
>it where you want it, and three to five turns later, BOOM! Toss in
>other fun explosives, like proximity mines, remote mines, etc, and
>there should be no lacking in general carnage.

So, a turn in the game would be one second? That's slicing things
pretty fine. I don't think I'd bother with the delay on grenades.
Ideally, you time them so they explode about the time they land, so
the enemy doesn't get a chance to throw them back or have a heroic
squad member fall on it, leaving the rest all hot to avenge their
martyred buddy. I'm not saying there isn't a place for timed
explosives, but I'd abstract grenade to a one turn throw-and-blow
weapon not much different than a fireball. (Except that you'd take
into account throwing accuracy/range and it sure wouldn't be an
Angband fireball that doesn't hurt the caster.)

R. Dan Henry
danhenry@inreach.com
Idiot boy, when are you going to post something useful?
Or better yet, get a job and stop being a welfare bum?
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.development (More info?)

On 2005-04-26, Krice <paulkp@mbnet.fi> wrote:
> Some time ago I tried to find a free profiler for DevC++.. It seems
> that there aren't many of them around..

Since Dev-C++ uses MinGW gcc as its compiler, you should be able to use
GNU's gprof as a profiler. It might even be included in the Dev-C++
distribution, or then you'll need to look for the MinGW or Cygwin port
of gprof.

--
Risto Saarelma
 
G

Guest

Guest
Archived from groups: rec.games.roguelike.development (More info?)

R. Dan Henry wrote:
> On Thu, 21 Apr 2005 17:55:39 -0400, Timothy Pruett
> <drakalor.tourist@gmail.com> wrote:
>
>>One weapon you can use would be particularly fun, mainly because no RL
>>has ever featured the equivalent, to my knowledge. Grenades. Throw
>>it where you want it, and three to five turns later, BOOM! Toss in
>>other fun explosives, like proximity mines, remote mines, etc, and
>>there should be no lacking in general carnage.
>
> So, a turn in the game would be one second? That's slicing things
> pretty fine. I don't think I'd bother with the delay on grenades.
> Ideally, you time them so they explode about the time they land, so
> the enemy doesn't get a chance to throw them back or have a heroic
> squad member fall on it, leaving the rest all hot to avenge their
> martyred buddy. I'm not saying there isn't a place for timed
> explosives, but I'd abstract grenade to a one turn throw-and-blow
> weapon not much different than a fireball. (Except that you'd take
> into account throwing accuracy/range and it sure wouldn't be an
> Angband fireball that doesn't hurt the caster.)

Lets not forget the critical failure too -
dropping the grenade at your feet ala
"Napola" the movie.

--
ABCGi ---- (abcgi@yahoo.com) ---- http://codemonkey.sunsite.dk
Fun RLs in rgrd that I have tested recently!
DoomRL - DwellerMobile - HWorld - AburaTan - DiabloBand
Heroic Adventure - Tower of Doom - Tendrils - TheTombs