how to?
-
- Posts: 534
- Joined: Thu May 05, 2011 8:19 pm
how to?
Right, as you know (most of you)
Im building a game, and i ran into a little problem.
basically, ive started the game over 3 times, first it was to be done in PHP and Html.
didnt like it,
then it was flash and java (with Smartfoxserver)
That was too expensive. (£3500 per server just for smartfoxserver software! :/)
Now its most likely just java.
But, i need to know. how do i convert a php array into java?
I wrote a MASSIVE array, and it took me over 15 hours to code it (it was f**king tedious i tell you)
And i just hope to god there is an easy online conversion or anything and was hoping one of you guys can help me out?
Thanks so much
Note, ill upload the array soon for if anybodys interested?
Im building a game, and i ran into a little problem.
basically, ive started the game over 3 times, first it was to be done in PHP and Html.
didnt like it,
then it was flash and java (with Smartfoxserver)
That was too expensive. (£3500 per server just for smartfoxserver software! :/)
Now its most likely just java.
But, i need to know. how do i convert a php array into java?
I wrote a MASSIVE array, and it took me over 15 hours to code it (it was f**king tedious i tell you)
And i just hope to god there is an easy online conversion or anything and was hoping one of you guys can help me out?
Thanks so much
Note, ill upload the array soon for if anybodys interested?
I don't like to brag, but I wasn't circumcised. I was circumnavigated.
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
-
- Posts: 534
- Joined: Thu May 05, 2011 8:19 pm
Re: how to?
note: Thank god for backup drives.
I lost the original, and its over 4,000 lines long and not quite complete yet
I lost the original, and its over 4,000 lines long and not quite complete yet
I don't like to brag, but I wasn't circumcised. I was circumnavigated.
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Re: how to?
What does an array in java look like ? You could include the file with php and then use implode and write the result to a file.
-
- Posts: 534
- Joined: Thu May 05, 2011 8:19 pm
Re: how to?
well the arrays (annoyingly) have to be a certain datatype (eg. int or char) not a mixture like my php one is.
Also, you need a known length (i cant physically count how many data types i have)
Also, you need a known length (i cant physically count how many data types i have)
I don't like to brag, but I wasn't circumcised. I was circumnavigated.
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Re: how to?
php can work that out, is_int() is_bool() etcbowersbros wrote:well the arrays (annoyingly) have to be a certain datatype (eg. int or char) not a mixture like my php one is.
php can also work that out.bowersbros wrote:Also, you need a known length (i cant physically count how many data types i have)
and you still haven't said what they look like
-
- Posts: 534
- Joined: Thu May 05, 2011 8:19 pm
Re: how to?
int[] cost = new int[15];That creates an integer array named variable cost which is 15 fields long (goes up to cost[14])
same for any other type, eg.. double, char etc.
I don't like to brag, but I wasn't circumcised. I was circumnavigated.
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Re: how to?
Oh you cant have mixed type arrays ?
I guess you need to work out a way to split it up then.
I guess you need to work out a way to split it up then.
-
- Posts: 534
- Joined: Thu May 05, 2011 8:19 pm
Re: how to?
Oh joys.
I might either try to find a way to use php arrays with java, or just retype it all up again
I might either try to find a way to use php arrays with java, or just retype it all up again
I don't like to brag, but I wasn't circumcised. I was circumnavigated.
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Re: how to?
no.bowersbros wrote:use php arrays with java
not the best way.bowersbros wrote:just retype it all up again
When I said split it up, I mean is there some logical way the data types can be separated ? A php script can do that actual separating.
-
- Posts: 534
- Joined: Thu May 05, 2011 8:19 pm
Re: how to?
but then I would have several different arrays, im not looking for that.
Ill post my current one so you can see what it is like:
/edit.
Change of plan.
Apparently my message went 48,171 characters over phpbb limit
Ill find a way to paste it, one minute
/edit: http://pastebin.com/1jN78pua
Ill post my current one so you can see what it is like:
/edit.
Change of plan.
Apparently my message went 48,171 characters over phpbb limit
Ill find a way to paste it, one minute
/edit: http://pastebin.com/1jN78pua
I don't like to brag, but I wasn't circumcised. I was circumnavigated.
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
-
- Posts: 534
- Joined: Thu May 05, 2011 8:19 pm
Re: how to?
have doneTino wrote:Use pastebin or something?
I don't like to brag, but I wasn't circumcised. I was circumnavigated.
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Re: how to?
Java is an OO language, right? Isn't there some way to convert a PHP array to a Java object?
Please check out my CodeCanyon items.
-
- Posts: 534
- Joined: Thu May 05, 2011 8:19 pm
Re: how to?
thats what I was thinking, but i couldnt find anything on google.
I don't like to brag, but I wasn't circumcised. I was circumnavigated.
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Re: how to?
What does an object look like ?bowersbros wrote:thats what I was thinking, but i couldnt find anything on google.
You need to create the syntax with php and write it to a file.
-
- Posts: 534
- Joined: Thu May 05, 2011 8:19 pm
Re: how to?
What is the best way for a huge settings file? It will be called on almost every single page (if not all)
should i just make a huge database table so i only fetch what i ened insead of the entire file?
It will also allow multi datatypes
should i just make a huge database table so i only fetch what i ened insead of the entire file?
It will also allow multi datatypes
I don't like to brag, but I wasn't circumcised. I was circumnavigated.
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
-
- Posts: 534
- Joined: Thu May 05, 2011 8:19 pm
Re: how to?
Well.. they wont change alot. but they will change graduallyjacek wrote:If the settings change a lot that would be a good way to make them easy to update.
Any idea what fields i should have to set that up? or should i have 1 table for each type (buildings, troops, resource, capacity, etc.)
I don't like to brag, but I wasn't circumcised. I was circumnavigated.
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Re: how to?
It depends how the data will be used, you could do it like that, or have it all in one massive table.bowersbros wrote:Any idea what fields i should have to set that up? or should i have 1 table for each type (buildings, troops, resource, capacity, etc.)