Language: 
To browser these website, it's necessary to store cookies on your computer.
The cookies contain no personal information, they are required for program control.
  the storage of cookies while browsing this website, on Login and Register.

Author Topic:  v0.10.7 development  (Read 22453 times)

0 Members and 0 Guests are viewing this topic.

Shroud

« Reply #30 on: 07, August 2014, 01:01:27 »
Just curious but what about traps? Would it be possible to have traps that only activate when a player walks on it but not when a mob walks on it. That's the only example I can come up with where it could be useful
Doesn't matter, you'd die anyway. ;D Shroud's a hacker. After many hours of deep thought I have came to that conclusion.

smacky

« Reply #31 on: 07, August 2014, 11:01:08 »
Teleporters (or rather everything else) can have a no teleport flag.

The thing about players only is it does exactly that -- spells, missiles, monsters, etc are all blocked. Which seems unjustifiably extreme for eg, a barrel.

Still, I've figured out a modified use. (Increasingly) monsters can apply objects, so an object can be player only meaning only players can apply it. So only player only floors actually block progress.
« Last Edit: 07, August 2014, 11:02:46 by smacky »

smacky

« Reply #32 on: 18, August 2014, 16:42:17 »
Just seen this post which snuck in unnoticed:

Just curious but what about traps? Would it be possible to have traps that only activate when a player walks on it but not when a mob walks on it. That's the only example I can come up with where it could be useful

Yes, that's easy to code. Vice versa is probably more useful generally. Ages ago I started a stream which was focused on traps, making them more gooder and allowing players to set them. The goal there was Spy Vs Spy antics in PVP (and by extension, mob-hunting). And then the (maybe fantasy) hope to turn it all round and have AI mob trap-setters.

I'm surprised if player/monster prejudiced traps aren't available already. There's probably some over-complex way to do it with pedestals.

smacky

« Reply #33 on: 25, August 2014, 15:47:42 »
I'm a bit restless so here's a teaser of sorts. This doc is unfinished but I think gives a fairly good overview (0.10.7 touches on a lot more areas than covered here but the focus is on maps and msps).

The doc is not a highly technical reference for everything the server can and cannot do nor a tutorial for new mappers. It is in between: aimed at intelligent and inquisitive mappers and players -- a good working knowledge of how maps work in earlier versions is helpful but don't let the status quo blinker you.

Code: [Select]
MAPS, MSPS, AND TILESETS

1 Introduction

A map is essentially a small section of the gameworld. Each map is a 24x24 grid
of squares (AKA spaces or, here, msps) and may have up to 8 neighbours (as may
each of those and so on without limit). Maps connected in this way are said to
be tiled, collectively known as a tileset. Each msp has on it one and only
one floor (see [3.2] below), and zero or more objects. When an object is an
exit of some sort this will relocate its user to a different msp on (usually) a
different map on (often) a different tileset.

