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   
Pages: [1]
  ignore  |  Print  
  Fall And Blocks  (Read 3886 times)
0 Members and 1 Guest are viewing this topic.
Offline asphaltgalaxy

Junior Member


Medals: 1
Projects: 1



« Posted 2011-12-30 10:51:03 »

Hello!

Just created my second game, it's a 3billionth Tetris clone: 'Fall And Blocks'. Smiley



Applet is here:
http://asphaltgalaxy.com/test2/fallandblocks.html

Features:
  • Global score
  • 4 sizes of board
  • 3 next shape view modes


Few words about me:

I am new to Java, but not so new to programming (working mostly with Oracle databases/forms/reports). I am reading this forum for several months, and found it very useful. Just do little more searching and your problem is solved Smiley

I got problems with graphics (mean artwork), since I cannot draw. Thanks to modern drawing programs and their tutorials, I can do some very basic art. Smiley

Offline ra4king

JGO Kernel


Medals: 322
Projects: 2
Exp: 4 years


I'm the King!


« Reply #1 - Posted 2011-12-31 04:31:19 »

Nice! I loved the effects and the smooth transitions, makes for an overall polished feel. Actually quite amazing for a graphics beginner! Keep up the great work Smiley

Offline ReBirth
« Reply #2 - Posted 2011-12-31 05:19:09 »

The applet has earphones on it so it doesn't listen to my keyevent.

hint: I clicked the applet.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline asphaltgalaxy

Junior Member


Medals: 1
Projects: 1



« Reply #3 - Posted 2011-12-31 08:14:57 »

Nice! I loved the effects and the smooth transitions, makes for an overall polished feel. Actually quite amazing for a graphics beginner! Keep up the great work Smiley

Thank you! Glad you liked it!
Offline asphaltgalaxy

Junior Member


Medals: 1
Projects: 1



« Reply #4 - Posted 2011-12-31 08:22:32 »

The applet has earphones on it so it doesn't listen to my keyevent.

hint: I clicked the applet.

Hmmm. What OS r u using? I noticed some problems on some (tested on 2 actually Smiley ) Linux distros. On one of them I just refreshed webpage with applet and everything went ok (without additional click on applet).

So, where to start?

Class where listener is looks like:

1  
public class Board extends JPanel implements ActionListener, Runnable {


And the listener itself in this class is:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
        private class TAdapter extends KeyAdapter {
           
