Sign in to follow this  

[web] Considering different languages

This topic is 4194 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've written a text-based RPG game in PHP but I find the fighting engine to be a bit to boring. As of now the player selects the monster he/she wants to fight and a script calculates if he/she wins or not. No user interaction. I want the user to be able to choose which abilities to use when he/she wants to, and not to have the script "do the thinking" for him/her. I've come up with a few criterias for the language: 1. I need to be able to control when and where the player calls a function and I don't want it to be open-source, so any Browser-side scripting language is out of the question. 2. The language needs to be either able to communicate directly with a database or be able to read from files and write to files. No Java Applets. 3. I don't want to reload the entire page everytime the player triggers an ability, so server-side languages won't work either. Personally I'm considering Flash / Python. Do you have any suggestions?

Share this post


Link to post
Share on other sites
Well if client-side scripting languages and server-side scripting languages are out of the question I can't really help [grin]

Your best bet is to use a combination javascript on the client side and Ruby or something on the server side.

Share this post


Link to post
Share on other sites
After reading your post, AJAX was the only thing that came to my mind. Then the client could trigger server side scripts I guess.

Share this post


Link to post
Share on other sites
Yeah, I thought about AJAX too. But I don't really know how to access variables not in a database. I use quite alot of variables so sending them with POST/GET would just be messy. I guess I could save them into a temporary database table though...

Share this post


Link to post
Share on other sites
Quote:
I need to be able to control when and where the player calls a function and I don't want it to be open-source, so any Browser-side scripting language is out of the question.
Quote:
2. The language needs to be either able to communicate directly with a database or be able to read from files and write to files. No Java Applets.
Quote:
Personally I'm considering Flash / Python.

How does Flash/Python fit your criteria any better than Java/Python? (For that matter, how does */* fit your criteria at all since you said server-side code was out.) I hope you realize how you are contradicting yourself.

Quote:
But I don't really know how to access variables not in a database. I use quite alot of variables so sending them with POST/GET would just be messy. I guess I could save them into a temporary database table though...

I have no idea what you mean by that first sentence. As for the second, POST/GET are pretty much your only options for communication for a web-based game.

Share this post


Link to post
Share on other sites
Quote:
Original post by igni ferroque
How does Flash/Python fit your criteria any better than Java/Python? (For that matter, how does */* fit your criteria at all since you said server-side code was out.) I hope you realize how you are contradicting yourself.


By '/' I didn't mean 'and', I meant 'or'. I guess I was unclear, sorry bout that.

Quote:
I have no idea what you mean by that first sentence. As for the second, POST/GET are pretty much your only options for communication for a web-based game.


I was thinking out loud, what I really meant was that I thought sending all my cross-script variables with POST/GET would be too messy.

But nvm, I got it working now with Flash.

Share this post


Link to post
Share on other sites

This topic is 4194 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this