Search found 178 matches

by Winawer
Fri Apr 11, 2014 3:41 pm
Forum: General Development
Topic: Strategies for real-time networked player movement
Replies: -1
Views: 2547

Re: Strategies for real-time networked player movement

What I mean is that moving one square costs practically nothing with A* if you have the graph in memory already. The cost is only prohibitive if you have to build the graph on every click.
by Winawer
Fri Apr 11, 2014 8:05 am
Forum: General Development
Topic: Strategies for real-time networked player movement
Replies: -1
Views: 2547

Re: Strategies for real-time networked player movement

If you already have the graph you're going to traverse, A* will not cost pretty much anything since it will only check one node. If you need to build the graph for every movement then it'll probably be too costly. You could consider doing an adjacency check, since you won't need A* for a mouse click...
by Winawer
Tue Apr 01, 2014 5:46 am
Forum: Coding
Topic: some questions
Replies: -1
Views: 1059

Re: some questions

Jackolantern wrote:I am not sure MySQL will like having a linebreak in the middle of a query.
Doesn't care.
by Winawer
Mon Mar 31, 2014 5:49 am
Forum: Beginner Help and Support
Topic: Returning 1 result
Replies: -1
Views: 494

Re: Returning 1 result

The screenshot link doesn't work.
by Winawer
Tue Mar 25, 2014 10:02 am
Forum: Advanced Help and Support
Topic: Draggable Game Map?
Replies: -1
Views: 926

Re: Draggable Game Map?

You could also lazy unload the divs when they're no longer in view.
by Winawer
Tue Mar 25, 2014 9:48 am
Forum: Advanced Help and Support
Topic: Better way to refresh div?
Replies: -1
Views: 1756

Re: Better way to refresh div?

Yes, the sessions are handled chronologically because the session file is locked and the later loads are waiting for the file lock to open. If the same user polls a lot he may experience lag because of this. I think that session_regenerate_id() creates a whole new session file, which explains why it...
by Winawer
Tue Mar 25, 2014 9:01 am
Forum: Advanced Help and Support
Topic: Draggable Game Map?
Replies: -1
Views: 926

Re: Draggable Game Map?

I've used jQuery UI draggable (http://jqueryui.com/draggable/) in the past for some prototypes of draggable game maps. It was pretty simple in my experience, but I'm not sure if it suits your requirements, you'll have to test it for yourself.
by Winawer
Tue Mar 25, 2014 8:41 am
Forum: Advanced Help and Support
Topic: Better way to refresh div?
Replies: -1
Views: 1756

Re: Better way to refresh div?

You should combine all those load() function calls into one getJSON(). Seven calls means up to seven times the bandwidth wasted.

Most of the lag is probably caused by your server-side scripts. A likely culprit is DB writes causing locks.
by Winawer
Mon Mar 17, 2014 6:44 am
Forum: Advanced Help and Support
Topic: Better way to refresh div?
Replies: -1
Views: 1756

Re: Better way to refresh div?

What does stats_update_query.php do? 15 players polling at 20 second intervals shouldn't lag at all unless you're doing some heavy stuff.
by Winawer
Sat Mar 01, 2014 10:18 am
Forum: Beginner Help and Support
Topic: Best Way To Get Select Values
Replies: -1
Views: 360

Re: Best Way To Get Select Values

You mean something like <?php for( $i = 1; $i <= 6; $i++ ) {     ?>     <select name="attack[<?php echo $i ?>]" tabindex="2">     <option value="3">Attack High</option>     <option value="2">Attack Medium</option>     <option value="1">Attack Low</op...

Go to advanced search