        public void keyPressed(KeyEvent e) {

            int key = e.getKeyCode();

            switch (gamestate) {
                case RUNNING: {
                    switch (key) {
                        case KeyEvent.VK_LEFT: {
                            shape.MoveDirection(blockboard, BlockShape.Direction.LEFT);
                            break;
                        }
                        ...


Where could be a problem?
Offline ReBirth
« Reply #5 - Posted 2011-12-31 14:19:44 »

Well your code seems fine especially other user could try it (although I usually extends Applet instead container). I use win7 with firefox 9. I have noscript installed but already whitelisted your site. If I have to find the culprit, will blame jre7 or my browser Smiley

Offline asphaltgalaxy

Junior Member


Medals: 1
Projects: 1



« Reply #6 - Posted 2012-01-02 18:43:41 »

And what about other applets? Is it ok with them on your machine?
Offline Grunnt

JGO Wizard


Medals: 55
Projects: 9
Exp: 5 years


Complex != complicated


« Reply #7 - Posted 2012-01-02 22:54:44 »

It looks good: the artwork is very colorful, and the animations are good-looking too. However, it stuttered a bit on my (admittedly not so recent) laptop. Perhaps it's generating a bit of "garbage"? Dunno, but the stuttering seems to happen like every second.

Offline Mads

JGO Ninja


Medals: 24
Projects: 3


One for all!


« Reply #8 - Posted 2012-01-02 23:31:59 »

Nice game! I had a little bit of problems wi/ the speed at which blocks drop when pressing down - I'd like it just a little bit faster.
Also, there might be a problem with the timing of this.. Maybe it's just me.

I beat the highscore by one point, by the way.  persecutioncomplex

Offline ReBirth
« Reply #9 - Posted 2012-01-03 10:41:07 »

@OP
other applet work fine, all game on java4k, ludum dare and my own. I cleared my browser cache and it works. Weird that it has something to do Cheesy

@Mads
Ienvy for your free time Smiley

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Shazer2

Junior Member


Medals: 3


Aspiring developer.


« Reply #10 - Posted 2012-01-03 10:45:33 »

Very well done! I'm impressed. This is inspirational for a beginner like me!

~Shazer2

"When you want to be successful as bad as you want to breathe, then you will be successful." - Eric Thomas
Offline asphaltgalaxy

Junior Member


Medals: 1
Projects: 1



« Reply #11 - Posted 2012-01-03 17:27:55 »

Thanks all of you! Really appreciate every response! It's so motivating. Smiley

@Mads
Quote
I beat the highscore by one point, by the way.  persecutioncomplex

Hmm... I also noticed hi score with max integer value and your name by side. Smiley How did you do that, what were your steps? I mean is it so easy and natural to insert fake score? Sure, I did nothing to prevent that, but there wasn't form like 'input your name and desired high score', anyway someone should at least know, what page to call. I read some threads here about this topic and all I understood, it is close to impossible to make 100% secure functionality. I really need your opinion.

@Grunnt
Quote
However, it stuttered a bit on my (admittedly not so recent) laptop. Perhaps it's generating a bit of "garbage"?

Tested on Celeron 1.4 single core old notebook with Win XP and there was less than 25% cpu usage and memory usage was like constant. So, how could I check whats wrong?
Offline Grunnt

JGO Wizard


Medals: 55
Projects: 9
Exp: 5 years


Complex != complicated


« Reply #12 - Posted 2012-01-04 11:00:08 »

@Grunnt
Quote
However, it stuttered a bit on my (admittedly not so recent) laptop. Perhaps it's generating a bit of "garbage"?

Tested on Celeron 1.4 single core old notebook with Win XP and there was less than 25% cpu usage and memory usage was like constant. So, how could I check whats wrong?

I guess I was mistaken because I just tried it again and it went pretty smooth. Perhaps something on the background was causing the stuttering. Normally you can check for garbage generation using a profiler such as Oracle's VisualVM (http://docs.oracle.com/javase/6/docs/technotes/guides/visualvm/profiler.html).

Offline ReBirth
« Reply #13 - Posted 2012-01-04 14:29:42 »

Hi OP, you said that you took tutorial to draw the graphics. Mind to share any good one?

Offline asphaltgalaxy

Junior Member


Medals: 1
Projects: 1



« Reply #14 - Posted 2012-01-04 17:54:46 »

Since I used Inkscape for game board background, so sharing here links to some Inkscape tutorials:

http://inkscapetutorials.wordpress.com/suggest-a-tutorial/tutorial-list/
http://2dgameartforprogrammers.blogspot.com/

And exactly that one I used when was creating background for Fall And Blocks: Smiley
http://2dgameartforprogrammers.blogspot.com/2011/10/more-fun-with-gradients.html

Hope it helps!
Offline ReBirth
« Reply #15 - Posted 2012-01-05 12:49:17 »

Bookmarked! thanks for the links Smiley I never use Inkscape, hope it'll no hard to pratice them on Paint.NET.

Offline Grunnt

JGO Wizard


Medals: 55
Projects: 9
Exp: 5 years


Complex != complicated


« Reply #16 - Posted 2012-01-05 13:49:45 »

Actually, it's quite easy to combine InkScape and Paint.Net. For example, use InkScape to make a general outline, export it to a bitmap, and do the finishing touch in Paint.Net.

Offline ReBirth
« Reply #17 - Posted 2012-01-06 23:42:18 »

I downloaded the inkscape to make life easier Wink

Offline asphaltgalaxy

Junior Member


Medals: 1
Projects: 1



« Reply #18 - Posted 2012-01-07 10:12:00 »

That's cool! Now, waiting for results Smiley
Pages: [1]
  ignore  |  Print  
 
 

 
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!