Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


polyfrag

Member Since 20 Mar 2003
Offline Last Active Today, 05:23 AM

#5207611 Comparison of STL list performance

Posted by polyfrag on 29 January 2015 - 10:41 PM

The inaccuracy in GetTickCount is supposedly only ~30 ms and I'm measuring the results of thousands of iterations once, not each iteration individually, which gives me consistent numbers. So it seems accurate.

 

https://github.com/polyf/cppvsc/blob/master/results.txt




#5207547 Comparison of STL list performance

Posted by polyfrag on 29 January 2015 - 04:45 PM

Why is STL list so much faster in all ways than custom list implementation in MSVS 2012 for a thousand iterations? What tricks can be used in C90 to make it as fast? Is a significant boost in performance possible with C90?


#5201695 Space rebelion mechanic

Posted by polyfrag on 04 January 2015 - 02:06 AM

I don't think rebellion spreads at the scale of planets. Suppose they have interstellar flight or interstellar Internet. Would there be a lot of tourism between close planets? Close in light years. Or trade. I think you need some reason for rebellion like starvation or high prices or mass poverty. Have partial rebellion in cities and that detract from efficiency or productivity. Or population, growth rate.


#5200311 Isometric Terrain (2D) generation

Posted by polyfrag on 27 December 2014 - 03:02 PM

There's two ways you could make terrain type transitions.

One is partly transparent transition terrain tiles from all combinations of sides. Then you just render four terrain transition images in place of one tile and the bottom layer is a full tile.

Other way is to prerender all transition combinations. There are e*e*e*e-1 permutations of elevation types, where e is the number of elevation levels, multiplied by t*t*t*t terrain transition permutations, where t is the number of terrain types.

Age of empires II does something similar to method #1 with blend masks. http://aok.heavengames.com/cgi-bin/forums/display.cgi?action=ct&f=3,40750,240,all


#5199485 How can I create an installer for my game?

Posted by polyfrag on 21 December 2014 - 11:55 PM

http://en.m.wikipedia.org/wiki/List_of_installation_software


#5199179 Hands off economy (planetary improvements)

Posted by polyfrag on 19 December 2014 - 04:42 PM

You're going to have to decide on a number of buildings and their inputs and outputs. Then there's the placement restrictions based on resource deposits.

 

You've said that if there's not enough food production, the price goes up. So it's either a multiplicative or additive relation. Price = demand/supply or Price = demand - supply.

 

Taxes take away from price profits, and they're either a multiplicative or additive relation. Price = demand/-supply /-taxes.

 

Then development rate depends on randomness and price.

 

You could have a whole assortment of consumer goods, then you'd have to decide on how consumption propensity is determined.

 

Just some ideas. I'm making hardcore micromanagement in my game though. Could also try an exponential/logarithmic relation.




#5179958 BSP portal visibility

Posted by polyfrag on 12 September 2014 - 02:16 PM

How does a BSP compiler decide which leafs make up a cluster or 'room' and which windings make a portal?

 

 




#5162486 Why does this matrix multiplication order matter?

Posted by polyfrag on 24 June 2014 - 01:23 AM

By the way, here's what the glitch looked like. Looks cool. Looks like it's polluted. I might try to mimic that effect for a certain map.

 

2014-06-22%2002-39-13.jpg

 

2014-06-22%2006-20-50.jpg

 

2014-06-22%2006-32-44.jpg




#5159686 Game suggestions (The Doomed) << Still thinking of a name

Posted by polyfrag on 11 June 2014 - 01:15 AM

I'd join in but I'm working on an RTS. Maybe in 2 years.

Some thoughts. You'd need a server in every region players play or else it will be too laggy, and then you also need some way for the servers to communicate to keep the game world together. You'd also need a large level editing tool.


#5159682 Location, job, education

Posted by polyfrag on 11 June 2014 - 01:02 AM

How about this. You have different "technologies" or "knowledges" that your strata (group of labourers) can possess. To obtain certain knowledges (eg "refinery operation") you might require simpler knowledges. Just make some up to build a hierarchy of knowledge (eg "knowledge 5,2". Some can be obtained by experimentation and trial and error which might require money. The knowledges might slowly diffuse and rate of diffusion increases with education institutions. Being employed at a job where somebody higher up is more knowledgable also diffuses knowledge. There is also a sink as older generations die without passing on their knowledge.


#5158640 Access violating reading 0x00000C44?

Posted by polyfrag on 06 June 2014 - 02:19 AM

It disappeared... I just added an output to the log after each frame to check on the text value of that member variable, and the error is gone. I think this compiler isn't perfect.

 

 

 

Another thought:  What is your m_part list a list of?

 

I was thinking something similar. Can we see the RichText class definition?

 

class RichText
{
public:
	list<RichTextP> m_part;
	string rawstr() const;
	int texlen() const;	//each icon counts as 1
	int rawlen() const;	//icon tags are counted
	RichText pwver() const;	//asterisk-mask password string
	RichText();
	RichText(const RichTextP& part);
	RichText(const RichText& original);
	RichText(const char* cstr);
	RichText& operator=(const RichText &original);
	RichText operator+(const RichText &other);
	RichText substr(int start, int length) const;
	//RichText parsetags(int* caret) const;
};



#5141599 Multithreaded drawing and logic

Posted by polyfrag on 23 March 2014 - 10:01 PM

I've decided that there's too many problems with multithreading, so I'm going back to single-threading. Mutex locks everywhere, not knowing if I might be missing one somewhere...




#5121833 Binary heap vs list A* - my humble performance comparison [updated with JPS]

Posted by polyfrag on 07 January 2014 - 12:33 AM

What if you combine it with jump point search?


#5113613 STL list memory leak?

Posted by polyfrag on 01 December 2013 - 07:43 PM

You are correct.




#5110362 Streaming turn-based strategy

Posted by polyfrag on 18 November 2013 - 08:15 PM

I need quick download times and can't have the whole game world downloaded each time players log in. It's a mobile game.




PARTNERS