1 (edited by Skylar 05-Nov-2009 02:56:38)

Topic: ICSimulator

I'm working on a simulator if anyone wants to watch the progress checkout http://icsim.99k.org/
It's nowhere close to complete but it's coming along.

Suggestions appreciated but just realize that this program is extremely sophisticated and may not work in all browsers.
It works for me in the most current versions of Firefox, IE and Chrome.
IE ABSOLUTELY SUCKS with javascript so get firefox or chrome if your computer can't handle it.

If you see an error 1. realize that I am changing the program constantly (so reload and u might find the error fixed itself tongue) and 2. let me know what the error is in detail big_smile

And just in case, NO I will not make a static version of this program. The only reason I really created it in the first place was for fun and to challenge my programming abilities. Right now it is 100% ajax driven and based on my personal creation NexusWindows. None of the code of which I plan on giving away so PLEASE don't steal my code <3 thankyou smile

When you come to the page you'll be seeing the inside of the site where the magic will happen. In the future I will make it so that you can create an account and build custom simulations of your own. But for now I'm still working on the "magic" lol. The buttons and textbox on the bottom right are for debugging so ignore them. You can click the buttons if u want. The first one adds some predefined planets and the second one changes how much gc the simulation has. As of right now the only thing that works is the planets and planet view as well as the planet view tabs.

I'm trying to figure out a way to calculate how many buildings you can build based on your current resources but I don't have the overbuilding formula nor do I have any idea how to use it to calculate the amount of buildings you can build when overbuilding xD ---- NOR do I have an empire with enough resources (in-game) to test out any formula xD So help me out if u can!

Otherwise Open to Suggestions!

Psycho-Simple  says: sky/did you do some programming for stefan lately/coz IC is now *ed

Re: ICSimulator

well move this to strategy:P

