资源说明:Using LWJGL
An attempt to make a game engine using Slick, a library supporting LWJGL (which is written in Java). Let's hope for the best. OK, it's come far enough along that it deserves a real README. That and I'm waiting for some resources at work so I'm kinda bored. Premise: The goal of this project is to develop an engine that allows 2d sprites to walk around different maps and communicate with one another. Project uses Pokemon sprites because I feel like it. If Nintendo is reading this and has a problem, please send a handwritten letter to my home address specifying your complaint along with a copy of Mario Teaches Typing 2 signed by Shigeru Miyamoto. HOW TO HELP: The repo has everything you need in it, except for Eclipse and Java. You can get those yourself. If you want, you can also download Tiled to make maps. If you're reading this, that means I haven't uploaded my Tiled guidelines yet, which you will need if you want to make a map right. If you really want to do maps and I haven't put that guideline up yet, just email me or msg me on Github and I can tell you what you need real quick. If you want to code, just make a fork and start messing around. Anyone can use this to learn or abuse or whatever, just don't steal it ok? If you want to help, check out the TODO list below for things I could use help on. If you have an idea for something that isn't listed here, just shoot me a msg or email and I'll let you know if it is in line with what I'm thinking. You are free of course to do whatever you want, but if you add ponies or something I'm not going to merge your fork. THINGS YOU SHOULD KNOW: * To run the client, just go to the main directory and run client.exe. You will need to connect to a server to see anything other than the main menu at this point. See server instructions below. * In order to host users remotely, port 7377 needs to be open on your router. The jar to run the server is in the jars folder, named server.jar (duh). First, make sure Java is configured in your path settings or whatever (see this link: http://java.com/en/download/help/path.xml). Then navigate to the jars folder in console, and run the server using "java -jar server.jar" and it will be up. * Debugging keys for the server (type the key and press enter in the console window): * x to close the server. * c to see the IP/player hashmap. * v to see the active player list (this is the list which all clients are bound to). * The client uses a random int between 0-1000 to assign player ids. The odds of overlap at this stage is pretty much 0, but as we progress we will definitely want dedicated player ids and stuff. Just a heads up. * I use Jarsplice to export jars and exes of the game (you can check it out here: http://ninjacave.com/jarsplice). It's a great tool and easy to use. I'll put some detailed instructions on what to include and what not to include in the compiler at some point, I don't think anyone will be doing that right now. Email or msg me if you want me to help you. TASKS COMPLETED: * Server is up. * Client is up. Users can type the ip of their host (or just use localhost on the same machine) to connect to a server. * Multiple client support. I've only tested 2, but in theory it should be able to host lots of people. * Messaging is live. Users can press y to open up a message window and type stuff which will be seen by other users on the server. * User logoff works. * The playerlist is now dynamic. TODO LIST: * Realm transitions. I don't know what else to call it. Basically going from one area to another, from city to house, etc. Different rendered zones, whatever. I need to not only handle these transitions client-side, but also serverside. When you're in a house, for instance, you don't need to know what people outside are doing, just the people that will be drawn on your screen. * Player drawing. It work's fine right now, except the logic is really basic. User player's are drawn "on top" no matter what. So if multiple players occupy the same coordinate, you see your player, not the peer player. The problem with this is that the character sprites take up slightly more than 1 coordinate to give the illusion of depth. So if you're standing one space below another user, your head should peek over their feet a bit. Except the way it is now, it just puts the user's player on top no matter what, so in this case it would look like your player is standing on the peer player's head. Try it out for yourself, you will see. * Code cleanup anywhere you think you can optimize, if you're into that kind of thing. I think I did a pretty good job, but I'm sure there are places that could use help. * This isn't the priority really, but the server could use a GUI I guess. All we'd need is a log window and some debugging buttons. * There are TONS of more things to do, but these are the changes I think we/I should tackle right now.
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。