Jump to content

Mercenary

Member
  • Content count

    1,403
  • Joined

  • Last visited

About Mercenary

  • Rank
    Knowledge is just a word
  • Birthday 05/03/1993
  1. [quote name='whackatre']If the server administrator can't bother using SSH to manage his or her server (I'm sure there's a client for the iOS) then I would assume he is either a lazy fuck or incompetent (or in other words, unsuitable to run a server). For convenience purposes which are used occasionally, yes. I think your idea of a frontend might be useful for certain individuals. A few questions you should consider: - Design: what approach will you use? I'm assuming you're going to make this compatible with as many server bases as you can, so what design pattern(s) will you use to make it less tedious for people to integrate? - Practicality: are people actually going to use this? Balance between that and user-friendliness? If you always can't be fucked, my idea is using an IRC bot that serves as a gateway between the game server and the VPS. Security's always a massive issue to consider, though (this goes for all approaches already, but I think you already know that).[/QUOTE] The security should be enough with a password which can only be changed in the server files. The design would be simple, but efficient. It would give you options which you would have if you created a GUI for your server, for example. If I create a class for the program which will have to be put in the source, people would just have to replace certain things, or enable and disable things in order for it to work on their source, I would be taking requests for certain features too. [quote name='Nighthawk123']From description it sounds very helpful for when something needs to be done when I am unable to get on computer, however, would we have all tools to do stuff on server on mobile as on a computer?[/QUOTE] As much as would be possible to handle. [quote name='Steve']Why wouldn't apple approve this?[/QUOTE] I've read a lot, and came to the conclusion that Apple doesn't approve directly, the only way, I think, to get Apple to approve this is to submit it as an app for a company.
  2. Hello there So I'm guessing that most likely, people would like to create a game with Java. This isn't the easiest of things to, so I'll introduce you to JLWGL and Slick. This library is short for Java Light Weight Gaming Library. These are simple but very powerful libraries. You can get them here: [url]http://www.lwjgl.org/[/url] [url]http://www.slick2d.org/[/url] LWJGL is also used in Minecraft, as an example of what you can do with it. You use the library by adding it to your Eclipse (Or your IDE) resources. In Eclipse you do it like this: You rightclick your project folder, and select properties. You then proceed to click Java Build Path. In Libraries, you click add external Jar and browse to lwjgl_util.jar and lwjgl.jar. You'll also import slick.jar and slick-util.jar And you're done. Now, there's lots of tutorials on the sites of the libraries themselves, but they can be a little confusing for beginners. I have made a main class for you to use, [code] import org.newdawn.slick.*; import org.newdawn.slick.state.*; public class Game extends StateBasedGame { public static final String gameName = "Java Game"; public static final int menu = 0; public static final int play = 1; public static final int xsize = 1280; public static final int ysize = 720; public static AppGameContainer frame; public Game(String gameName) { super(gameName); this.addState(new Menu(menu)); this.addState(new Play(play)); } public static void main(String[] args) { try { frame = new AppGameContainer(new Game(gameName)); frame.setDisplayMode(xsize, ysize, false); frame.setVSync(true); frame.setResizable(false); frame.setIcons(new String[] {"res/icon32.png", "res/icon32.png", "res/icon16.png"} ); frame.setShowFPS(false); frame.start(); } catch(SlickException e) { e.printStackTrace(); } } public void initStatesList(GameContainer gc) throws SlickException { this.getState(menu).init(gc, this); this.getState(play).init(gc, this); this.enterState(menu); } } [/code] (Conventions are gone due to the forums, sorry) The icons lead to the project folder, in a folder names res, it'll look for the same names, the numbers in it stand for how big they are (32x32 or 16x16). Let's perform an autopsy on the code I made: [code] public class Game extends StateBasedGame { [/code] This extends StateBasedGame so we can use the states from the Slick library, this needs the imports above this code. [code] public static final String gameName = "Java Game"; public static final int menu = 0; public static final int play = 1; public static final int xsize = 1280; public static final int ysize = 720; public static AppGameContainer frame; [/code] gameName defines the name of our game, as it suggests. This String will be used when naming our frame. meny and play are ints to make it easier to see which gamestate we are going to, so when you see menu or play, it'll return that Integer. xsize and ysize define the size of our frame. public static AppGameContainer frame; this'll just tell our program to use an AppGameContainer whis we refer to as frame, that'll be our frame, of course. [code] public static void main(String[] args) { try { frame = new AppGameContainer(new Game(gameName)); frame.setDisplayMode(xsize, ysize, false); frame.setVSync(true); frame.setResizable(false); frame.setIcons(new String[] {"res/icon32.png", "res/icon32.png", "res/icon16.png"} ); frame.setShowFPS(false); frame.start(); } catch(SlickException e) { e.printStackTrace(); } } [/code] this is the first piece of code that gets called after initializing our variables, I surrounded this in a try/catch because if anything goes wrong, it'll be able to tell us what. frame = new AppGameContainer(new Game(gameName)); This tells the program that the frame we defined earlier, has to create a new appegamecontainer, which creates a new Game with our gameName. frame.setDisplayMode(xsize, ysize, false); This gives our frame a size, these sizes were defined earlier. The boolean stands for fullscreen or not. frame.setVSync(true); This isn't necessary, but useful. This will lock our frames per seconds to around 30, that's as much as the human eye should be able to see so it shouldn't matter, just increase performance. frame.setResizable(false); This explains itself, we won't be able to resize the window. frame.setIcons(new String[] {"res/icon32.png", "res/icon32.png", "res/icon16.png"} ); The default Icons would be Slick's icons, you can replace this by creating your own. frame.setShowFPS(false); This is also optional, it just hides our FPS. frame.start(); After setting everything we need up, it's time to start our frame up, without this, nothing would happen. [code] public Game(String gameName) { super(gameName); this.addState(new Menu(menu)); this.addState(new Play(play)); } [/code] this is called in the first line of our main, change Game to whatever your file is called, that's why it does not have void, string, integer, boolean or anything. super(gameName); this has to be there, otherwise you'll get an error that the super constructor is undefined. (Names our game) this.addState(new Menu(menu)); this.addState(new Play(play)); This adds 2 states of our game, the menu, and the play state. This NEEDS a class named Menu and a class named Play in this case. notice how menu and play are here, this refers to the integers we defined earlier. [code] public void initStatesList(GameContainer gc) throws SlickException { this.getState(menu).init(gc, this); this.getState(play).init(gc, this); this.enterState(menu); }[/code] This, as it says, inits our states and assigns it to the gamecontainer. So once again, our integers menu and play are called. this makes the game aware that these states are there and loads them. this.enterState(menu); this will get us directly to the menu state (0). Creating a state class [code] public class Menu extends BasicGameState { Image play; Image exit; public String mouse; public Menu(int state) { } @Override public void init(GameContainer gc, StateBasedGame sbg) throws SlickException { play = new Image("res/menu/playNow.PNG"); exit = new Image("res/menu/exitGame.PNG"); } @Override public void render(GameContainer gc, StateBasedGame sbg, Graphics g) throws SlickException { g.drawString("Java Game", 560, 50); play.draw(495, 100); exit.draw(495, 170); g.drawString("Mouse coordinates: " + mouse, 50, 62); } @Override public void update(GameContainer gc, StateBasedGame sbg, int delta) throws SlickException { Input input = gc.getInput(); int xpos = input.getMouseX(); int ypos = input.getMouseY(); if(!Mouse.isInsideWindow()) { mouse = "No input"; } else { mouse = "x: " + xpos + ", y: " + ypos; } if((xpos > 495 && xpos < 705) && (ypos > 100 && ypos < 150)) { if(input.isMouseButtonDown(0)) { sbg.enterState(1); } } if((xpos > 495 && xpos < 705) && (ypos > 170 && ypos < 220)) { if(input.isMouseButtonDown(0)) { System.exit(0); } } } @Override public int getID() { return 0; } }[/code] This is a basic state, which we called Menu in our Game class. [code] public class Menu extends BasicGameState { [/code] This extends the BasicGameState so we can use things from that class. [code] Image play; Image exit; public String mouse; [/code] the first 2 are images. The third line will be used to determine our mouse's coordinates on the screen. (Will come in handy to place images). [code] public Menu(int state) { } [/code] This is necessary to tell our game class, that the Menu state is located here. [code] @Override public void init(GameContainer gc, StateBasedGame sbg) throws SlickException { play = new Image("res/menu/playNow.PNG"); exit = new Image("res/menu/exitGame.PNG"); } [/code] this loads our images. The images I used are here: [img]http://i.imgur.com/jXmbDHZ.png[/img] [img]http://i.imgur.com/EwIWXAc.png[/img] [code] public void render(GameContainer gc, StateBasedGame sbg, Graphics g) throws SlickException { [/code] this creates a constant loop to update the graphics. [code] g.drawString("Java Game", 560, 50); play.draw(495, 100); exit.draw(495, 170); g.drawString("Mouse coordinates: " + mouse, 50, 62); [/code] The first line draws the text "Java Game" onto our screen at the coordinates 560;50. The next two lines draw our images, which we defined in the init. The next one displays our mouse String. [code] public void update(GameContainer gc, StateBasedGame sbg, int delta) throws SlickException { [/code] this also creates a loop, but behind the scenes. This will update code that won't directly be drawn on the screen. [code] if(!Mouse.isInsideWindow()) { mouse = "No input"; } else { mouse = "x: " + xpos + ", y: " + ypos; } [/code] This updates our mouse string to our mouse's coordinates. [code] if((xpos > 495 && xpos < 705) && (ypos > 100 && ypos < 150)) { if(input.isMouseButtonDown(0)) { sbg.enterState(1); } } if((xpos > 495 && xpos < 705) && (ypos > 170 && ypos < 220)) { if(input.isMouseButtonDown(0)) { System.exit(0); } } [/code] If you click within these coordinates, the code in the if statement gets executed, on our play, it goes to state 1 (which is play) on the exit, it'll stop the program. [code]public int getID() { return 0; }[/code] this is VERY important, it returns which ID this state has, so other states can refer to it. I won't cover the play state since it uses the exact same things as our Menu state. I hope you learned from this :) Credits; JLWGL Slick2D I, for writing this tutorial. (Also known as Worldofwar or Chaosdevil)
  3. Hello! I haven't been active in the RSPS community in quite a while, since I lost interest. I do however, still am very interested in programming in general. I have recently been creating a few apps for my iPod for fun, they turned out pretty good. I do think I am able to create an application that would be able to remotely perform actions on your private server. I'll need to create some java files for your server and a connection on the application that would be able to execute commands. You would be able to connect to the IP where the server is hosted, and the password which would be configured in the java files in your server. My question to the community is, would you like to see something like this? It would require a lot of work, and I don't really want to spend lots of time on something that won't be used. Another thing I have to note is that for iOS (I haven't looked into Android yet), you'd need to have a jailbroken device. The reason for this is that I don't think that Apple would approve an application like that. (I also don't want to pay the 99$ fee) So, what do you think? Vote on the poll on the thread please. [COLOR="#FF0000"]TL;DR[/COLOR]: App to manage your server from iPod/iPhone/iPad? Yes/No? Greetings, Mercenary.
  4. Looks like Jagex' profits will skyrocket if it's a 15$ additional fee.
  5. [quote name='PlayWorld Mod']what you mean by base stolen by you?[/QUOTE] Because I made the quest, that Helga is in, and only xlite and my source has it. So you must be Dylan or someone he sold my base to or whatever --'
  6. It's a 'meh' in my opinion, lots of features were already in the base you downloaded.
  7. [quote name='pyrepk']dont really want someone hosting my server besides me.[/QUOTE] Good move. You'd end up like me if you trust too much people, spend weeks, months on development, and build a community from the ground up, then suddenly bam co-owner steals the source and makes thousands of dollars (donations) out of something he didn't work on.
  8. [quote name='pyrepk']thanks but i did ALL that. ports are open. exact ip in my client.java. i got my no-ip a wk ago. i have the no-ip duc.[/QUOTE] Odd, I really can't think of what could cause the problem.. Did you only try it yourself? Because I used to have to connect to 0.0.0.0 or 127.0.0.1 instead of the no-ip IP. If not, try using your real IP and let a friend try it, to see if it's no-ip issue or not.
  9. [quote name='pyrepk']thank you merc for once someone gives a straightforward answer and ive tried everything...i jus cant get it public. when i change my 127 ip to my no-ip it says connection timed out please choose a dif server. do you know how to fix that?[/QUOTE] It's been a while since I used no-ip, but here's what could be happening: 1) Your no-ip isn't up-to-date 2) Check [URL="http://canyouseeme.org/"]this[/URL] to make sure your port is open. 3) When in the no-ip client, make sure the IP is there, and it is checked. 4) Look through your firewall settings, this once was my problem too. 5) Doublecheck the IP in the client, it has to be the EXACT as the one in your no-ip client. I can't really think of anything else at the moment, it might be a problem on their end though, as some other people I noticed are getting the same problem.
  10. [quote name='Murilirum']Perhaps. I'd still LOVE to learn Objective C :)[/QUOTE] Nobody's going to stop you, I find that you shouldn't look at statistics or whatever, just do what you love. :D
  11. Mercenary

    Hypocritical?

    I guess most sane people share the same opinion.
  12. It's correct, Siles. A VPS hosts the server for you, and there shouldn't be any problems with portforwarding and no-ip. A VPS most likely has all required ports open, or you simply request them to open it. Depending who you're hosting with, it'll be fairly quickly (Unless it's a Dedi, which takes a little time to set-up too). No-ip isn't necessary since it's quite easy to ping a no-ip address and get the actual IP (Correct me if I'm wrong). I recommend getting a very cheap VPS to start off with if you really can't leave your computer on or can't fix the no-ip trouble. If you however can fix it, I suggest you try getting about 5 - 10+ people on at all times before getting yourself a VPS since it costs money. Unless, you can afford to spend money when it's unnecessary.
  13. Mercenary

    Hypocritical?

    I'd rather listen to fart noises than lil' wayne. Anyways, it's not hypocritical, as Muri said, that's just your opinion.
  14. I see you're still using the base you stole from me. At least be a man and give credits to people that dedicated a lot to this base such as DragonKK, Cjay, Tyler, Cody and me. Oh and unless you changed bases around september, it's impossible to be there since 2011.
  15. As was mentioned above, this is the downloads section, as in people releasing things. The advertisement section can be found [URL="http://www.runelocus.com/forums/forumdisplay.php?29-Advertisement-Area"]here[/URL]. I also suggest, before you post the same thread there, that you improve it. Nothing attracts anyone to this kind of thread, you'll have to put effort in it to get players to join your server. Also, I think Siles is probably correct, that this is a simple leech. You don't get a succesful server by just downloading a source and putting it online. You'll have to work on it, not just change a few names and a little code that doesn't matter here and there. I suggest you actually make it stand out, if you don't have enough Java knowledge, just goof around a little in the source before creating a server. Just observing is a big deal already, also try watching some youtube tutorials that cover the basics, such as thenewboston. If you're really stuck with something or have any questions about certain things such as development of the server or website, or advertising, feel free to shoot me a PM.
×