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  Games Center / Showcase / Re: TicTacToe - My first game on: 2013-01-21 18:52:29
Feels like AI is cheating or something. Is it possible to win?

Nope, like I said, AI can never lose. If it loses (or cheats) then there's a bug Smiley.

That either deserves applause or a facepalm, not sure which.   Cranky

Heh, I agree with you Cheesy
2  Games Center / Showcase / Re: Jackal on: 2013-01-08 03:58:02
Being an "Expert" level player in Jackal, I have to say that the positions of the enemies, triggers and everything are very accurate with respect to the original. I've only played the first level, but the graphics are also so similar that if it weren't for the differences in animation I would have thought it the same.

But I'd like to know how you got it to such amazing accuracy. Do you have an emulator built-in which is reading off the original .nes file and then rendering the graphics?

One difference I noted is that in the original, you can press the direction key and fire key and he will launch a rocket/grenade in that direction without having to point the jeep in that direction. In yours, the rocket/grenade is launched only in the direction the jeep faces

For others not familiar to the game, you can play it online here:

http://www.virtualnes.com/play/?id=NES-JK
3  Games Center / Showcase / Re: TicTacToe - My first game on: 2013-01-08 03:31:38
Awesome game!
I love how there is absolutely no delay between the time when the player plays and when the computer plays!
I have yet to win a game though  Tongue

Glad you liked it! Smiley
Yes, I did consider putting in a delay, but felt it was unnecessary. This is tic tac toe and not chess Cheesy. I wanted the game to be as quick as possible so that you can play as many times as you like with min time wasted
4  Games Center / Showcase / Re: TicTacToe - My first game on: 2012-12-05 06:32:40
I have just finished my fist game too! Its also tic tac toe.
All written in java with no scala or anything else.
Also mines 2 player and haven't set about working on a 1 player version of the game yet. Will do that eventually.
Also mine doesn't seem as pretty as yours. (shocking as that might be to you!)

Hey, welcome to the forum. Take it from one who has just completed a tic tac toe game, I know the first game is anything but trivial. See if you can get it to a 1-player version. The strategy is quite simple as given on wikipedia but implementing it is definitely not easy.
5  Games Center / Showcase / Re: TicTacToe - My first game on: 2012-12-02 07:00:19
Thanks for the info about sbt. I'll try it out and see how it works with external libs i.e. unmanaged deps. No problems with Jarsplice, it's one of the good tools to have in your Java arsenal IMO. Doesn't look like it has any support for CLI:

http://stackoverflow.com/questions/10998264/command-line-parameters-with-jarsplice
6  Games Center / Showcase / Re: TicTacToe - My first game on: 2012-12-01 08:23:19
sbt and eclipse work great together:
1  
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.1.0")


Yup, I use the eclipse sbt plugin now and then. I normally put it in a folder called 'project' in the project folder itself, but your method seems more convenient.

It works especially well with libraries on the repository like Akka, but not sure how to get it setup with a project using Java and Slick2D, or for that matter, libraries on my PC. Also not sure what the workflow should be like if I need to add more libraries at a later time. Do I run sbt and re-import or should I do it in Eclipse itself?

I'll need to learn a bit more about build.sbt as well.
7  Games Center / Showcase / Re: TicTacToe - My first game on: 2012-12-01 06:17:33
Good to know jarsplice worked, but if you use sbt, the one-jar plugin works very well.  The sbt-assembly plugin is also good for making fat jars but I don't think it has a story for native libs.

I would really like to use SBT, but it's just not convenient if you're using Eclipse. Doable definitely, but not convenient. After racking my brains for a few hours to make a jar, jarsplice was the only thing that worked for this project. I don't understand why it's so difficult to make a jar using Eclipse. They've got all the wizards, they just don't work well if you use external libs
8  Games Center / Showcase / Re: TicTacToe - My first game on: 2012-12-01 04:28:20
Actually the "AI" for an unbeatable TicTacToe game can be written in just a few lines of code in scala.

http://pastebin.com/V7d1sHSe

Well, the AI code in Scala for me takes ~130 lines. And there's also a support file written in Java, so definitely not as compact. Smiley

or... is this oddness mandatory in Scala?

Ha ha, no you're right. I do that myself quite often, it's the curse of imperative programmers in the functional world Smiley

I would really like it if you could make the computer beatable.  Grin

Nothing easier, I'll just make the computer play a random move everytime Cheesy. Or to make it a definite loser, I'll implement a method avoid3InARow() Cheesy
9  Games Center / Showcase / Re: DarkVania on: 2012-11-26 08:10:40
NOTE: One major issue that i have with the game is that on some machines, the player will jump lower than on others, i think this is because my game loop sleeps for a period of time (set to 9ms i believe) but even though it's supposed to sleep the same across all machines I realize relying on System.millis in not a good approach, but i don't see how i can have the game sleep the same amount of actual real time across all machines, any ideas?

