Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

cjsrch

Members
  • Posts

    52
  • Joined

  • Last visited

    Never

cjsrch's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Or just change your dpi on windows.
  2. Actually less populated would be more costly in alot of cases due to less demand yet a fixed cost.. MIA and Fortlauderdale are both major airports and flights are usually cheep since there are so many
  3. FLORIDA! I love watching Canadians get sun burnt….. esp from Quebec Anyways any one else in Florida area?
  4. > Thanks and I dont know how to do advanced rendering. I find this ironic
  5. bacon and eggs side of hashbrowns ???
  6. cjsrch

    Game of Thrones

    my wife bitched about the nose issue as well.. think of what a pain in the ass it would be for make up to do that for him since he is in every episode.. atleast they made a joke about it not getting cut off. Its a linear adaptation of a non linear book i think they are doing pretty danm well..
  7. Your way does sound easy. After you said that i started to think of having a new layer that has tile data each tile gets assigned a area number then a string of areanumbers viewable from it so if you are in a room your tile says all tiles numbered 1 are ok to show.. as you walk to a corner it would say all tiles numbers 1 and 2 are ok to show soit would open up tiles around the corner …. Would be easy and much less cpu intensive then my way.. find screen size ( mine has multiple sizes) exmpl (10x10) divide x and y tiles displayed by two (5x5) make ratios using those numbers all combos in that range (-5:-5 1:5 -1:5 and so on) start at player position and using each ratio move out from player untill it hits a block once it hits a block mark all tiles beyond that layer as black. see crappy example here http://justprof.it/test.php Sample of code if it helps any one with an idea ``` ".$x." ".$y.""; $xf=$tx+$x; while(($ty=0) AND ($tx=0) ){ if($tx==$xf){ $ty=$ty+$y; $xf=$xf+$x; } echo " x".$tx."y".$ty."b".$block; if($block>=1){ if($mapprint[$tx][$ty]==1){ }else { $mapprint[$tx][$ty]=2; } } if($map[$tx][$ty]==1){ $block=1; } if($x!=0){ $tx=$tx+($x/abs($x)); }else { $tx=$xm+1; } } ///////// $x=$x+1; } $x=0-$qx; $y=$y+1; } //////////////////// $mapprint[$playerlocx][$playerlocy]=5; $x=0; $y=0; ?> =1){ if($mapprint[$x][$y]==1){ echo "O"; } else { echo "x"; } } else { echo "....."; } ?> | ```
  8. Im working on this now.. only shows parts that would actualy be vis from where you stand so its based on true location and just just a section. its turning to be really cpu heavy so if i can cut it down ill release it.. currently at the phase of using php ( i know it better) for proof of concept… so dont expect anything soon.
  9. ResourceCache(mapnum).ResourceData(Resource_Count).cur_health = Resource(Map(mapnum).Tile(x, y).Data1).health spitting error when i try to run it using preexisting maps.. i take it i do infact have to remove old maps?
  10. I guess ill come back to this one later then. Also this is all server side it shouldent be hurting your FPS at all?
  11. cjsrch

    Game of Thrones

    Bud first 4 or 5 episodes are a little slow.. I had to force my self throu three episodes the. I was hooked. Borgias is a good series as well
  12. cjsrch

    Game of Thrones

    sadly wife read the books and spoils it for me all the time :/
  13. Yes but EO3's pathfinding really sucks. reverting it back to eo3 standard and seeing how bad it does. if you see i put an an if to turn it on an off the eo3 standard seems to be processor heavy and inefficient. hence my report to you the other day of going from 50-80 cps to 500-900 cps wit just the code change.. granted the pathfinding in eo3 standard does FIND the target better EDIT well turns out neither yours OR eo3s pathfinding pays attention to blocks that were put inplace using the directional blocks…. IT only works if i use attribute based blocks... Now that i know this i will go back to trying both yours and the default and see what one is better on server load.
  14. Well commenting all of that out allowed them to start attacking again however pathfinding is still pretty bad i made a small map maze Spawn =============== | 1 |============== | | | | | ================== 4 | 2 | | | ================= 3 with him spawning at spawn point me standing at position 1 he will find me by going around if i stand anywhere else he will get stuck if he is at poistion 2 and i am at 4 he will get stuck on wall if i stand at 3 and he is at 4 he will get stuck I have tried usiing both attribute blocks and directional blocks with no change
  15. This is what i current have I commented out a line and commented out anything to do with it Npcs move buggy I added a statement to allow me to turn on and off blocks of code if 1=0 blablabla the if so i could disable everything after pathfinding.. doing so the npcs will follow and attack… and fast.. but there is no pathfinding.. if i walk around a corner they will get stuck with it on the npc movement is slowed and seems to fail' ``` ' ///////////////////////////////////////////// ' // This is used for NPC walking/targetting // ' ///////////////////////////////////////////// ' Make sure theres a npc with the map If Map(mapnum).NPC(x) > 0 And MapNpc(mapnum).NPC(x).Num > 0 Then If MapNpc(mapnum).NPC(x).StunDuration > 0 Then ' check if we can unstun them If GetTickCount > MapNpc(mapnum).NPC(x).StunTimer + (MapNpc(mapnum).NPC(x).StunDuration * 1000) Then MapNpc(mapnum).NPC(x).StunDuration = 0 MapNpc(mapnum).NPC(x).StunTimer = 0 End If Else target = MapNpc(mapnum).NPC(x).target targetType = MapNpc(mapnum).NPC(x).targetType ' Check to see if its time for the npc to walk If NPC(npcNum).Behaviour NPC_BEHAVIOUR_SHOPKEEPER Then If targetType = 1 Then ' player ' Check to see if we are following a player or not If target > 0 Then ' Check if the player is even playing, if so follow'm If IsPlaying(target) And GetPlayerMap(target) = mapnum Then didwalk = False target_verify = True TargetY = GetPlayerY(target) TargetX = GetPlayerX(target) Else MapNpc(mapnum).NPC(x).targetType = 0 ' clear MapNpc(mapnum).NPC(x).target = 0 End If End If ElseIf targetType = 2 Then 'npc If target > 0 Then If MapNpc(mapnum).NPC(target).Num > 0 Then didwalk = False target_verify = True TargetY = MapNpc(mapnum).NPC(target).y TargetX = MapNpc(mapnum).NPC(target).x Else MapNpc(mapnum).NPC(x).targetType = 0 ' clear MapNpc(mapnum).NPC(x).target = 0 End If End If End If If target_verify Then ' if map has a working matrix, use a* pathfinding If mapMatrix(mapnum).created Then If GetPlayerX(target) MapNpc(mapnum).NPC(x).TargetX Or GetPlayerY(target) MapNpc(mapnum).NPC(x).TargetY Then ' player has moved, re-find the path MapNpc(mapnum).NPC(x).hasPath = APlus(mapnum, CLng(MapNpc(mapnum).NPC(x).x), CLng(MapNpc(mapnum).NPC(x).y), CLng(GetPlayerX(target)), CLng(GetPlayerY(target)), Void, MapNpc(mapnum).NPC(x).arPath) ' set the npc's cur path location If MapNpc(mapnum).NPC(x).hasPath Then MapNpc(mapnum).NPC(x).pathLoc = UBound(MapNpc(mapnum).NPC(x).arPath) End If ' if has path, follow it If MapNpc(mapnum).NPC(x).hasPath Then ' follow path NpcMoveAlongPath mapnum, x didwalk = True End If End If If 0 = 1 Then 'Gonna make the npcs smarter.. Implementing a pathfinding algorithm.. we shall see what happens. If IsOneBlockAway(TargetX, TargetY, CLng(MapNpc(mapnum).NPC(x).x), CLng(MapNpc(mapnum).NPC(x).y)) = False Then If PathfindingType = 1 Then ' Check if we can't move and if Target is behind something and if we can just switch dirs If Not didwalk Then If MapNpc(mapnum).NPC(x).x - 1 = TargetX And MapNpc(mapnum).NPC(x).y = TargetY Then If MapNpc(mapnum).NPC(x).Dir DIR_LEFT Then Call NpcDir(mapnum, x, DIR_LEFT) End If didwalk = True End If ' If MapNpc(mapnum).NPC(x).x + 1 = TargetX And MapNpc(mapnum).NPC(x).y = TargetY Then If MapNpc(mapnum).NPC(x).Dir DIR_RIGHT Then Call NpcDir(mapnum, x, DIR_RIGHT) End If didwalk = True End If If MapNpc(mapnum).NPC(x).x = TargetX And MapNpc(mapnum).NPC(x).y - 1 = TargetY Then If MapNpc(mapnum).NPC(x).Dir DIR_UP Then Call NpcDir(mapnum, x, DIR_UP) End If didwalk = True End If If MapNpc(mapnum).NPC(x).x = TargetX And MapNpc(mapnum).NPC(x).y + 1 = TargetY Then If MapNpc(mapnum).NPC(x).Dir DIR_DOWN Then Call NpcDir(mapnum, x, DIR_DOWN) End If didwalk = True End If ' We could not move so Target must be behind something, walk randomly. If Not didwalk Then i = Int(Rnd * 2) If i = 1 Then i = Int(Rnd * 4) If CanNpcMove(mapnum, x, i) Then Call NpcMove(mapnum, x, i, MOVING_WALKING) End If End If End If End If Else i = FindNpcPath(mapnum, x, TargetX, TargetY) If i < 4 Then 'Returned an answer. Move the NPC If CanNpcMove(mapnum, x, i) Then NpcMove mapnum, x, i, MOVING_WALKING End If Else 'No good path found. Move randomly i = Int(Rnd * 4) If i = 1 Then i = Int(Rnd * 4) If CanNpcMove(mapnum, x, i) Then Call NpcMove(mapnum, x, i, MOVING_WALKING) End If End If End If End If Else Call NpcDir(mapnum, x, GetNpcDir(TargetX, TargetY, CLng(MapNpc(mapnum).NPC(x).x), CLng(MapNpc(mapnum).NPC(x).y))) End If Else i = Int(Rnd * 4) If i = 1 Then i = Int(Rnd * 4) If CanNpcMove(mapnum, x, i) Then Call NpcMove(mapnum, x, i, MOVING_WALKING) End If End If End If End If End If End If End if ' ///////////////////////////////////////////// ' // This is used for npcs to attack targets // ' ///////////////////////////////////////////// ```
×
×
  • Create New...