Search Results

Search found 6328 results on 254 pages for 'anonymous person'.

Page 8/254 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Adjusting server-side tickrate dynamically

    - by Stuart Blackler
    I know nothing of game development/this site, so I apologise if this is completely foobar. Today I experimented with building a small game loop for a network game (think MW3, CSGO etc). I was wondering why they do not build in automatic rate adjustment based on server performance? Would it affect the client that much if the client knew this frame is based on this tickrate? Has anyone attempted this before? Here is what my noobish C++ brain came up with earlier. It will improve the tickrate if it has been stable for x ticks. If it "lags", the tickrate will be reduced down by y amount: // GameEngine.cpp : Defines the entry point for the console application. // #ifdef WIN32 #include <Windows.h> #else #include <sys/time.h> #include <ctime> #endif #include<iostream> #include <dos.h> #include "stdafx.h" using namespace std; UINT64 GetTimeInMs() { #ifdef WIN32 /* Windows */ FILETIME ft; LARGE_INTEGER li; /* Get the amount of 100 nano seconds intervals elapsed since January 1, 1601 (UTC) and copy it * to a LARGE_INTEGER structure. */ GetSystemTimeAsFileTime(&ft); li.LowPart = ft.dwLowDateTime; li.HighPart = ft.dwHighDateTime; UINT64 ret = li.QuadPart; ret -= 116444736000000000LL; /* Convert from file time to UNIX epoch time. */ ret /= 10000; /* From 100 nano seconds (10^-7) to 1 millisecond (10^-3) intervals */ return ret; #else /* Linux */ struct timeval tv; gettimeofday(&tv, NULL); uint64 ret = tv.tv_usec; /* Convert from micro seconds (10^-6) to milliseconds (10^-3) */ ret /= 1000; /* Adds the seconds (10^0) after converting them to milliseconds (10^-3) */ ret += (tv.tv_sec * 1000); return ret; #endif } int _tmain(int argc, _TCHAR* argv[]) { int sv_tickrate_max = 1000; // The maximum amount of ticks per second int sv_tickrate_min = 100; // The minimum amount of ticks per second int sv_tickrate_adjust = 10; // How much to de/increment the tickrate by int sv_tickrate_stable_before_increment = 1000; // How many stable ticks before we increase the tickrate again int sys_tickrate_current = sv_tickrate_max; // Always start at the highest possible tickrate for the best performance int counter_stable_ticks = 0; // How many ticks we have not lagged for UINT64 __startTime = GetTimeInMs(); int ticks = 100000; while(ticks > 0) { int maxTimeInMs = 1000 / sys_tickrate_current; UINT64 _startTime = GetTimeInMs(); // Long code here... cout << "."; UINT64 _timeTaken = GetTimeInMs() - _startTime; if(_timeTaken < maxTimeInMs) { Sleep(maxTimeInMs - _timeTaken); counter_stable_ticks++; if(counter_stable_ticks >= sv_tickrate_stable_before_increment) { // reset the stable # ticks counter counter_stable_ticks = 0; // make sure that we don't go over the maximum tickrate if(sys_tickrate_current + sv_tickrate_adjust <= sv_tickrate_max) { sys_tickrate_current += sv_tickrate_adjust; // let me know in console #DEBUG cout << endl << "Improving tickrate. New tickrate: " << sys_tickrate_current << endl; } } } else if(_timeTaken > maxTimeInMs) { cout << endl; if((sys_tickrate_current - sv_tickrate_adjust) > sv_tickrate_min) { sys_tickrate_current -= sv_tickrate_adjust; } else { if(sys_tickrate_current == sv_tickrate_min) { cout << "Please reduce sv_tickrate_min..." << endl; } else{ sys_tickrate_current = sv_tickrate_min; } } // let me know in console #DEBUG cout << "The server has lag. Reduced tickrate to: " << sys_tickrate_current << endl; } ticks--; } UINT64 __timeTaken = GetTimeInMs() - __startTime; cout << endl << endl << "Total time in ms: " << __timeTaken; cout << endl << "Ending tickrate: " << sys_tickrate_current; char test; cin >> test; return 0; }

    Read the article

  • Extremely Hybrid Game requirements

    - by tugrul büyükisik
    What system specifications would a game need if it was: Total players per planet: ~20000 Total players per team:~1M Total players per map(small volume of space or small surface over a planet): ~2000 Total players: ~10M(world has more players than this amount i think) Two of the players are commanders of opposite quadrants(from HUD of a strategy game). Lots of players use space-crafts as a captain(like 3d fps and rts). Many many players control consoles in those space-crafts as under command of captains.(fps ) Some players are still in stone-age trying to reinvent wheel in some planet. Players design and construct any vehicles they have. With good physics engine Has puzzles inside. Everyone get experience by doing stuff(RPG). Commerce, income or totally different resource-based group(like starcraft) Player classes(primitive: cunning and strong, wrapped: healthy, wealthy) Arcade top-down style firing with ships when people get bored very low chance of miraculous things.(mediclorians, wormholes, bugs) Different game-modes: persistent(living world), resetted periodically(a new chance for noobs), instant(pre-built space + hack&slash) I suspect this would need 128GB ram and 2048 cores.

    Read the article

  • How can I customize an FPS game?

    - by monoceres
    I want to create a customized (modded) fps game where I can change the look and feel of the game to match my intended theme. Some of the things I would like to do: Create a custom map (terrain). Add custom sound effects Change AI (For example, running away instead of actively looking for combat). Change menus and add some storyboard. Script events in game (like a countdown until game over) Change the models of the NPC's. What options do I have? Is there any platform/game/engine/whatever that allows one to do the things above in a reasonable way? I work as a programmer so I'm not afraid of coding some part of the project, but to save time it would be nice to work in some high-level way (like scripting or configuration files).

    Read the article

  • How to implement "bullet time" in a multiplayer game?

    - by Tom
    I have never seen such a feature before, but it should provide an interesting gameplay opportunity. So yes, in a multiplayer/real-time environment (imagine FPS), how could I implement a slow motion/bullet time effect? Something like an illusion for the player that's currently slo-mo'ed. So everybody sees him "real-time", but he sees everything slowed down. Update A sidenote: keep in mind that a FPS game has to be balanced in order for it to be fun. So yes, this bullet time feature has to be solid, giving a small advantage to the "player", while not taking away from other players. Plus, there is a possibility that two players could activate their bullet time at the same time. Furthermore: I'm going to implement this in the future no matter what it takes. And, the idea is to build a whole new game engine for all this. If that gives new options, I'm more then interested in hearing the ideas. Meanwhile, here with my team we're thinking about this too, when our theory will be crafted, I'm going to share it here. Is this even possible? So, the question on "is this even possible" has been answered, now it's time to find the best solution. I'm keeping the "answer" until something exceptionally good comes up, like a prototype theory with something close to working pseudo code.

    Read the article

  • How game characters are made?

    - by Ahmed
    I'm new here. I would like to know how game characters are made that are movable? What kind of software and engines are used for these characters? I will be working with my friends on our final year project. Our game will be FPS and I have to draw some animations for FPS view and other enemy character that can be programmed easily to make a good game. Sorry if my questions seems dumb, but if you need more explanation i'm always here to discuss Thanks in advance

    Read the article

  • Client-side prediction for FPS

    - by newprogrammer
    People that understand client-side prediction and client-side interpolation, I have a question: When I play the game Team Fortress 2, and type cl_predict 1 into the developer's console, it enables client-side prediction. The also says "6 predictable entities reinitialized". It says this regardless of how many players are on the server, which makes sense, because other players are not predictable entities. I thought client-side prediction was only for the movement of the player. Are there other entities that the client can provide prediction for?

    Read the article

  • Validation and Error Generation when using the Data Mapper Pattern

    - by AndyPerlitch
    I am working on saving state of an object to a database using the data mapper pattern, but I am looking for suggestions/guidance on the validation and error message generation step (step 4 below). Here are the general steps as I see them for doing this: (1) The data mapper is used to get current info (assoc array) about the object in db: +=====================================================+ | person_id | name | favorite_color | age | +=====================================================+ | 1 | Andy | Green | 24 | +-----------------------------------------------------+ mapper returns associative array, eg. Person_Mapper::getPersonById($id) : $person_row = array( 'person_id' => 1, 'name' => 'Andy', 'favorite_color' => 'Green', 'age' => '24', ); (2) the Person object constructor takes this array as an argument, populating its fields. class Person { protected $person_id; protected $name; protected $favorite_color; protected $age; function __construct(array $person_row) { $this->person_id = $person_row['person_id']; $this->name = $person_row['name']; $this->favorite_color = $person_row['favorite_color']; $this->age = $person_row['age']; } // getters and setters... public function toArray() { return array( 'person_id' => $this->person_id, 'name' => $this->name, 'favorite_color' => $this->favorite_color, 'age' => $this->age, ); } } (3a) (GET request) Inputs of an HTML form that is used to change info about the person is populated using Person::getters <form> <input type="text" name="name" value="<?=$person->getName()?>" /> <input type="text" name="favorite_color" value="<?=$person->getFavColor()?>" /> <input type="text" name="age" value="<?=$person->getAge()?>" /> </form> (3b) (POST request) Person object is altered with the POST data using Person::setters $person->setName($_POST['name']); $person->setFavColor($_POST['favorite_color']); $person->setAge($_POST['age']); *(4) Validation and error message generation on a per-field basis - Should this take place in the person object or the person mapper object? - Should data be validated BEFORE being placed into fields of the person object? (5) Data mapper saves the person object (updates row in the database): $person_mapper->savePerson($person); // the savePerson method uses $person->toArray() // to get data in a more digestible format for the // db gateway used by person_mapper Any guidance, suggestions, criticism, or name-calling would be greatly appreciated.

    Read the article

  • ??1???????????????!???????????????|Oracle Coherence|??????

    - by ???02
    ????????????3????????????????????????????3??????????????????????????(?????????1?????????????????)????????????????????????RDBMS1?????????RDBMS??????????????????????????RDBMS????????????????RDBMS????????????????????????????????????SQL ????????????????????????????????????????RDBMS?????????????????????????????·???????????·??????????????????·???????????????????????????????(?????)????????????????????????????????????????????????????????????????????????????2??????????????????????????????????·??????????2?????????????????????????????·??????????????????????????????????????(?????????)???????????????????????????(????????)???????????????????·????????????????JBoss Cache??????????1????Java Map API????put/get?????????????????Java ?????????????????·??????????????????????????????????????????????1:JBoss Cache 3.0???????????????????????(Java Map API???????Java???????????????????????????)// ??????????Person????????????????// CacheFactory?DefaultCacheFactory?Cache?Fqn?Node?JBoss Cache????CacheFactory factory = new DefaultCacheFactory();// ????????Cache cache = factory.createCache();Fqn personData = Fqn.fromString("/person");// ???????????(?????·???)???Person???Node personNode = cache.getRoot().addChild(personData);// ??Person?????????????Person p1 = new Person(1234, "??", "??", "?????");// ?????·???????????personNode.put(1234, p1);?????·???·?????????·????????????????????????????????????·???·??????????????????????????·??????????????????2?????????????????????????????????????????????????????????????????????????????????????????????????????1????????RDBMS??????????????????????????2??????????????????Java API???????????????????????????????????????????????????????????·???·????????????????????????????·?????????·????????????????????????????????????????????·???·?????????????????????MapReduce???????????????????????????????????????????(?????)????????????????????·???·????????????????????????????????????????????????????????????·???????????????????????????????????????IT??????????????Web 2.0??????????????????????????????????????????????????????????????????????????????????????????????????????????????????2:??????????·???·???????Oracle Coherence?????????????????????(??????·?????JBoss Cache?????)// ??????????Person????????????????// CacheFactory?Oracle Coherence????// Person????????Map personCache = CacheFactory.getCache("person");// ??Person?????????????Person p1 = new Person(1234, "??", "??", "?????");// ?????·??????????personCache.put(1234, p1);??????????????????????3 ???????????????????????????????????·???????????????????????????·???·??????????????????????????????????·???????????????????12

    Read the article

  • Skype 4.2 crashes when connecting to one specific person

    - by Aaron
    ok i have Skype 4.2 on Windows Vista 32 bit. Skype was working fine with no problems at all but a situation came up and i had to reformat my laptop. Since the reformat skype doesnt connect to just one person on my contacts list. Ive uninstalled reinstalled multiple times, even removed him from my contacts and readded but to no avail. He is on Skype mobile with his phone not sure if this is a prob as it wasnt before. any help or advice here would be much appreciated.

    Read the article

  • Dynamic SQL Server stored procedure

    - by Pinu
    ALTER PROCEDURE [dbo].[GetDocumentsAdvancedSearch] @SDI CHAR(10) = NULL ,@Client CHAR(4) = NULL ,@AccountNumber VARCHAR(20) = NULL ,@Address VARCHAR(300) = NULL ,@StartDate DATETIME = NULL ,@EndDate DATETIME = NULL ,@ReferenceID CHAR(14) = NULL AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; -- DECLARE DECLARE @Sql NVARCHAR(4000) DECLARE @ParamList NVARCHAR(4000) SELECT @Sql = 'SELECT DISTINCT ISNULL(Documents.DocumentID, '') ,Person.Name1 ,Person.Name2 ,Person.Street1 ,Person.Street2 ,Person.CityStateZip ,ISNULL(Person.ReferenceID,'') ,ISNULL(Person.AccountNumber,'') ,ISNULL(Person.HasSetPreferences,0) ,Documents.Job ,Documents.SDI ,Documents.Invoice ,ISNULL(Documents.ShippedDate,'') ,ISNULL(Documents.DocumentPages,'') ,Documents.DocumentType ,Documents.Description FROM Person LEFT OUTER JOIN Documents ON Person.PersonID = Documents.PersonID LEFT OUTER JOIN DocumentType ON Documents.DocumentType = DocumentType.DocumentType LEFT OUTER JOIN Addressess ON Person.PersonID = Addressess.PersonID' SELECT @Sql = @Sql + ' WHERE Documents.SDI IN ( '+ QUOTENAME(@sdi) + ') OR (Person.AssociationID = ' + ''' 000000 + ''' + 'AND Person.Client = ' + QUOTENAME(@Client) IF NOT (@AccountNumber IS NULL) SELECT @Sql = @Sql + 'AND Person.AccountNumber LIKE' + QUOTENAME(@AccountNumber) IF NOT (@Address IS NULL) SELECT @Sql = @Sql + 'AND Person.Name1 LIKE' +QUOTENAME(@Address)+ 'AND Person.Name2 LIKE' +QUOTENAME(@Address)+ 'AND Person.Street1 LIKE' +QUOTENAME(@Address)+ 'AND Person.Street2 LIKE' +QUOTENAME(@Address)+ 'AND Person.CityStateZip LIKE' +QUOTENAME(@Address) IF NOT (@StartDate IS NULL) SELECT @Sql = @Sql + 'AND Documents.ShippedDate >=' +@StartDate IF NOT (@EndDate IS NULL) SELECT @Sql = @Sql + 'AND Documents.ShippedDate <=' +@EndDate IF NOT (@ReferenceID IS NULL) SELECT @Sql = @Sql + 'AND Documents.ReferenceID =' +QUOTENAME(@ReferenceID) -- Insert statements for procedure here -- PRINT @Sql SELECT @ParamList = '@Psdi CHAR(10),@PClient CHAR(4),@PAccountNumber VARCHAR(20),@PAddress VARCHAR(300),@PStartDate DATETIME ,@PEndDate DATETIME,@PReferenceID CHAR(14)' EXEC SP_EXECUTESQL @Sql,@ParamList,@Sdi,@Client,@AccountNumber,@Address,@StartDate,@EndDate,@ReferenceID --PRINT @Sql END ERROR Msg 102, Level 15, State 1, Line 23 Incorrect syntax near '000000'. Msg 105, Level 15, State 1, Line 23 Unclosed quotation mark after the character string 'AND Person.Client = [1 ]AND Person.AccountNumber LIKE[1]'.

    Read the article

  • Returning an anonymous class that uses a final primitive. How does it work?

    - by Tim P
    Hi, I was wondering if someone could explain how the following code works: public interface Result { public int getCount(); public List<Thing> getThings(); } class SomeClass { ... public Result getThingResult() { final List<Thing> things = .. populated from something. final int count = 5; return new Result { @Override public int getCount() { return count; } @Override public List<Thing> getThings(); return things; } } } ... } Where do the primitive int , List reference and List instance get stored in memory? It can't be on the stack.. so where? Is there a difference between how references and primitives are handled in this situation? Thanks a bunch, Tim P.

    Read the article

  • How can I load class's part using linq to sql without anonymous class or additional class?

    - by ais
    class Test { int Id{get;set;} string Name {get;set;} string Description {get;set;} } //1)ok context.Tests.Select(t => new {t.Id, t.Name}).ToList().Select(t => new Test{Id = t.Id, Name = t.Name}); //2)ok class TestPart{ int Id{get;set;} string Name {get;set;} } context.Tests.Select(t => new TestPart{Id = t.Id, Name = t.Name}).ToList().Select(t => new Test{Id = t.Id, Name = t.Name}); //3)error Explicit construction of entity type 'Test' in query is not allowed. context.Tests.Select(t => new Test{Id = t.Id, Name = t.Name}).ToList(); Is there any way to use third variant?

    Read the article

  • Problems with passing an anonymous temporary function-object to a templatized constructor.

    - by Akanksh
    I am trying to attach a function-object to be called on destruction of a templatized class. However, I can not seem to be able to pass the function-object as a temporary. The warning I get is (if the comment the line xi.data = 5;): warning C4930: 'X<T> xi2(writer (__cdecl *)(void))': prototyped function not called (was a variable definition intended?) with [ T=int ] and if I try to use the constructed object, I get a compilation error saying: error C2228: left of '.data' must have class/struct/union I apologize for the lengthy piece of code, but I think all the components need to be visible to assess the situation. template<typename T> struct Base { virtual void run( T& ){} virtual ~Base(){} }; template<typename T, typename D> struct Derived : public Base<T> { virtual void run( T& t ) { D d; d(t); } }; template<typename T> struct X { template<typename R> X(const R& r) { std::cout << "X(R)" << std::endl; ptr = new Derived<T,R>(); } X():ptr(0) { std::cout << "X()" << std::endl; } ~X() { if(ptr) { ptr->run(data); delete ptr; } else { std::cout << "no ptr" << std::endl; } } Base<T>* ptr; T data; }; struct writer { template<typename T> void operator()( const T& i ) { std::cout << "T : " << i << std::endl; } }; int main() { { writer w; X<int> xi2(w); //X<int> xi2(writer()); //This does not work! xi2.data = 15; } return 0; }; The reason I am trying this out is so that I can "somehow" attach function-objects types with the objects without keeping an instance of the function-object itself within the class. Thus when I create an object of class X, I do not have to keep an object of class writer within it, but only a pointer to Base<T> (I'm not sure if I need the <T> here, but for now its there). The problem is that I seem to have to create an object of writer and then pass it to the constructor of X rather than call it like X<int> xi(writer(); I might be missing something completely stupid and obvious here, any suggestions?

    Read the article

  • Why is an anonymous inner class containing nothing generated from this code?

    - by Andrew Westberg
    When run through javac on the cmd line Sun JVM 1.6.0_20, this code produces 6 .class files OuterClass.class OuterClass$1.class OuterClass$InnerClass.class OuterClass$InnerClass2.class OuterClass$InnerClass$InnerInnerClass.class OuterClass$PrivateInnerClass.class When run through JDT in eclipse, it produces only 5 classes. OuterClass.class OuterClass$1.class OuterClass$InnerClass.class OuterClass$InnerClass2.class OuterClass$InnerClass$InnerInnerClass.class OuterClass$PrivateInnerClass.class When decompiled, OuterClass$1.class contains nothing. Where is this extra class coming from and why is it created? package com.test; public class OuterClass { public class InnerClass { public class InnerInnerClass { } } public class InnerClass2 { } //this class should not exist in OuterClass after dummifying private class PrivateInnerClass { private String getString() { return "hello PrivateInnerClass"; } } public String getStringFromPrivateInner() { return new PrivateInnerClass().getString(); } }

    Read the article

  • How to create a anonymous proxy?

    - by Rakesh Juyal
    I want to create a proxy server anonymous proxy . I googled it and even found some tutorial but those were in PHP. If somebody is having tutorial of proxy server anonymous proxy creation in java then please post it here Or simply let me know what approach should i follow to create a proxy server anonymous proxy. [ i will be using Tomcat { if that matters for your answer } ] Thanks Edit i guess i was not clear in stating what i require. Actually i am trying to develop a site like 'http://proxyug.com/' . If none of you were getting what i asked, then it certainly means such sites are not known as 'proxy server' they must be called something else. :)

    Read the article

  • Anonymous code blocks in Groovy

    - by piepera
    Is there a way to use anonymous code blocks in Groovy? For example, I'm trying to translate the following Java code into Groovy: { int i = 0; System.out.println(i); } int i = 10; System.out.println(i); The closest translation I can come up with is the following: boolean groovyIsLame = true; if (groovyIsLame) { int i = 0; System.out.println(i); } int i = 10; System.out.println(i); I know anonymous code blocks are often kind of an antipattern. But having variables with names like "inputStream0" and "inputStream1" is an antipattern too, so for this code I'm working on, anonymous code blocks would be helpful.

    Read the article

  • How to test GUI for color blind person?

    - by Daok
    Is there a way to test if a GUI is usable for color blind person? I know that it has many degrees and I guess that's why simply doing a screenshot in black & white is not the best way to test the usability of a GUI for a color blind person. What is the best way or best tool to do it?

    Read the article

  • Windows 2003 hidden anonymous shares with IP restriction

    - by Tomas
    Hello, I have created anonymous(everyone account) "hidden" shares on Windows 2003 to let our ASP.NET application access it from another server without credentials. I have added $ to share name to hide it from other users, but actually this is not solution because such shares can be easily discovered by other OS or some tools on Win. Can I restrict shared folder access by IP? Regards, Tomas

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >