I thought he said early ejaculations at first was like wtf.

Wet dreams though.
In response to Lavenblade
Lavenblade wrote:
I thought he said early ejaculations at first was like wtf.

Wet dreams though.

Turns out they're using my ancient and horribly put together sound library.... please don't use that, it's trash lol.

I've taken it down because I've neglected to handle the problems it has for years now and I don't feel like fixing/remaking it.

I may do so after Lux is finished because I did make a custom sound system for that which works a LOT better, but I've got too much else to work on to adapt it into a library to replace the one that's currently up there.
In response to Bravo1
Bravo1 wrote:
I may do so after Lux is finished because I did make a custom sound system for that which works a LOT better, but I've got too much else to work on to adapt it into a library to replace the one that's currently up there.

I'll be lurking, waiting, watching.
In response to Bl4ck Adam
Bl4ck Adam wrote:
Bravo1 wrote:
I may do so after Lux is finished because I did make a custom sound system for that which works a LOT better, but I've got too much else to work on to adapt it into a library to replace the one that's currently up there.

I'll be lurking, waiting, watching.

There's an easy fix for now, which is to check if the mob has a client, and if it does, then send it. That way only the players will have it sent to them.

An even better way to do it would be to look at all the clients in the world (instead of all the mobs in view(100), then check if their mob is within the maximum range, and if they are, send the sound.
In response to Bravo1
I did the first fix last night, but i'll look into the second!
In response to Bravo1
Bravo1 wrote:
An even better way to do it would be to look at all the clients in the world (instead of all the mobs in view(100), then check if their mob is within the maximum range, and if they are, send the sound.

Oh man, looping through view() to find potential players is such a terrible idea. hearers()/viewers()? Even worse.

Pre-populate a per-layer list of players then just measure delta x/y per-player to filter input. Dealing with the tilemap when not necessary is just a waste of processing power. This approach assumes that you never set the location of a player manually... Because fuck people who do that.

If you want to get real fancy, you can use a quadtree.

Standard movement overrides (Tile-based):
atom
proc
Bumped(atom/movable/o)

Enter(atom/movable/o,atom/oldloc)
return o.onEnter(src,oldloc,..())

Exit(atom/movable/o,atom/newloc)
return o.onExit(src,newloc,..())

Entered(atom/movable/o,atom/oldloc)
o.onEntered(src,oldloc)
..()

Exited(atom/movable/o,atom/newloc)
o.onExited(src,newloc)
..()

movable
var
tmp
last_move = 0
next_move = 0
move_delay = 10*FRAME
proc
canMove(atom/NewLoc,Dir)
return 1

New()
if(loc)
var/list/a = list()
if(isturf(loc))
for(var/turf/t in locs)
a |= t.loc
for(var/area/o in a)
o.Entered(src,null)
for(var/atom/o in locs)
o.Entered(src,null)
for(var/atom/movable/o in bounds(src))
o.Crossed(src,null)
..()

Move(atom/NewLoc,Dir)
if(next_move>world.time) return 0
var/oLoc = loc
var/oDir = dir
glide_size = TILE_WIDTH/move_delay*world.tick_lag
. = canMove(NewLoc,Dir)&&..()
if(.||dir!=oDir)
Moved(oLoc,oDir)

Cross(atom/movable/o)
return o.onCross(src,..())

Uncross(atom/movable/o)
return o.onUncross(src,..())

Crossed(atom/movable/o)
o.onCrossed(src)
..()

Uncrossed(atom/movable/o)
o.onUncrossed(src)
..()

Bump(atom/o)
o.Bumped(src)
..()

proc
onEnter(atom/o,atom/oldloc,retval)
return retval

onExit(atom/o,atom/newloc,retval)
return retval

onEntered(atom/o,atom/oldloc)

onExited(atom/o,atom/newloc)

onCross(atom/movable/o,retval)
return retval

onUncross(atom/movable/o,retval)
return retval

onCrossed(atom/movable/o)

onUncrossed(atom/movable/o)

ForceMove(atom/NewLoc,Dir)
var/oDir = dir
var/OldLoc = loc
if(loc==NewLoc)
if(dir!=Dir)
dir = Dir
Moved(OldLoc,oDir)
return 1
else
return 0

glide_size = TILE_WIDTH
var/list/olocs, list/nlocs
var/list/oareas = list(), list/nareas = list()
var/list/oobjs, list/nobjs

olocs = locs
if(isturf(loc))
for(var/turf/t in olocs)
oareas |= t.loc
oobjs = obounds(src)
if(!oobjs) oobjs = list()
else oobjs -= locs
else
oobjs = list()

loc = NewLoc
dir = Dir

nlocs = locs
if(isturf(loc))
nlocs = locs
for(var/turf/t in nlocs)
nareas |= t.loc
nobjs = obounds(src)
if(!nobjs) nobjs = list()
else nobjs -= locs
else
nobjs = list()

var/list/xareas = oareas-nareas, list/eareas = nareas-oareas
var/list/xlocs = olocs-nlocs, list/elocs = nlocs-olocs
var/list/xobjs = oobjs-nobjs, list/eobjs = nobjs-oobjs

for(var/area/a in xareas)
a.Exited(src,loc)
for(var/turf/t in xlocs)
t.Exited(src,loc)
for(var/atom/movable/o in xobjs)
o.Uncrossed(src)

for(var/area/a in eareas)
a.Entered(src,OldLoc)
for(var/turf/t in elocs)
t.Entered(src,OldLoc)
for(var/atom/movable/o in eobjs)
o.Crossed(src)

Moved(OldLoc,oDir)
return 1

proc
Moved(atom/OldLoc,oDir)
if(OldLoc&&loc)
last_move = world.time
next_move = world.time+move_delay



Map segmentation stub:
var
map_manager/map_manager = new/map_manager

world
New()
map_manager.InitMap()

map_manager
var
list/layers
proc
InitMap()
layers = list()
for(var/cz in 1 to world.maxz)
layers += new/map_layer(cz)

map_layer
var
z
list/players
proc
PlayerEntered(mob/m)
if(!players) players = list(m)
else players |= m

PlayerExited(mob/m)
if(players) players -= m

New(ly)
z = ly

mob
Moved(atom/OldLoc,oDir)
..()
if(client&&OldLoc&&OldLoc.z!=z)
var/map_layer/ly
if(isturf(OldLoc))
ly = map_manager.layers[OldLoc.z]
ly.PlayerExited(src)
if(isturf(loc))
ly = map_manager.layers[z]
ly.PlayerEntered(src)



Example Chat stub:
#define WHISPER_RANGE 3
#define SAY_RANGE 10
#define SHOUT_RANGE 20

var
list/players = list()
proc
worldMessage(mob/speaker,msg,channel)
var/list/l
var/output = "([channel]) [speaker]: [msg]"
if(speaker.client)
l = players-speaker
speaker.selfMessage(output,channel)
else
l = players
for(var/mob/m in l)
m.chatMessage(output,channel)

localMessage(mob/speaker,range,msg,channel)
var/map_layer/ly = map_manager.layers[speaker.z]
var/list/l
var/px = speaker.x, py = speaker.y
var/output = "([channel]) [speaker]: [msg]"
if(speaker.client)
l = ly.players-speaker
speaker.selfMessage(output,channel)
else
l = ly.players

for(var/mob/m in l)
if(abs(m.x-px)<=range&&abs(m.y-py)<=range)
m.chatMessage(output,channel)

mob
proc
selfMessage(message,channel)
set waitfor = 0
src << message

chatMessage(message,channel)
set waitfor = 0
src << message
verb
OOC(msg as text|null)
set hidden = 1
set instant = 1
if(!msg) return
worldMessage(src,msg,"OOC")

whisper(msg as text|null)
set hidden = 1
set instant = 1
if(!msg) return
if(!isturf(loc)) return
localMessage(src,WHISPER_RANGE,msg,"WHISPER")

say(msg as text|null)
set hidden = 1
set instant = 1
if(!msg) return
if(!isturf(loc)) return
localMessage(src,SAY_RANGE,msg,"SAY")

shout(msg as text|null)
set hidden = 1
set instant = 1
if(!msg) return
if(!isturf(loc)) return
localMessage(src,SHOUT_RANGE,msg,"SHOUT")

Del()
key = null
loc = null
..()

combatant
player
Login()
..()
players += src

Logout()
players -= src
..()
del src
In response to Ter13
Oh man, looping through view() to find potential players is such a terrible idea. hearers()/viewers()? Even worse.

Yeah, that's why I told them not to.

I made the library so long ago and I look at it now and all I can do is reel back in disgust lol.
I made the library so long ago and I look at it now and all I can do is reel back in disgust lol.

I remember when I thought setting oversized bounding boxes on the map was faster than view(). Holy crap was it not.

Learning and growing man... Wild ride.
Started playing around with lighting again.
You stop that!
In response to Bl4ck Adam
Bl4ck Adam wrote:

In response to Bl4ck Adam
To improve the effect here, the gray dirt should also fall and disperse laterally as it is fading.



Spent last night and the wee hours of this morning on rewriting the way projectiles are handled. projectiles are much more efficient and accuracy is a lot more.. accurate? lol

I still need to port over a handful of other projectiles still but this is progress!
In response to Bl4ck Adam
Bl4ck Adam wrote:

I love the smell of napalm in the morning.
In response to Bl4ck Adam
Another toy...


EDIT: Sorry, not supposed to be a response to Bl4ck Adam. Oops.

I need to figure out why my computer is shite at recording.
Are you accidentally recording sound as well?

Page: 1 2 3 ... 226 227 228 229 230 ... 349 350 351