I have been busy in the last couple of days designing and coding a voxel for Java.
My ultimate goal is to have a small game with a player who can move around and shoot things in a voxel-based world. Everything has been working great so far - I have gotten the voxel engine to work and to load a map saved in a simple XML format. However, I would like to be able to load .vxl maps from Ace of Spades (I believe it uses Voxlap).
I found this as a manual on how a .vxl is structured. However, how would I go about implementing something similiar in Java, instead of the C++ pseudo-code? I'm not asking for code, just for a direction on how to do something like that.
Related
Background information
In school we learned 2 languages, Java and Processing
I know that Java and Processing arent the best languages for programming games.
It doesnt cared me ^^ so i started to work on a simple pacman ...
Question 1
Is there something more effective than Sprites/BufferedImages ?
Question 2
For rendering and drawing huge maps, is there a method to do that ?
Normally it would lag when drawing it cause of all the images :)
But how i can render/draw large maps without any fps collapse?
Short answer: Don't bother optimizing before you have a problem.
Longer answer: The most efficient way to do this is by using a game development framework, which handles this kind of thing for you. But really, stick with what you're comfortable with until you actually have a reason to change.
Java and Processing are fine languages for game development. There was a game called Recluse a few years ago that did very well at Ludum Dare (a game programming competition), and it was done in Processing.
On the Java side, there are a ton of very popular game development frameworks. LibGDX is probably the most popular. In fact, the libGDX Jam just happened, and you can check that out for a bunch of examples of what's possible in Java game development. You might also want to check out JMonkeyEngine and LWJGL.
I would say this: program with whatever you're comfortable with. If you're comfortable with Processing and Java and using sprites and BufferedImages, then do that. Don't worry about efficiency until you actually have a problem.
Processing is a great language to make some simple games. Start with Pong and Space Invaders. When you're ready to "graduate" to more complicated games, then check out libGDX. Don't worry about making everything as efficient as possible- focus on finishing games, which is much harder.
You'll also find a very active community of Java game developers on JGO.
Good luck!
Is there something more effective than Sprites/BufferedImages ?
No, not at your level of programming experience.
For rendering and drawing huge maps, is there a method to do that ?
Tiles. Generally tiles are 256 x 256 pixel images of one section of the map. Like floor tiles, you place tiles together until you have a large enough graphic for your view. As the player moves, you add the tiles in the direction the player is moving and remove the tiles from where the player came.
Here's an introduction to creating a tile map engine.
I want to make an top-down RPG game, with multiplayer support for up to 4 players. I have no need for graphics right now, the map can be a black grid and the player a red dot.
The game features are:
A 10000*10000 map that will feature some treasure chests, which will give stat boost
each player will have the basic rpg stats(attk,def,speed,etc) which he should be able to divide 30 points on each of these before the game starts.
The players will move real time using the arrow keys.
Each player will have a visible field of view of 20*20.
If a player comes in proximity of 5*5 or closer to another player there will be a battle which will compare the stats along with some dice rolls.
The game must have a pause feature and also a lobby feature.
The game must be in Java
The reason i am asking is because i have very limited knowledge on the way of programming such a project, and the guides i have found on youtube mostly are two complicated because of graphics or do not support the multiplayer feature.
I would like if this community could give me some directions about how I should start this game, or better if they could give me the link to some internet tutorial/video or book that can teach me the things I need to finish this.
Thank you!
This video is how my good friend learned java development. Obviously you're not going to find any tutorial that follow your exact needs, but this one is semi-close. I believe it goes into networking later in the series. This video is also very good, but it is farther away from your specifications. Another, better thing you can do is follow simpler tutorials until you know what you are doing, then change the source around to fit your specifications.
Generally if you do not know any java at all, starting with a game like this is not a very good idea. But if you are very motivated, it can be done.
By the way, this broad type of question is not very well suited for a Q & A site like this, so expect downvotes from others unless you edit your question.
I am currently thinking of developing an MMORPG with a Java Client. It will be a survival sandbox game, with much wilderness.
Now I would like to know if there is any program which can get the loaded world out of the cache of the running client. (as image or something else visible) I need this because the world would be huge and it will help to hand out official maps for the game.
You might want to start by looking into VBOs and VAOs (incredibly fast way of storing vertex, normal, texture... data on the GPU instead of the CPU). I'd also recommend checking out Blender, which I'm sure you've heard of, and their easily readable format known by the OBJ extension (The OBJ extension was developed by WaveFront). There are many libraries that allow you to read these files, but the format is simple enough that you can code an advanced mesh loader in around 80 lines or less.
I'm not entirely sure what you mean by your question about whether or not you can get a world out of the cache, but if you're looking to get 3D data from an image, you can check out height maps. However, height maps are better for general terrain where you will NOT have caves. Generally things like that are loaded from a 3D modeling program's output.
This might go against what other people think, but the best way to start out is by using OpenGL to its potential. Of course this involves implementing your own matrix stack for shaders and so on, but the payoff of easy engine modifications in the end is great. The good thing about OpenGL is even though you might have Java or C++ or some language that you use, the methods remaing (generally) the same. However, the syntax does vary just like the languages do themselves.
Pyglet (Python bindings for OpenGL) is an interesting place to start if you are looking to get started with OpenGL while maintaining ease of programming and quick debugging (because it is an interpreted language) and dynamic typing helps because OpenGL can be picky about the types it accepts.
All the game tutorials I've sen on 2d games are tile based. Does someone know a Java tutorial non-tile based games, like Limbo for instance?
Well in my opinion "wing it" I have always considered the tile thing more of a box concept so that you can manage it more easily but I have always found it more confusing, to say the least I have given up on searching for non tile-based tutorials and am now winging it or so to speak but it still remains important be able to see a problem for what it really is.
Is anyone developing robots and/or gadgets for Google Wave?
I have been a part of the sandbox development for a few days and I was interested in seeing what others have thought about the Google Wave APIs.
I was also wondering what everyone has been working on. Please share your opinions and comments!
I haven't tried the gadgets, but from the little I've looked at them, they seem pretty straight-forward. They're implemented in a template-ish way and you can easily keep states in them, allowing more complex things such as RSVP lists and even games.
Robots are what I'm most interested in, and well, all I can say is that they're really easy to develop! Like barely any effort at all! Heck, I'll code one for you right here:
import waveapi.events
import waveapi.robot
def OnBlipSubmitted(properties, context):
# Get the blip that was just submitted.
blip = context.GetBlipById(properties['blipId'])
# Respond to the blip (i.e. create a child blip)
blip.CreateChild().GetDocument().SetText('That\'s so funny!')
def OnRobotAdded(properties, context):
# Add a message to the end of the wavelet.
wavelet = context.GetRootWavelet()
wavelet.CreateBlip().GetDocument().SetText('Heeeeey everybody!')
if __name__ == '__main__':
# Register the robot.
bot = waveapi.robot.Robot(
'The Annoying Bot',
image_url='http://example.com/annoying-image.gif',
version='1.0',
profile_url='http://example.com/')
bot.RegisterHandler(waveapi.events.BLIP_SUBMITTED, OnBlipSubmitted)
bot.RegisterHandler(waveapi.events.WAVELET_SELF_ADDED, OnRobotAdded)
bot.Run()
Right now I'm working on a Google App Engine project that's going to be a collaborative text adventure game. For this game I made a bot that lets you play it on Wave. It uses Wave's threading of blips to let you branch the game at any point etc. For more info, have a look at the Google Code project page (scroll down a little bit for a screenshot.)
Go to Google Wave developers and read the blogs, forums and all your questions will be answered including a recent post for a gallery of Wave apps. You will also find other developers to play in the sandbox with.
I have been working on Gadgets, using the Wave API. It's pretty easy to work with. For the most part, you can use javascript inside an XML file. You just need to have the proper tags for the XML file. Below is a sample of what a Gadget would look like, this particular gadget retrieves the top headlines from Slashdot and displays them at the top of the Wave. You can learn more about Gadgets here and here.
alt text http://www.m1cr0sux0r.com/xml.jpg