Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (580)
games submitted by our members
Games in WIP (500)
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 05: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 23: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 22: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. http://gdcvault.com/play/1015807/Ask-the-Experts-Professional-Programmer
4  Game Development / Newbie & Debugging Questions / Re: Isometric Tiling and General Object Oriented Woes on: 2012-07-20 18: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 05: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 05: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 03: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 23: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 23: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 23: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 22: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 21:52:06
I recently heard about an update for HAXE which allows it to compile to Java code. You can check it out at http://haxe.org/

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 19: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 06: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 18: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 17: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 06: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 15: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 21:44:56
I don't think anyone has mentioned how this console will be funded.

http://www.kickstarter.com/projects/ouya/ouya-a-new-kind-of-video-game-console

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-07 01: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 :-)

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
        // 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]);
            resolveCollision();
         }
      }
   }
   
   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]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (46 views)
2014-04-15 18:08:23

BurntPizza (42 views)
2014-04-15 03:46:01

UprightPath (58 views)
2014-04-14 17:39:50

UprightPath (40 views)
2014-04-14 17:35:47

Porlus (56 views)
2014-04-14 15:48:38

tom_mai78101 (79 views)
2014-04-10 04:04:31

BurntPizza (138 views)
2014-04-08 23:06:04

tom_mai78101 (238 views)
2014-04-05 13:34:39

trollwarrior1 (199 views)
2014-04-04 12:06:45

CJLetsGame (207 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
java-gaming.org 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‑gaming.org
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!