Note that all maps must be exactly 24x24 msps whether or not they actually use
all this area as playable space. This is a balance of various technical issues
(primarily memory usage -- on average more msps means more map objects means
more memory) and tiling requirements (tiling only works if all the tiles are
the same size) that is a nice area to work with from a mapper's perspective
(fits nicely on most screens in the editor, large enough to portray a sensible
(chunk of) narrative, small enough to not overwhelm the author.


2 Maps And Tilesets Relative To One Another

Tiled maps are horizontally connected to one another; it is possible -- msps
with impassable floors or objects notwithstanding -- to walk from one to the
other.

Travel between tilesets is only possible via exits (scripts and some gmaster
commands allow this too); a tileset is not actually physically connected to
another although it is often convenient to think that they are.

2.1 The Physical Separation Of Tilesets

For example, a dungeon that is three layers deep (or a castle that is three
storeys high) is going to be spread over three tilesets. Each of these tilesets
may comprise multiple tiled maps. Somewhere on these maps is an exit (eg,
stairs down or up) to another layer (tileset). Conceptually these three
tilesets can be thought of as stacked one on top of the other. Physically they
are entirely separate.

2.1.1 Consequences And Considerations

This dichotomy has several important consequences:
  o as each tileset occupies its own physical space there is no issue with
    tilesets 'overlapping' -- two vast dungeons (different tilesets) can
    have exits only a few msps apart on the same map;
  o it follows that a tileset may be larger than its 'outside' would seem to
    allow --eg, a tardis;
  o there need be no structural issues with larger tilesets 'above' smaller
    ones or unbalanced stacks -- a tower may have lower storeys just one
    tiled map wide but upper storeys several tiled maps wide;
  o the floor of an 'above' tileset is not the ceiling of a 'below' tileset --
    if an item is dropped out of an 'upper' storey window of our tower, it will
    not fall down through 'lower' tilesets;
  o this further means that maps do not physically have a ceiling or height.


3 Meta-Information

As might be expected, there is a certain amount of meta-information pertaining
to maps. This information is primarily held in the header of each map, and
certain complimentary and supplementary information may be held in the floor
settings of any msp.

3.1 Map Header

Meta-Information in the map header affects every msp on the entire map. It does
not affect tiled maps but maps in the same tileset tend to have similar headers
for consistency.

3.1.1 Name

A player-visible string giving useful info about the map (see ^Naming^).

3.1.2 Background Music

The filename of the music file to be played (on a loop) to players on this map.

3.1.3 Message

Arbitrary text.

By convention the map editor, Gridarta, uses this field to note the map's
author and date of creation and last editor and date of modification.

3.1.4 Enter X/Y

The x/y coordinates of the default msp a new entrant to the map will be placed
on.

3.1.5 Swap Time

The number of seconds of inactivity until the map is swapped out.

Inactivity basically means there are no players on the map. Swapping out means
an exact copy (minus monsters and players and the like) of the current state of
the map is temporarily saved to disk and the original is freed from memory.

The server has a default and it is usually best to stick to this default.

3.1.6 Reset Timeout

The number of seconds after the map has been swapped out until it is reset.

Resetting a map means the swap file is deleted so next time the map is loaded
into memory it is loaded from the original, vanilla state.

The server has a default and it is usually best to stick to this default.

3.1.7 Difficulty

The recommended player level *for a single player*.

It is used in a number of situations, such as to autogenerate treasure and
autocalculate monster stats and environment damage.

This must be set for all maps.

3.1.8 Darkness

The map-wide darkness (see ^Lighting^) value.

A positive value means no msp can be darker than this and a negative value
means no msp can get lighter than the absolute value of this. Zero means total
darkness.

3.1.9 Map Flags

There are several boolean flags which variously affect what can or cannot be
done on a map or some aspect of its general behaviour. Of these flags several
may be toggled on particular msps by setting the corresponding msp flag.

3.1.9.1 Daylight

This map is subject to variable ambient lighting according to the game time of
day and calendar.

3.1.9.2 PvP

There is PvP on this map.

3.1.9.3 No Spells

No spells can be cast on this map.

3.1.9.4 No Prayers

No prayers can be invoked on this map.

3.1.9.5 No Harmful Castables

No damage-dealing spells/prayers can be cast/invoked on this map.

3.1.9.6 No Summoning

No monsters/pets/henchmen may be summoned on this map.

3.1.9.7 No Swap

The map will never be swapped out which effectively means its so-called swap
time is actually the time until reset.

3.1.9.8 Fixed Reset

The map will reset after the reset time regardless of swap status or activity.

3.1.9.9 Fixed Login

Players always respawn at the Enter X/Y msp on this map.

3.2 Msp Floor Settings

Meta-information in the msp floor settings affects only that particular msp.
Some floor settings define meta-information found nowhere else while others
modify that found in the map header.

3.2.1 Face

3.2.2 Terrain

3.2.3 Darkness

3.2.4 Msp Flags

3.2.4.1 Daylight

3.2.4.2 PvP

3.2.4.3 No Spells

3.2.4.4 No Prayers

3.2.4.5 No Harmful Castables

3.2.4.6 Player Only

3.2.4.7 No Pass

I'm not sure msp flags are explained too well ATM. Essentially, each msp has certain flags which reflect either certain aspects of one or more objects on it, and/or certain settings of that msp's floor. Basically this allows us to, for example, distinguish between building interiors (no natural light) and exteriors (bathed in daylight) in towns or have dungeons with porous ceilings that let in patches of daylight. Another nice feature is we can have, eg, towns that disallow harmful castables (100%) as well as (and I have yet to test this but the theory works) dynamic anti-magic shields that block harmful castablesless often (we can also do all this for just spells or just prayers, including to reflect them).

clobber

« Reply #34 on: 25, August 2014, 18:28:47 »
Quote
...aimed at intelligent and inquisitive mappers and players.

Perhaps this is the problem?   :laugh:
Posted by Clobber

Collector Of Burnt out torches, 0 and Counting.

,-.  ___ ,-.
 \/ .   .  \ / 
(___O___)
 /  \      /   )
 ( ||       || )
  000     000