I don't know how it works in Java 2D, but Slick2D has a parameter 'delta' that's a frame-rate dependent offset. To have a 9ms pause, you would do (delta*9) or something similar. This keeps the time constant irrespective of the performance (read framerate)
10  Games Center / Showcase / Re: DarkVania on: 2012-11-25 08:55:44
I really like the game. The mario graphics are quite nice and the old school feel to the game is charming in fact. For 1.3Mb, I think you've nailed the size requirements for such a side scrolling game.

Some comments about the gameplay:
  • Jump is quite less. Can't even jump on to the bricks in the air to avoid the zombies
  • The whip is a bit slow. I guess this will take practice to time it properly, but by the time I pull the whip out, the zombie is already eating my face
  • Perhaps a brief invincible situation where the character blinks for a few seconds when he touches a zombie? This would keep the character from dying immediately if he gets cornered by a zombie. This is a very common feature in 8bit games Smiley

Given that it only uses Java 2D, it works quite well. Absolutely no lag on my laptop with 8GB RAM and 1GB nvidia GT420M
11  Games Center / Showcase / Re: SpringWorld Challenge on: 2012-11-23 20:35:22
No version control, that's the truth Smiley

Might I recommend a few then? Smiley

If your project is open-source, I would suggest go with github, gitorious or code.google.com. The last one supports Mercurial and Subversion as well.

Otherwise, you can try bitbucket.org which has private repos for upto 5 users/project.
12  Games Center / Showcase / Re: TicTacToe - My first game on: 2012-11-23 19:39:06
lol, 10 mb is still huge for a tic tac toe game...everything on java4k is under 4 kilobytes and a lot more complex. Although I understand Scala is added.

Nice little game tho, keep on getting draws Grin

Well, I didn't say it was an efficient game Smiley. It was a good learning exercise on integrating Scala with Java. The algo I'm using is also probly not the most optimal either as you can see from the slight delay in playing the first move.

Thanks for trying it out. I was thinking of offering a prize for anyone who beats the computer Cheesy. Because, if you can beat the computer, it's probly a bug!
13  Games Center / Showcase / Re: SpringWorld Challenge on: 2012-11-23 18:13:37
Wow, this game is real professional. And this was made without version control? You're kidding right?

It's quite difficult too. Not an easy game. Smiley
14  Games Center / Showcase / Re: TicTacToe - My first game on: 2012-11-23 14:27:36
I looked into the file and I'm pretty sure the "slick.zip" is not necessary, so that's 10 Mb less already.
Besides that it's pretty good for a first game, with sounds and all. Not bugs discovered  Smiley

Thanks for that. I removed slick.zip and now the .jar is ~10mb. Again, bulk of the file is because of the scala library which is taking up ~17mb uncompressed.

Thanks for trying out the game. I'm glad it worked, I didn't test it on any machine other than mine.
15  Games Center / Showcase / TicTacToe - My first game on: 2012-11-23 14:07:33
Well, I've been able to churn out my first game and it's just TicTacToe. It has been more difficult than I would like to admit. But I'm really happy with the way it turned out. Here's the download link for the jar and before you download it, please note that you cannot win against the computer Smiley.



https://www.dropbox.com/s/voc7obrlqctgxda/tictactoe.jar

Here's some details about the game. I recently learnt Scala and wanted to implement the AI completely in Scala. For this I first created a simple text based game in Java with the move recommender engine in Scala. Once the text game worked fine, I used Slick to create the game and Inkscape to create the (lame) graphics.

There is a standard strategy for TicTacToe as given on Wikipedia. But I wanted to come up with my own strategy for it. So I didn't bother to look at this link until far later when my AI wasn't performing optimally.

I've developed a recursive score based AI which calculates all possible moves and assigns a score to every possible move. But this method led me to 3 issues - viz incorrect handling of
1. forks
2. immediate wins
3. immediate losses

So, I've had to adapt a bit of the standard strategy to fix these issues. Forks were handled through hardcoding.

In any case, I've cut corners everywhere in this project. The code is an unmaintainable mess with hardcoded strings, numbers and pixel locations. But there are far better tictactoe implementations out there, so I didn't want to make too much of it. It's more or less a Proof of Concept.

I'm happy to have been able to integrate Java, Slick and Scala.

Btw, creating the jar has been a nightmare. Thanks to jarsplice, I was finally able to make it. The complete instructions on how I did it are here: http://stackoverflow.com/questions/13527869/could-not-find-main-method-from-given-launch-configuration-when-using-javasca


16  Discussions / Business and Project Discussions / Re: Indie game team looking for programmers - GameDan on: 2012-11-05 19:37:56
I had the Mozilla Avast plugin flag it as an insecure site when I checked, didn't take a screenie. But it looks like the website is down completely. I'm getting "The connection to the server was reset while the page was loading."

