Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (753)
Games in Android Showcase (228)
games submitted by our members
Games in WIP (842)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Newbie & Debugging Questions / Re: TILES. on: 2012-08-01 03:03:13
The problem you are having could be a wide variety of issues. Without seeing your code it is very difficult to figure out what's going on. Instead, I'll try to explain what my game is doing to draw the tiles.

For rendering the world to the screen I have 4 classes: World, Level, Tile, and Map.

The Map class simple holds an array for each level. It's basically just the layout.

The Tile class represents a single tile, so mostly it just loads the right image. It also has its own draw method.

The Level class organizes the tiles based on the appropriate map and has it's own draw method, which simply calls draw on each tile in the level.

Finally, the World class keeps all the levels organized and calls the proper level's draw method when needed.

The code that you pasted here is the World class retrieving the appropriate level from the levels array, and calling that level's draw method. That method then just calls the draw method of each tile in that level.

I hope that I explained it well enough to help you figure out the bug you've got going on. If you want more in depth help, feel free to give us your code so we can look over it.

P.S. Glad I could help get you on the right track!
2  Game Development / Newbie & Debugging Questions / Re: TILES. on: 2012-07-31 21:26:24
I would start by figuring out what you want this game to be. Write out some basic goals before jumping in.

After you've got a good idea of what you want it to look like, pick a direction. Separate the game into much smaller tasks and pick one to tackle.

I'm actually working on a top-down tile-based RPG right now and I chose to create the world and a player just so that I could start moving around and testing collision, etc. A couple hours after I started I've got a dude running around multiple levels. Using placeholders for your art will speed up the process quite a bit.

For my maps, I'm just using basic arrays to hold integers. Each one represents a different type of tile to draw to the screen. Also, when you move off the screen to the next area, the map get's loaded as the current level and redrawn.

Right now my game is super simple and easy to get up and running. You can check out the source on my github page and I wrote about the steps I took to get the map up and running on my blog.

TL;DR - Break your ideas down into small bite-sized chunks and pick a direction to go in. You can find more help online for small topics rather than a very large topic like tile-based games.

Now go out there and make another awesome RPG. The world doesn't have nearly enough of them!
3  Discussions / General Discussions / Re: Would appreciate some advice on: 2012-07-30 20:28:14
I'm a little late to the discussion it would seem but I'd still like to give it a shot.

From the looks of it, you have two options. 1. Go back to school or 2. Forego the degree and try to get a job

It sounds like you don't really want to go to school. It also sounds like you are a little nervous about option 2. What I would recommend is finding out what YOU WANT. Once you really figure out exactly what you want your life to look like you can take the steps to getting there.

If you choose option 1, the decisions are pretty simple. Go to school, get some experience through internships etc., then just get a job after you graduate.

However, if you choose option 2 you have quite a few different paths to take. You can get a job that isn't related to programming so that you have an income, and spend your free time getting good at your craft. There are a ton of jobs out there that don't require a degree and if you are truly good at what you do, there are many opportunities (jobs or business opportunities).

One exciting path would be to get a job for now and start working freelance to get the experience that will make you stand out. Once you've done quite a few jobs and are comfortable with your experience, you can easily quit the temporary job and either do freelance full time or just start your own business. Millions of people run their own business and the freedom is a big driving force.

Anyway, the main thing you should take from this is that you need to go for what you really want. Don't just get a degree because people say it's what you should do. If you really think an education will get you closer to your dreams, than great! If you can accomplish what you want through other means, than make sure you consider it.

Lastly, check out this video. It is the best advice around for young ambitious programmers who want to make video games.
4  Game Development / Newbie & Debugging Questions / Re: Isometric Tiling and General Object Oriented Woes on: 2012-07-20 16:02:45
You guys have taken over this thread and turned it into an argument (multiple arguments actually...)

How bout we stick to addressing the questions that were actually asked and keep the other stuff to their own threads. As a matter of fact, this forum could probably benefit from a comprehensive discussion on Array vs ArrayList and other similar topics. Link to a different thread if you want to start it, otherwise you're just wasting people's time who come to this thread for answers pertaining to the original posters questions.