Woof, Woof!

Quote from: Longir
I use caution, fear is a distraction

smacky

« Reply #35 on: 24, September 2014, 15:21:26 »
The priest stairs issue is because the server (always has)   temporarily stored the exit's exit path in ->title. This is then cleared at the end of that bit of code so is normally invisible/irrelevant to players.

However because that exit (presumably) returns from its script to block /apply it apparently doesn't get as far as clearing it.

Since early 0.10.5 the temp storage has been pointless anyway AFAICR but I left it in... well no reason really. So I'll fix this in code in a bit.

This all should be fixed on dev now. As a bonus it is also safe to apply an exit in your inv (which potentially could open some interesting possibilities in future (eg, town portal-esque magic items, etc)  (but more specific thought on this is needed).

My local testing has been quite basic so on dev MMs/SAs try picking up/dropping on different maps exits before applying.

Especially try this with exits in instances that go elsewhere within the same instance. Pick up such an exit, go back to the mplayer world and apply it there. And vice versa. Try taking an instance entrance into the instance (pick it up, apply in your inv). Then apply it again. What happens?

If anyone reads the code, the new bits are heavily commented but ATM it is just grafted into the old code, no tidying, etc. Next gen 0.10.7 is quite different.

EDIT: BTW the original bug was actually because old servers made a special exception for exits to the usual way ->title works; 0.10.7 no longer does.
« Last Edit: 24, September 2014, 15:25:40 by smacky »

_people_

« Reply #36 on: 07, January 2015, 01:20:55 »
I've just given the new pickup/drop code a thorough testing, because you happened to fix a bug I had been investigating. Although there's now a very minor bug in the same sense.

Where previously grabbing a stackable object from a sack (or more realistically a corpse), if you grabbed it again after the quantity window disappears, it'll be transferred back to the container. Now, it says "You transfer the 100 gold coin into your inventory." which seems superfluous as you already did that and it's still in the same spot it was in before.

Beyond that, I'm not finding problems. I was a bit surprised upon learning I could pick up anything, and it doesn't seem to cause any problems with NPC's or their AI.
-- _people_ :)

smacky

« Reply #37 on: 07, January 2015, 10:47:46 »
First, sorry things have, well, stopped over the last few months I will get back on this soon (someone else testing is always a good source of encouragement).

Yes, over time I'd rewritten stuff like the underlying stacking logic and added features like homeless mobs (mobs without spawnpoints so, eg, scripts can add/move/modify them without side effect), but the pick up/drop code was still decades old and creaky.

So I brought that into this century. IIRC the only thing you (SA/MM) can't pick up is a player (and floors/fmasks which aren't real objects anyway). Mobs/NPCs become homeless when you do, meaning that their spawnpoint will probably respawn soon.

This all makes minor dynamic map editing/live quests easier/possible.

Yes the messaging probably needs work but for testing I wanted it to tell me too much rather than too little.

clobber

« Reply #38 on: 09, January 2015, 23:15:16 »
I've got a bit more time now, so my plan is to refine what is already on Dev server and perhaps add one or two extra quests that are half done because I couldn't remember where I got to.

That should leave us in a state in about two weeks with our normal 3 guilds, equally represented from Guidhall to Stoneglow.
Posted by Clobber

Collector Of Burnt out torches, 0 and Counting.

,-.  ___ ,-.
 \/ .   .  \ / 
(___O___)
 /  \      /   )
 ( ||       || )
  000     000
Woof, Woof!

Quote from: Longir
I use caution, fear is a distraction

clobber

« Reply #39 on: 10, January 2015, 23:47:44 »
Also, additional point, is there any chance of a mobile client? even just for windows 8? I think it might help a bit with accessing a new kind of player.
Posted by Clobber

