Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Simple ORPG


unknown
 Share

Recommended Posts

  • 3 weeks later...
  • Replies 105
  • Created
  • Last Reply

Top Posters In This Topic

Hey I just made a pretty cool update. I embedded a jetty file server in the server.jar and built an updater in the client. To initiate an update all you have to do is modify a file on the server. You don't have to setup a separate web server for updating resources (such as graphics) it all just works magically when you modify files in the resources folder on the server.

![](http://i.imgur.com/QNrxH.png)

Also the client is down to one jar / JNLP. It no longer requires anything to run!
Link to comment
Share on other sites

  • 2 weeks later...
I added a couple more things today..

* Admin access defined in the database
* A few admin commands like /boot and /setname (login to my [test server](http://96.126.127.107/simpleorpg/client/simple-client.jnlp) & try them)
* Update server can be hosted on a different machine as defined in the client.properties
* Tested & confirmed working on a 32 bit image of Ubuntu, 64 bit Windows and 64 bit OSX

EDIT: Also your sprite is now set to either a bunny or penguin

[![](http://i.imgur.com/tuJbVl.png)](http://i.imgur.com/tuJbV.png)
Link to comment
Share on other sites

Thanks!

I've been working on the build/deploy process over the past week. I moved over to Maven, which allows me to easily create and deploy an executable that works on all systems. I'm currently creating a repository of Maven builds which should be done in a couple of days. I'm also working on documenting how to build everything (git repo ; mvn clean install) and looking into continuous integration.
Link to comment
Share on other sites

Relatively large update today.

* Build process is vastly improved. Checkout [my github](https://github.com/coxry/SimpleOrpg) for detailed build instructions.
* I added Jenkins continuous integration to my GitHub master branch
* Enemy spawn points can now be added in via tiled

![](http://i.imgur.com/FkLAh.png)

![](http://i.imgur.com/xngle.png)

Download the latest snapshot to test

[Server SNAPSHOT-1.0](http://96.126.127.107/simpleorpg/SimpleOrpg-Server-1.0-SNAPSHOT-release.zip)

[Client SNAPSHOT-1.0](http://96.126.127.107/simpleorpg/SimpleOrpg-Client-1.0-SNAPSHOT-release.zip)

*Note* To run the server/client click run.bat
Link to comment
Share on other sites

Thanks I'm looking forward to seeing what you make.

I'm going to start adding live editors into the client. Specifically enemy and map editors. When you type /edit map it will open the current map in tiled, when you save the map it will commit the update to the server & send an update to everyone else on the map. Maps will be saved in the database and cached on the client. Enemies aren't really completed, I'm going to add onto them (and combat) after I create the live editors.
Link to comment
Share on other sites

That will be awesome possum once its in. (wow, just noticed Eclipse auto changes "awe some" to "awe some possum" (without the spaces) lol)

I was having some issues at first whenever I went to make an account in the new version but that was due to me having missing/wrong libraries. It didn't have any red x's in the Java Eclipse IDE but it was giving errors whenever I tried to do it when the client/server where running. I just replaced all my old libs with the ones from built server file you uploaded and now its working fine. I like the auto updater also a lot and like that its built in and not something extra needed to be used.

One question, do you plan on having encrypted image files for the client in a later version or some sort of image files that can't be opened/reused by someone else from just taking all your image files from your game? I plan on using custom graphics once I actually make a game with this and don't want them to be easily stolen. (One of the things that kept me from using them with the eclipse engine)
Link to comment
Share on other sites

I'm not planning on adding encrypted image files in the client. Simple ORPG will remain open source (your engine doesn't have to be). If Simple ORPG encrypts graphics it also has to decrypt graphics meaning everyone who wants to steal your graphics will know how the decryption algorithm works and can brute force the key.
Link to comment
Share on other sites

Even when encrypted, any genius can take a screenshot and edit that to get your graphics. ;]

Anyway, nice work. ![:o](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/ohmy.png) It looks much better since I last looked at this thread.
Link to comment
Share on other sites

Was bored today so I decided to play around a little with the java engine. I added back in WASD movement (although I screwed it up twice this time at first lol) and added in a little admin panel. The admin panel right now only has three buttons. One to change your name, one to boot a player and another to close the panel again (The panel also hides if you use Tab just like the chat) or you can.

When you click on the Set Name or Boot button, a little popup comes in the top left corner of your game screen and your input changes to that box instead of the chat/ You can then type your new name or the name of the player to boot and if you click the send button it sends the command just like if you typed /setname or /boot and then it removes the popup box and changes your input back to the normal chat. There is also a cancel button with the popup box which changed back your input and closes out of the popup.

You can open the panel by typing /admin (if you are admin rank) and you can close it by either clicking on the close button or typing /admin again.

Right now admin ranks don't seem to save with the server and I haven't bothered looking into the way accounts are saved yet so I just have it setup to make you admin rank if you type /admin and are not already one.

![](http://i50.tinypic.com/33lmbdi.png)

This is what the admin panel looks like right now and the little popup box for booting someone or changing your name. Nothing fancy, it 's only using text and engine colors right now, no images.
Link to comment
Share on other sites

> Looking good, are you planning on doing anything with this in the long run?
>
> What are your goals?

I dont know what unknown's goals are with the Simple ORPG engine/code but I plan on making a real game and when I do, I'll prob release my version of the engine also since it will pretty much be unknown's engine but with extra features/systems I add for my game.

I had a game running that was made all in C++ for a couple of months, the engine was fully custom and parts of it where done by real 10 year+ professional's in game development. The problem with the version I have of it is the account system is complete bum candy (the game seems to make 2 copies of itself and switch between different versions every time the server crashes) and the code for the editor's was lost/destroyed.

I'd much rather remake it in Java since I like Java coding more and Java is a whole lot better for cross-compatibility. So as long as unknown keeps updating/working on the Simple ORPG engine I'll keep playing around with features/systems on my end and releasing them also.
Link to comment
Share on other sites

> Was bored today so I decided to play around a little with the java engine. I added back in WASD movement (although I screwed it up twice this time at first lol) and added in a little admin panel. The admin panel right now only has three buttons. One to change your name, one to boot a player and another to close the panel again (The panel also hides if you use Tab just like the chat) or you can.
>
> When you click on the Set Name or Boot button, a little popup comes in the top left corner of your game screen and your input changes to that box instead of the chat/ You can then type your new name or the name of the player to boot and if you click the send button it sends the command just like if you typed /setname or /boot and then it removes the popup box and changes your input back to the normal chat. There is also a cancel button with the popup box which changed back your input and closes out of the popup.
>
> You can open the panel by typing /admin (if you are admin rank) and you can close it by either clicking on the close button or typing /admin again.
>
> Right now admin ranks don't seem to save with the server and I haven't bothered looking into the way accounts are saved yet so I just have it setup to make you admin rank if you type /admin and are not already one.
>
> ![](http://i50.tinypic.com/33lmbdi.png)
>
> This is what the admin panel looks like right now and the little popup box for booting someone or changing your name. Nothing fancy, it 's only using text and engine colors right now, no images.


Nice! By default SimpleORPG uses a H2 database so to update anything in the database (including admin status) [Download H2](http://www.h2database.com/html/main.html), run it and set the connection string to your SimpleORPG database.

> Looking good, are you planning on doing anything with this in the long run?
>
> What are your goals?

I'm planning on adding a lot more while keeping the code simple to read. Here's a list of my immediate goals

* Attack system
* Basic player and enemy stats
* Bigger scrolling maps
* Live updates (update the game as the game is running)
* Particle system
* Lighting effects
* Scripting system

I'm currently doing some legwork for live updates by moving maps into the database and allowing them to be updated based on their version compared to the client. I'm also building in some simple editors for enemies which is easier than editing directly from the database.
Link to comment
Share on other sites

It looks like the data base code is not setup to save the admin level. It saves everything else fine for me but when I looked at the Database.java file I noticed in the insertPlayer and UpdatePlayer booleans there is no part that has to do with the admin level, only the public ArrayList selectPlayers has something with the admin level in it.

I tried fixing the insertPlayer and UpdatePlayer parts to include the admin saving portion but then I got errors any time I tried to create a new account. So I dunno how to fix that so it saves the admin status.

Also somehow in my nubbiness I lost all the source to the admin panel I created. I guess I didn't save before I closed out of Eclipse lol. Its kind of a good thing though because I was learning the code as I went and know how to make it a lot cleaner, so I'll remake that later.

Today I played around with adding /waprto , /warpmeto and /warptome commands to the game like the normal Eclipse engines have.

Code below…

>! In MessageHandler.java Replace```
if (id.equals("MOVE")) {
>! return new MoveHandler(payload);
>! }
```with```
if (id.equals("MOVE") || id.equals("WARP_TO") || id.equals("WARP_ME_TO") || id.equals("WARP_TO_ME")) {
>! return new MoveHandler(payload);
>! }
```
>! Then open MoveHandler.java and replace```
>! Player yourPlayer = players.get(socket);
>! int newX = yourPlayer.getX(), newY = yourPlayer.getY();
>! if (payload.equals("UP")) {
>! newY -= 1;
>! } else if (payload.equals("DOWN")) {
>! newY += 1;
>! } else if (payload.equals("LEFT")) {
>! newX -= 1;
>! } else if (payload.equals("RIGHT")) {
>! newX += 1;
>! }
>! ```
with```
>! Player yourPlayer = players.get(socket);
>! int newX = yourPlayer.getX(), newY = yourPlayer.getY();
>! String message = "";
>! String type = "";
>! if (payload.contains(",")) {
>! type = payload.split(",")[0].toUpperCase();
>! if (payload.indexOf(",")+1 < payload.length()) {
>! message = payload.substring(payload.indexOf(",")+1);
>! }
>! }
>! if (payload.equals("UP")) {
>! newY -= 1;
>! } else if (payload.equals("DOWN")) {
>! newY += 1;
>! } else if (payload.equals("LEFT")) {
>! newX -= 1;
>! } else if (payload.equals("RIGHT")) {
>! newX += 1;
>! } else if (type.equals("WARP_TO")) {
>! if (yourPlayer.getAdmin() > 0) {
>! int warpX = yourPlayer.getX(); int warpY = yourPlayer.getY(); String warpMap = message;
>! warpPlayer(socket, warpMap, warpX, warpY);
>! } else {
>! String errorMessage = "CHAT:BROADCAST,#FF0000,Invalid admin access!";
>! sendTo(socket,errorMessage);
>! }
>! } else if (type.equals("WARP_ME_TO")) {
>! if (yourPlayer.getAdmin() > 0) {
>! if (validation.validPlayer(message)) {
>! for (Socket sock : players.keySet()) {
>! Player player = players.get(sock);
>! if (player.getName().equals(message)) {
>! int warpX = player.getX(); int warpY = player.getY(); String warpMap = player.getMapRef();
>! warpPlayer(socket, warpMap, warpX, warpY);
>! }
>! }
>! }
>! } else {
>! String errorMessage = "CHAT:BROADCAST,#FF0000,Invalid admin access";
>! sendTo(socket,errorMessage);
>! }
>! } else if (type.equals("WARP_TO_ME")) {
>! if (yourPlayer.getAdmin() > 0) {
>! if (validation.validPlayer(message)) {
>! for (Socket sock : players.keySet()) {
>! Player player = players.get(sock);
>! if (player.getName().equals(message)) {
>! int warpX = yourPlayer.getX(); int warpY = yourPlayer.getY(); String warpMap = yourPlayer.getMapRef();
>! warpPlayer(sock, warpMap, warpX, warpY);
>! }
>! }
>! }
>! } else {
>! String errorMessage = "CHAT:BROADCAST,#FF0000,Invalid admin access";
>! sendTo(socket,errorMessage);
>! }
>! }
>! ```
Now go to InputSystem.java and below```
// setname
>! } else if (cmd.equals("SETNAME")) {
>! String name = cmdMsg;
>! if (validation.validPlayer(name)) {
>! sendMessages.add("SET_NAME:" + name);
>! }

```add```
// warpto
>! } else if (cmd.equals("WARPTO")) {
>! String msg = cmdMsg;
>! if (msg.length() > 0) {
>! sendMessages.add("MOVE:WARP_TO," + msg);
>! }
>! // warpmeto
>! } else if (cmd.equals("WARPMETO")) {
>! String msg = cmdMsg;
>! if (msg.length() > 0) {
>! sendMessages.add("MOVE:WARP_ME_TO," + msg);
>! }
>! // warptome
>! } else if (cmd.equals("WARPTOME")) {
>! String msg = cmdMsg;
>! if (msg.length() > 0) {
>! sendMessages.add("MOVE:WARP_TO_ME," + msg);
>! }

```
Link to comment
Share on other sites

> It looks like the data base code is not setup to save the admin level. It saves everything else fine for me but when I looked at the Database.java file I noticed in the insertPlayer and UpdatePlayer booleans there is no part that has to do with the admin level, only the public ArrayList selectPlayers has something with the admin level in it.
>
> I tried fixing the insertPlayer and UpdatePlayer parts to include the admin saving portion but then I got errors any time I tried to create a new account. So I dunno how to fix that so it saves the admin status.
>
> Also somehow in my nubbiness I lost all the source to the admin panel I created. I guess I didn't save before I closed out of Eclipse lol. Its kind of a good thing though because I was learning the code as I went and know how to make it a lot cleaner, so I'll remake that later.
>
> Today I played around with adding /waprto , /warpmeto and /warptome commands to the game like the normal Eclipse engines have.
>
> Code below…
>
>
> >! In MessageHandler.java Replace```
> if (id.equals("MOVE")) {
> >! return new MoveHandler(payload);
> >! }
> ```with```
> if (id.equals("MOVE") || id.equals("WARP_TO") || id.equals("WARP_ME_TO") || id.equals("WARP_TO_ME")) {
> >! return new MoveHandler(payload);
> >! }
> ```
> >! Then open MoveHandler.java and replace```
> >! Player yourPlayer = players.get(socket);
> >! int newX = yourPlayer.getX(), newY = yourPlayer.getY();
> >! if (payload.equals("UP")) {
> >! newY -= 1;
> >! } else if (payload.equals("DOWN")) {
> >! newY += 1;
> >! } else if (payload.equals("LEFT")) {
> >! newX -= 1;
> >! } else if (payload.equals("RIGHT")) {
> >! newX += 1;
> >! }
> >! ```
> with```
> >! Player yourPlayer = players.get(socket);
> >! int newX = yourPlayer.getX(), newY = yourPlayer.getY();
> >! String message = "";
> >! String type = "";
> >! if (payload.contains(",")) {
> >! type = payload.split(",")[0].toUpperCase();
> >! if (payload.indexOf(",")+1 < payload.length()) {
> >! message = payload.substring(payload.indexOf(",")+1);
> >! }
> >! }
> >! if (payload.equals("UP")) {
> >! newY -= 1;
> >! } else if (payload.equals("DOWN")) {
> >! newY += 1;
> >! } else if (payload.equals("LEFT")) {
> >! newX -= 1;
> >! } else if (payload.equals("RIGHT")) {
> >! newX += 1;
> >! } else if (type.equals("WARP_TO")) {
> >! if (yourPlayer.getAdmin() > 0) {
> >! int warpX = yourPlayer.getX(); int warpY = yourPlayer.getY(); String warpMap = message;
> >! warpPlayer(socket, warpMap, warpX, warpY);
> >! } else {
> >! String errorMessage = "CHAT:BROADCAST,#FF0000,Invalid admin access!";
> >! sendTo(socket,errorMessage);
> >! }
> >! } else if (type.equals("WARP_ME_TO")) {
> >! if (yourPlayer.getAdmin() > 0) {
> >! if (validation.validPlayer(message)) {
> >! for (Socket sock : players.keySet()) {
> >! Player player = players.get(sock);
> >! if (player.getName().equals(message)) {
> >! int warpX = player.getX(); int warpY = player.getY(); String warpMap = player.getMapRef();
> >! warpPlayer(socket, warpMap, warpX, warpY);
> >! }
> >! }
> >! }
> >! } else {
> >! String errorMessage = "CHAT:BROADCAST,#FF0000,Invalid admin access";
> >! sendTo(socket,errorMessage);
> >! }
> >! } else if (type.equals("WARP_TO_ME")) {
> >! if (yourPlayer.getAdmin() > 0) {
> >! if (validation.validPlayer(message)) {
> >! for (Socket sock : players.keySet()) {
> >! Player player = players.get(sock);
> >! if (player.getName().equals(message)) {
> >! int warpX = yourPlayer.getX(); int warpY = yourPlayer.getY(); String warpMap = yourPlayer.getMapRef();
> >! warpPlayer(sock, warpMap, warpX, warpY);
> >! }
> >! }
> >! }
> >! } else {
> >! String errorMessage = "CHAT:BROADCAST,#FF0000,Invalid admin access";
> >! sendTo(socket,errorMessage);
> >! }
> >! }
> >! ```
> Now go to InputSystem.java and below```
> // setname
> >! } else if (cmd.equals("SETNAME")) {
> >! String name = cmdMsg;
> >! if (validation.validPlayer(name)) {
> >! sendMessages.add("SET_NAME:" + name);
> >! }

> ```add```
> // warpto
> >! } else if (cmd.equals("WARPTO")) {
> >! String msg = cmdMsg;
> >! if (msg.length() > 0) {
> >! sendMessages.add("MOVE:WARP_TO," + msg);
> >! }
> >! // warpmeto
> >! } else if (cmd.equals("WARPMETO")) {
> >! String msg = cmdMsg;
> >! if (msg.length() > 0) {
> >! sendMessages.add("MOVE:WARP_ME_TO," + msg);
> >! }
> >! // warptome
> >! } else if (cmd.equals("WARPTOME")) {
> >! String msg = cmdMsg;
> >! if (msg.length() > 0) {
> >! sendMessages.add("MOVE:WARP_TO_ME," + msg);
> >! }

> ```


You're right about it not saving admin status.. Change the updatePlayer prepared statement and the updatePlayer function to fix.

Also in insertPlayer if you want every new player to have admin status change (the 6th part of insertPlayerPS which is admin)

```

insertPlayerPS.setInt(6, 0);

```
to

```

insertPlayerPS.setInt(6, 1);

```
Link to comment
Share on other sites

Now the admin status is saving fine after I restarted my computer.

Also, I found my admin panel code and SetName code I did before. Turns out I forgot I did those codes on my Mac and was doing the others on my PC so thats why I didn't see my admin panel lol.

Below is a pic of what my updated Admin Panel now looks like with the new warp features in. (also changed it to have rounded edges for the panel)

>! ![](http://i50.tinypic.com/9roci0.png)
Link to comment
Share on other sites

So I was bored in my java class at school today and during the 1 hour it took our teacher to explain how to print Hello World! to the screen i worked on my edits to this engine some more.

I changed the /setname feature to let admins set the name of any player, not just their own. Its now typed as /setname , and worked this way with my admin panel also.

I also aded a new button to the admin panel called Set Sprite. When you press it the admin input box comes up like everything else and in here you type , and can set either your own sprite (but typing your name name) or any other online players sprite. It then sends the sprite change to the player and everyone on their screen.

Pics of it are in the spoiler

>! ![](http://i48.tinypic.com/1zwgakx.png)
>! ![](http://i50.tinypic.com/1g6535.png)

**[[u]EDIT]**

Today during class I made another few edits. I changed all the stuff that said admin over to GM (this is mainly just for how I plan on having my game) and changed some of the requirements that where just checking of admin level was above 0, now the admin ranks are 0 = Player, 1 = Welcoming Committee, 2 = GM In Training, 3 = GM, 4 = GM Lead, 5 = Dev, 6 = Dev Lead. so different GM Tool (admin panel) commands have different admin rank requirements for them. Then I changed the command to open the admin panel from being /admin too /gm.

I also added a new button/command to the GM Panel and / commands which is Set Access. Now the Lead Developer (rank 6) can change the access level of any player.
Link to comment
Share on other sites

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
 Share


×
×
  • Create New...