If bemonochrome will validate his website or post something here, I'll be happy to change my post once everything works fine.
17  Games Center / Showcase / Re: Bystanders - 2D shooting on: 2012-11-05 19:31:26
It's fairly neat and feels like a good amount of thought has gone into it. But wouldn't this be better in the WIP forum?

Anyways, I downloaded it and gave it a shot. It starts fine but once I hit the 19seconds gameplay time, it slows down to a crawl. Something like 0.5 fps. I'm using Windows 7 with 8GB RAM. It's probly using the Intel graphics chipset and not nvidia, but that shouldn't really slow it down so much.

PS: Nice to see you're using slick. I've just recently started working with it. Smiley
18  Games Center / Showcase / Re: My first game - SplatterPix on: 2012-10-19 13:35:13
Nice, I really like the game. A bigger display and some tighter control on the shooter would be awesome.

If you've only learnt Java for a month and already made a game like this, I salute you. I'm guessing you're not totally new to object oriented programming? Smiley
19  Discussions / Business and Project Discussions / Re: Indie game team looking for programmers - GameDan on: 2012-10-12 19:03:42
[size=20pt]DON'T CLICK ON THE LINK[/size][/b]

[size=15pt]Avast antivirus shows the website as a threat. Mods - please remove the link[/size]
20  Games Center / WIP games, tools & toy projects / Re: Tank reborn - Based on classic NES Battle City Tank on: 2012-10-11 11:42:15
I'll have it ready by the time there's something worth playing in the game Smiley. Creating a jar through Ant in eclipse on windows is surprisingly difficult.
21  Games Center / WIP games, tools & toy projects / Tank reborn - Based on classic NES Battle City Tank on: 2012-10-10 07:44:52
Well, perhaps it's too soon and there's really not a whole lot to show at the moment. But getting this far was a good start for me. This is my first project and I hope to learn a bit from doing it. It's not much to look at at the moment, but hopefully I'll have some more stuff soon. After I decided to do this project, I found out (quite accidentally) that the GPL'd spritelib has a complete set of sprites for this Smiley



Done so far:
1. Initial project code layout
2. GameStates
3. Level loader from text file
4. Tank, Bullet and Wall objects
5. Keyboard input - Arrow keys to move around, space to fire

Immediate TODO:
1. Collisions viz: tank-tank, tank-bullet, tank-wall, bullet-wall, bullet-bullet
2. Animations - using just single images so far, need to change them to animations
3. Enemy Tanks
4. Home base - the eagle! Smiley

Further TODO:
1. Enemy AI (Looking forward to this Smiley )
2. HUD - Progress, number of enemy tanks left
3. Spawn points
4. Power ups
5. Score
6. 2-player mode
7. Menu screen
8. Options screen
9. Music, sounds


Dream TODO:
1. Multiplayer mode - upto 8 players on single screen, last one standing wins. Team based with AI bots also
2. Survival mode - Wave after wave of enemy tanks, can you hold out?

Source code:
https://github.com/plastygrove/TankReborn
22  Games Center / Cube World Projects / Re: World of change on: 2012-10-10 07:24:44
I read through all the posts on this thread and am sorry to hear that you won't be working on this project anymore. I think what you've done so far is great and I really loved the videos. Honestly, my interest in developing games started a month ago after playing minecraft and my first intention was to make a similar clone. Then reality hit and now I struggle making 2D tetris style games Smiley.

And as far as hate for minecraft clones goes, it hasn't stopped Yogscast from getting a 200% funded kickstarter project:
http://www.kickstarter.com/projects/winterkewlgames/yogventures

If you've followed their youtube channels, they're claim to fame is making videos (not mods or games) on Minecraft Cheesy.
23  Game Development / Newbie & Debugging Questions / Re: Need platform game tutorial or working code example on: 2012-10-10 07:05:29
Thanks so much for the reply. Apologies if I wasn't specific. Yes, I'm looking for tutorials using Slick 2D, but will also be okay if it's general high level guidelines - like how to get the scrolling background with animated clouds and trees etc, implementing the jump, firing bullets, climbing mountains etc. And yes, I'm very new to this, so I'm not sure what Jump timer means. And at the moment, I'm not even going near LWJGL or direct opengl calls but sticking to slick2D. The animation class is a god-send for me Cheesy.

Thanks for sharing your source code. It has a lot of things I'm looking for, I'll go through it.

48 hr game contests sound scary. I don't think I've reached that point yet, still have to constantly switch back to example code to get a bearing.
24  Game Development / Newbie & Debugging Questions / Need platform game tutorial or working code example on: 2012-10-07 12:50:11
I'm new to game dev and just completed the SlickOut and SlickBlocks tutorials by Spiegel. I'd like to understand about Platformers viz, side-scrolling, mario/sonic style games. Any leads to working code examples or tutorials would be great.
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 (52 views)
2014-04-15 18:08:23

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

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

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

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

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

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

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

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

CJLetsGame (210 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!