otherwise this is awesome! (i'm assuming. i remember the old tool and that was awesome so..)

I will check it out in the next hour or so though

Never attribute to malice that which is adequately explained by stupidity.

Re: ICSimulator

I didn't know where to put it so it went in general xD lol

Psycho-Simple  says: sky/did you do some programming for stefan lately/coz IC is now *ed

Re: ICSimulator

I cannot leave planets page and I cannot advance a tick


you go directly to jail. Do not pass go. Do not collect $200. Kthxbaigodie! tongue


no, once the kinks are out I think it will be very handy for most families (or maybe just the smart people like Smartys, Einstein, Brandon, Deci and thirdrock)

Insane Lemming of Drama Queens and Other Hyperbolical People

1431 ftw

Re: ICSimulator

kewl yikes

till the end of time..

Re: ICSimulator

[moved ---> Strategy]

<KT|Away> I am the Trump of IC

Re: ICSimulator

Nice work mate! I look forward to its completion!

Your = possessive. As in, "your grammar sucks."
You're = you are. As in, "you're an idiot for not knowing the difference."

Re: ICSimulator

Yeh, nice work!

Killbox ~ [url=http://gamma.astroempires.com/profile.aspx?player=23753][

Re: ICSimulator

Nice job, keep up the good work...can't wait to see the final version (working)

Money can't buy you friends, But it can get you a better class of Enemies!

Re: ICSimulator

Thanks for the replies so far! smile

Psycho-Simple  says: sky/did you do some programming for stefan lately/coz IC is now *ed

Re: ICSimulator

Headquarters works now woot tongue
I also completely reengineered the backend to use xml so creating new windows will be easier big_smile

Psycho-Simple  says: sky/did you do some programming for stefan lately/coz IC is now *ed

Re: ICSimulator

no srsly remake ic for us

<parrot> there is also the odd  possibility that tryme is an idiot
<KT> possibility?
<genesis> tryme is a bit of an idiot
<Torqez> bit?

Re: ICSimulator

Lol why should I do that? I don't even know the inner structure of the game is setup or how it works xD

Psycho-Simple  says: sky/did you do some programming for stefan lately/coz IC is now *ed

Re: ICSimulator

Woa, this is cool big_smile

It's the Simulator redesigned big_smile

Also Skylar, not much different the real game is to your simulator once it's working tongue

Re: ICSimulator

What do u mean?

Psycho-Simple  says: sky/did you do some programming for stefan lately/coz IC is now *ed

Re: ICSimulator

Torqez clearly hasn't done any programming if he thinks their not that different tongue

Re: ICSimulator

Firstly, I havn't done much programming, no -_-

Secondly, I recall the other simulator being pretty close to the game - just with manual ticking or something.  Just get it to auto tick! tongue

Re: ICSimulator

How did you get your programming skills to the level they are at now?

#3407

Re: ICSimulator

Sorry i disappear ever so often lol.
I am 100% self taught. I started doing simple tools for ic actually with very basic javascript. Then I learned perl and moved on to php.
I've been working with php and mysql for about 5 years now and over the last year I taught myself ajax (Advanced Javascript - Facebook and Gmail use the concept)

The major difference between my simulator and the real game is that there is no interaction between anybody tongue You are the only person that exists in your simulation.
The simulations that people run with my program could be far far far different than the actual outcome of their imperial conflict counterpart, but on the other hand it can give you a really good idea about the possibilities that might arise if you choose a specific strategy. It's more like a visual spreadsheet without all the confusion xD
Though the more ticks you simulate the more likely it is that it wont match your real life game due to the great randomness of play tongue The simulator is best used to estimate the best possible strategy to start your round with, probably most useful for bankers than anything else but who knows people have imaginations xD

Psycho-Simple  says: sky/did you do some programming for stefan lately/coz IC is now *ed

Re: ICSimulator

I just came ....... thiiisssssss close to completely removing compatibility of this program with internet explorer lol. Then I found the error and it was my fault xD
It's a good thing that firefox is programmer-friendly but sometimes it's a good thing ie gives me errors big_smile (I guess)

Sorry ya'll haven't seen anything updated on the web (if anyone's even keeping track lol) I've been working on the backend of the site and coordinating two databases would have been a nightmare with all the changes I make to the structure of the program constantly. But so far I've gotten the login/registration windows completed as well as a simulation view/create and custom race view/create windows as well.

My pseudo-list of things to complete include:
Create a window structure for all of the menus (fleet/market/special ops/history etc.)
Design the structure of and script all of the actions that you can do within each window (eg. place bids on the market, build things on planets etc)
Redesign/design a structure to how my onclick functions are organized (They are sort of all over the place right now lol)
Script a tick mechanism. (This part is going to require a lot of testing in the future xD)
Integrate everything further (Reduce style elements and move them into a css file, I hope to reduce some of the static data required for the browser if possible)


For the most part the entire site is almost a java-scripted copy of imperial conflict. I've included all spells and special ops and all units are included, as well as all research areas. Most of these things people wont make use of at all but it allows me to extend icsim if I want to in the future. This means it might be able to simulate attacks or spell cast outcomes to a small degree.

I have a question though about something I'm unsure of.
Racial Bonus Multipliers are calculated like this right?
-30% = 1/1.3 ~ 0.7692307692307692
-20% = 1/1.2 ~ 0.8333333333333333
-10% = 1/1.1 ~ 0.9090909090909091
0% = 1;
10% = 1.1
20% = 1.2
30% = 1.3
40% = 1.4
50% = 1.5


So if my Race's Income Bonus was -20% the income formula would be (gc_income) * 0.8333 right?

If anyone has any formula's that aren't listed in the IC Faq please leave me a comment!

Thanks smile

Psycho-Simple  says: sky/did you do some programming for stefan lately/coz IC is now *ed

Re: ICSimulator

i woudl think it was -30% = *0,7 but

LORD HELP OREGON

Re: ICSimulator

According to FAQ Guide:

Question: How do I earn money?
Answer: Theres a nice formula for income that goes like this:
Income = (100+ (pop/30) + (CashFactories * 8)) * (1+RaceBonus/100%) * (1+(2 * TaxOffices/(TotalBuildings + 1))) * (1+ EconomyScience%/100%)

The currency in Imperial Conflict is gc, short for gold coin. As you can see from the above formula, there are two main ways to get gc, through population and through cash producing buildings appropriately called cash factories. In addition, a few other factors can raise your income.
Lets focus on the income sources first.

Population Every planet has a base population and every Living Quarter (LQ) adds to this max. For a more detailed explanation about population see section - How does population work?.

Every 30 people give you 1gc as an income.
So every 500 population (=1LQ) ensures you 16,67gc income. 
Cash Factories (CFs) Every cash factory gives you a base income of 8gc.


Now the different factors that enhance your income:

Race Bonus (1+RaceBonus/100%)
This means that with a 50% income bonus you can multiply your base income with 1,5 (1+ 50/100)
A -30% income bonus means you should multiply with 0,7 (1+ -30/100).

Tax Offices (1+(2*TaxOffices/TotalBuildings + 1))
Every 1% of TO's you have in regard to your total amount of buildings gives you a bonus of 2% (add one to your total number of buildings).
For more information see section - How do Tax Offices work?

Science (1+EconomyScience%/100%)
You can invest in economy research. This will give you a certain research percentage.
Lets say you get 50% economy science.
Then you can multiply your base income with 1,5 (1+ 50/100)
With 20% economy science this means multiply with 1,2 (1+ 20/100).

'Success! The realm of Genesis has been reduced to dust! Our forces are leaving the planet though, as it is scheduled for demolition to make way for a new hyperspace bypass.'

Re: ICSimulator

(1+RaceBonus/100%)

Based on the formula i'd agree with Noir about the -30% = .7
1+(-30/100) = 1-.3 = .7

2011 IC League Fantasy Football Champion
2012 IC League Fantasy Football Runner Up
2013 IC League Fantasy Football Champion

http://www.ic-wiki.com/index.php?title=Gondor

Re: ICSimulator

Ahh cool thanks smile

The 1/1.x formula I think is used somewhere else cause I know I remember using the concept somewhere. I think it had to do with building costs or something xD


Doh! Now I'm going to have to redo the standard races in the database lol. Rawr.

Psycho-Simple  says: sky/did you do some programming for stefan lately/coz IC is now *ed

Re: ICSimulator

the 1/1.x formula is used for construction science skylar

Price after bonus = Price before fonus * 1/(1+construction science)

so now you know wink

LORD HELP OREGON