Thank you, that is all
5  Discussions / General Discussions / Re: HAXE - Multiplatform Programming on: 2012-07-19 03:40:43
I don't think you need HAXE for java. just use java. I did however try to write flash games with it until flex came out.

The idea is that you can write once and compile to Java, or Flash, etc.

So if you plan to only use one language, of course use that language. But, if you want to compile to different languages, it would make sense
6  Game Development / Newbie & Debugging Questions / Re: Isometric Tiling and General Object Oriented Woes on: 2012-07-18 03:22:31
I'm glad someone else is feeling the same way as I am! Smiley I am the point now where I understand simple OOP structure, but when it starts to get larger and more complex I'm totally lost.

We can do it!  Smiley

Hey, I'd love to hear your input on the stuff I've put on my blog. It'll be good to hear from someone around my skill level. If you get a chance check it out. Link is in the signature. I'm actually working on tile maps for my game right now. We can probably learn some stuff from each other.

Also, if you have any requests for helpful tips or tutorials let me know. Thanks!
7  Discussions / General Discussions / Re: HAXE - Multiplatform Programming on: 2012-07-18 01:05:32
So you can write just once, and run anywhere?! How novel! Wink

Haha, touche...
8  Game Development / Newbie & Debugging Questions / Re: "Scaling" Your Images to Fix Screen Size on: 2012-07-17 21:37:54
Heh, that makes so much sense...

I'll fiddle around with it. That definitely puts me in the right direction though. Thanks
9  Game Development / Newbie & Debugging Questions / Re: "Scaling" Your Images to Fix Screen Size on: 2012-07-17 21:27:22
I'm not using any API. He did use something that probably got the same effect I'm looking for.
10  Game Development / Newbie & Debugging Questions / Re: "Scaling" Your Images to Fix Screen Size on: 2012-07-17 21:23:51
I have no idea what you are talking about... very new to programming.
11  Game Development / Newbie & Debugging Questions / "Scaling" Your Images to Fix Screen Size on: 2012-07-17 20:48:06
I hope the title makes sense with what I'm trying to accomplish.

My goal is to create tile maps for a top-down RPG using 32 x 32 tiles. When I display the tiles in an 800 x 648 screen, I lose the look that I'm going for. I want everything to appear bigger.

I'm having a hard time explaining it and wrapping my head around it, but I'd like the tiles to use 32 x 32 pixels, but for them to fit into a bigger size, say 64 x 64.

If this doesn't make sense, I'll try to figure out a way to explain it better, but if anyone actually knows what I'm trying to do, guidance in the right direction would be great. Thanks
12  Discussions / General Discussions / HAXE - Multiplatform Programming on: 2012-07-17 19:52:06
I recently heard about an update for HAXE which allows it to compile to Java code. You can check it out at

Also, I was curious if anyone here has any experience with the language. It's been around for a while now but this is the first time I'm hearing about it.

If anyone has used it, how viable is it for game programming, especially for the web?
13  Game Development / Newbie & Debugging Questions / Re: Isometric Tiling and General Object Oriented Woes on: 2012-07-17 17:17:22
I'm in a similar boat for learning to program but I hope I can give you a few tips.

As far as creating a separate class, I would definitely recommend it. Usually the answer for me is yes anytime I ask myself if I should create another class. It is good OOP and helps a ton with keeping things organized. The fewer classes I have, the harder I find it to remember what each one does haha. When you separate them logically, it's easy to remember each class's function and to remember what you plan with each part.

Also, if you want to get a good idea of how to organize your game, I HIGHLY recommend looking at other game developers' source. I've got a couple projects set up in my Eclipse that Notch wrote for Ludum Dare. They might not be a perfect example because they were done in 48 hours, but they still help guide me through the process.

Best of luck man, good to see someone doing the same thing as me. MORE GAMES!!!
14  Discussions / General Discussions / Re: Kick Visual Studio in the face on: 2012-07-17 04:07:17
I've never really been bothered by the delay in Eclipse. On the other hand, hovering my mouse over a class in order to import it is annoying.

