Overclock.net banner

Help identifying lanuage used.

694 Views 12 Replies 7 Participants Last post by  Kirmie
I am looking screw around and make something similar to MafiaWars on Facebook and I was just wondering what you think it was coded in?

Is it PHP + MySQL? For some reason I don't think it is, but prove me wrong.

If you've never played MafiaWars, it's like this:

You start with energy and do jobs...doing jobs gives you money. Every few minutes your energy is increased, allowing you to do more jobs if the amount of energy you build up allows it.

Ideas?

*edit*

The main thing I want to figure out is the adding energy every 'x' minutes. Is that something you can do with MySQL or PHP or is there something else going on in the background?
1 - 13 of 13 Posts
Or neither, considering it's a Facebook plugin.

You should just look up what Facebook plugins are written in, instead of asking here... that seems to be the obvious course of action...
  • Rep+
Reactions: 1
I don't necessarily want to do it for Facebook, so I guess I want to ask what the best way to do it as a standalone website would be.
the best way to do this would depend on the platform you use on the server... for most configurations PHP/Mysql would be the best bet, though writing a server in C is also possible for example... just a tad more complicated
See less See more
  • Rep+
Reactions: 1
let me know if you need help to get started on something like this, i don't mind helping out if i have time
  • Rep+
Reactions: 1
Quote:

Originally Posted by DanC View Post
The main thing I want to figure out is the adding energy every 'x' minutes. Is that something you can do with MySQL or PHP or is there something else going on in the background?
there are a few ways to do it. The best way i can think of, is checking every time the page is accessed how much time has passed since the last access, and adjust the values then. Unless you write your own server, I don't see how you could do this in the background at all.
See less See more
  • Rep+
Reactions: 1
+REP for everyone's input, thanks!
PHP is probably the easiest to pick up from scratch. It was my first language. You probably won't grasp (or even need to use) stuff like object-oriented programming, but it has that too. It's a good introduction to programming because it takes care of data types and stuff for you.

For example, to add two whole numbers in Java would be (very similar in other languages like C++):

Code:
Code:
[CODE]
public static int add(int a, int b) {
return a+b;
}
[/CODE]
Whereas in PHP it's only:

Code:
Code:
[CODE]
function add($a, $b) {
return $a+$b;
}
[/CODE]
See less See more
For anything remotely complicated you'll likely want to use an object oriented language, it helps keep everything neat.
2
But according to your post they're both php COMA


(fix itt
)
See less See more
No, that's just the vB tag. The
Code:
 tag doesn't do highlighting, so I used [php] for both.

For starters you need to learn the basic stuff, forget objects for now. Check the tizag.com PHP tutorial to get started.
  • Rep+
Reactions: 1
I'ld say start out easy and make a Java Applet (or whatever the web start stuff is, been too long) and connect that to some sort of OOP language that controls your database and connections. You could then have the Java check for updated numbers periodically or, less likely, push the changes.

Or have some sort of super fun PHP, AJAX, MySQL program creation party.
  • Rep+
Reactions: 1
1 - 13 of 13 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top