Collector Of Burnt out torches, 0 and Counting.

,-.  ___ ,-.
 \/ .   .  \ / 
(___O___)
 /  \      /   )
 ( ||       || )
  000     000
Woof, Woof!

Quote from: Longir
I use caution, fear is a distraction

Shroud

« Reply #40 on: 11, January 2015, 13:17:56 »
Visual Studio for Windows does support Apps so it's theoretically possible.

Main issue apart from recompiling code is also deciding how a player would control character with a phone as most phones don't have access to a whole keyboard
Doesn't matter, you'd die anyway. ;D Shroud's a hacker. After many hours of deep thought I have came to that conclusion.

_people_

« Reply #41 on: 11, January 2015, 21:09:36 »
As I've said, Android is increasing support for their Native Development Kit (NDK) with the eventual goal of making it as seamless as the normal Java SDK. The NDK allows developers to write apps in C (which our client uses). IIRC there is a SDL port already, so it shouldn't be too difficult to port the client.

As Shroud mentions, a Windows mobile version theoretically wouldn't be too difficult but we'd have to migrate to C++ so that we could use the .NET bindings which are required. Unfortunately C++.NET opens up a new can of worms in that it's a huge pain in the rear to use.

iOS uses Objective C, which is compatible with the syntax of standard C. Not necessarily the details of implementation, however. I believe it's possible but cannot yet estimate how much effort it would take to make this port.

Main issue apart from recompiling code is also deciding how a player would control character with a phone as most phones don't have access to a whole keyboard

Pupnik has made a nice client for Nokia phones which at the time ran a real Linux distro out of the box. He made some huge changes to the UI to make it look and perform better. While it doesn't have on-screen controls (that phone had a full keyboard) it would be quite easy to add them due to the mobile-optimized UI.
-- _people_ :)

clobber

« Reply #42 on: 12, January 2015, 11:46:34 »
I think I must have misunderstood the new windows - I thought the idea was that it was the same operating system as on their new computers? So are we still able to work on 8? Or were windows making it to be bigger than it was?
Posted by Clobber

Collector Of Burnt out torches, 0 and Counting.

,-.  ___ ,-.
 \/ .   .  \ / 
(___O___)
 /  \      /   )
 ( ||       || )
  000     000
Woof, Woof!

Quote from: Longir
I use caution, fear is a distraction

smacky

« Reply #43 on: 18, January 2015, 15:44:23 »
So anyway I'm aware that my latest server changes are the blockage here. Because I tell people that such-and-such bit of code will change profoundly so it's not really worth independently developing it, but then I don't commit my changes.

Well part of the reason is that I have been trying to comment/doc everything which really takes a lot of time. For various reasons this got me into a bit of a bottleneck a few months ago and everything ground to a halt.

I've picked up again today but I'm not entirely sure if I simply had commenting todo or if I left something fundamental unfinished. So I need to do a bit of local testing at least.

When I'm convinced it all works I'll commit just to get it out and worry about comments and such later (when I say comments I mean this in a pretty heavy way -- I've reimplemented fundamental parts of the ever (not least the way it thinks about maps) and I'm not sure how much sense it'll make without a detailed overview of the intent/reasons.

smacky

« Reply #44 on: 20, January 2015, 12:51:40 »
Small update: I'm a bit surprised as I the code seems to mostly work. The bugs I've introduced seem to be visual to do with the map:

  • Current target info is only shown momentarily on the map. FIXED
  • Certain multiparts (?) corrupt 1 square south of them (?) Not sure what's going on here. I'll investigate but might leave this borked for now as it is very minor.
  • Map darkness is screwy. Not a big surprise as I made major changes here, but it's really offputting. Basically usually it's OK but somehow you can cause a situation where you get a sort of chessboard effect where each board square is a 24x24 map and light squares are normally lighted but dark squares are darkness 0.

Tags:
 

Related Topics

  Subject / Started by Replies Last post
8 Replies
1254 Views
Last post 05, June 2005, 22:47:05
by KinkoBlast
2 Replies
1022 Views
Last post 21, December 2005, 08:12:23
by Gecko
107 Replies
16097 Views
Last post 07, March 2008, 07:10:07
by Anich
0 Replies
2638 Views
Last post 14, April 2008, 05:04:49
by longir