I should probably look up a way to fix that...
15  Discussions / General Discussions / Re: Ouya - Oh yeah? on: 2012-07-14 16:05:49
The price tag looks impossibly low I do agree - just a plain beagleboard costs more than that. Either it is a low introductory price, or they will recoup their losses in their game marketplace.
They get 30% of every purchase and each game is try-before-you-buy. I'm curious whether they will manage to go with profit.

On another note their Kickstarter pledges have more or less died off now, going from ~700,000 pledges/24 hours to somewhere around  ~7,000 pledges/24 hours. It's pretty much losing 99% of their Kickstarter-pledge-momentum.

It was my understanding that the first couple days and the last couple days are the most intense for a lot of Kickstarter projects. They've also already exceeded the goal quite a bit which might be discouraging some from donating.

It ain't over til the fat lady sings.
16  Game Development / Game Mechanics / Re: Checking a LARGE tilemap for collisions on: 2012-07-14 15:48:31
This post helped me out quite a bit. As a placeholder, I was just iterating through my array and checking collision on ever tile. Now I've made a method to calculate the exact index of the tile I'm attempting to move onto and checking collision that way.

Thanks for the help guys.
17  Discussions / General Discussions / Re: Odd and original game-design ideas on: 2012-07-14 04:20:25
When we were young, we always dreamed about a FPS with an exact replica of our school to play it and kill zombies and stuff.

But shooting in a school in a video game... I guess that would be frowned upon.
Holy nut I had same thing too! Pointing
I also imagined about not only school but my living city, because I know where the police station, minimarket for can food, and place to settle. Zombie only thought, no witch, smoker, or nemesis Undecided

I like these ideas. A game like Fallout where levels are generated by a zip code that you enter. Build the world in your vicinity by using Google Maps. GENIUS!
18  Game Development / Newbie & Debugging Questions / Re: Can't Smoothly Resolve Rectangle Collision on: 2012-07-12 13:45:44
Haha, this is so funny. I just came from that topic to read the response here. It's already in my bookmarks and is a HUGE help. Thanks for the link.
19  Discussions / General Discussions / Re: Ouya: a $99 Android game console on: 2012-07-10 19:44:56
I don't think anyone has mentioned how this console will be funded.

I heard about the Kickstarter this morning and since I saw it the raised funds went up by about $700,000. Looks like the won't have any problems getting the money.
20  Game Development / Newbie & Debugging Questions / Can't Smoothly Resolve Rectangle Collision on: 2012-07-06 23:13:39
I'm trying to move a sprite around a tiled map where stone and water are solid. When my player sprite collides with a tile he stops moving and won't move as long as he is colliding. How do I fix this code to allow horizontal movement during vertical collisions and allow vertical movement during horizontal collisions? Also, thanks for helping out in advance :-)

        // move player based on directions
   // methods for controlling movement
   public void move(){
      playerRect.x += xDir;
      playerRect.y += yDir;
   public void checkCollision(){
      for(int i = 0; i < world.mapSize; i ++){
         if(playerRect.intersects(world.blocks[i]) && world.isSolid[i] ){
            intersection = (Rectangle) playerRect.createIntersection(world.blocks[i]);
   public void shoot(){
      // figure this out later
   private void resolveCollision(){
      if(xDir > 0){
         playerRect.x -= xDir;
      if(xDir < 0){
         playerRect.x -= xDir;
      if(yDir > 0){
         playerRect.y -= yDir;
      if(yDir < 0){
         playerRect.y -= yDir;
Pages: [1]
ivj94 (579 views)
2018-03-24 14:47:39

ivj94 (42 views)
2018-03-24 14:46:31

ivj94 (346 views)
2018-03-24 14:43:53

Solater (59 views)
2018-03-17 05:04:08

nelsongames (104 views)
2018-03-05 17:56:34

Gornova (122 views)
2018-03-02 22:15:33

buddyBro (665 views)
2018-02-28 16:59:18

buddyBro (89 views)
2018-02-28 16:45:17

xxMrPHDxx (491 views)
2017-12-31 17:17:51

xxMrPHDxx (727 views)
2017-12-31 17:15:51
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!