[Java] Pixavive Alpha (derived from Demo concept I was working on.)

monoVertex

I'm back!
Reaction score
460
What I meant is that Java classes in general, either from the core libraries or 3rd-party libraries, favor really long names and methods for every possible situation and such. While I agree with building classes as versatile as possible, I am also a strong believer in making the basic case simpler and faster. That is a general rule when building an algorithm, but it also applies to the development itself. For example, when reading from a file, why do I have to do

Code:
BufferedReader br = new BufferedReader(new FileReader("file.txt"));
try {
    br.readLine();
} catch (e) {
    // whatever;
}

, when in Python I could do

Code:
with open(fname) as f:
    content = f.readline()

Of course, if you want to do some fancy stuff, you can do that with Python too, but the basic case is really simple to write and someone else understands that immediately. The Java code is bloated. And the case is similar throughout the language. Except when you have extensive Java experience and remember everything directly, you are dependent on the IDE to suggest stuff to you, which is something I dislike.

And with hype, I meant that I see a lot of people, including around me in college, that praise Java. While I agree that it is a powerful language, in my opinion a language should be complex only when using the powerful stuff, not in every simple line of code.

I have to admit, I saw you as a Java fan, too :p. Why didn't you try doing your project in Python? It's also cross-platform, maybe even more than Java. I also have to admit that I don't have libGDX knowledge, so I am not trying to argue this point, I was simply curious what made you decide on Java versus other cross-platform languages.
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
I actually hate java. There is so much wrong with it and which I dislike.
But I know it very well, or at least I would say that. I worked a lot with it over the course of the years. I have know quite a few libraries in and out and I have made a few projects with it.
I use it because I know it.
Besides that, its easy, its clean, its popular, well documented, there is lots of good IDE's which support it and its used extensively by people from all around the world.

Of course I could work with some other languages. But I already started with java then why not continue.
 

monoVertex

I'm back!
Reaction score
460
I think it's a healthy attitude to keep learning new stuff, outside your comfort sphere. Of course, you can keep up with updates within the Java domain, but I think you just limit yourself. Especially if you hate the language.

Anyway, we've gotten way off topic, sorry for that, Tom.
 

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,632
It's okay.

It's just that I won't be getting new ideas from you guys. :(

*tom_mai78101 is suffering from creativity block*
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
What kind of ideas are you actually looking for? What exactly do you already have and what is your goal? What is the timeframe and how much work are you actually willing to put into this?
 

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,632
1. Any ideas are sufficient, regardless of it being mediocre, lame, or awesome.
2. I have an RTS planned out. I only have this demo, along with the source code provided, completed. The goal is to make it as a game, according to test-driven development rules that were set before the beginning stages of programming.
3. Timeframe: 8 months or more. As much work I can get from my schedule while in the police force. Highly unlikely that I get at least 2 hours or more of work from this.
 

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,632
Update!

This is a brand new demo, reworked after considering some of the feedbacks gathered here.

Controls:
Use the left mouse button and click anywhere to place down a colored spawn point. Every other click will change the spawn point team color to either green or red. When the spawn point reaches maximum color intensity, it will spawn out a moving unit that will move towards the enemy's spawn points.

Do you have any inspirations from this demo? If yes, can you provide feedback that describes your inspiration? Thank you.
 

Attachments

  • demo_v0.02.jar.zip
    24.4 KB · Views: 357

Accname

2D-Graphics enthusiast
Reaction score
1,462
Do you really want to make an RTS game out of this?

I could come up with some ideas if you like:
  • User can build collectors to harvest some kind of resource
  • User can build factories to produce units (different types of factories construct different units)
  • Production of collectors and factories costs resources
  • User can set rally points, all constructed units will go to the rally point and attack any enemy units on their way
  • The goal is to destroy the enemies factories and collectors
That would be something very basic. From there on you could try to make it unique in some way.
But I would definitely say, that you need to improve the graphics at least a little bit. I am a big supporter of simple graphics, but just colored quads is a little bit too simple even in my book.

Edit: By the way, I have been toying around a lot with OpenGL and OpenAL lately, as well as several other useful tools for game developement.
If you would like to test some frameworks I have build then I would gladly provide you with the .jar files.
 

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,632
I could come up with some ideas if you like:
  • User can build collectors to harvest some kind of resource
  • User can build factories to produce units (different types of factories construct different units)
  • Production of collectors and factories costs resources
  • User can set rally points, all constructed units will go to the rally point and attack any enemy units on their way
  • The goal is to destroy the enemies factories and collectors
That would be something very basic. From there on you could try to make it unique in some way.

Thanks, just what I wanted.
  • Factories and resources be go together. Toying around with these two may help me find novel ways of organizing resources.
  • If I were to set rally points, it would mean I have to consider collision detection and box detection methods based on the pixels. More researching may be imminent.
  • Most RTS rely on destroying enemy factories and collectors. What if there's no end game?
Reading your feedback, I now see great new ideas, spurring out from my head. I love this.

But I would definitely say, that you need to improve the graphics at least a little bit. I am a big supporter of simple graphics, but just colored quads is a little bit too simple even in my book.

This is the most important part that I neglect to improve. I really am not good with graphics, and how to import them after building them is a daunting issue I can't do without anyone's help.

I'm lost when it comes to this, and because of that, I don't know where to begin, when all I can do is pixel manipulations.

Edit: By the way, I have been toying around a lot with OpenGL and OpenAL lately, as well as several other useful tools for game developement.

If you would like to test some frameworks I have build then I would gladly provide you with the .jar files.

I'll be gladly accepting that offer. Anything from more experienced developers are welcome.
 

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,632
Capture.PNG


Demo v0.03:
+Added an end game to Demo v0.02.
+Made sure that units (called Units) go for opposing team's units first, before attacking the spawn points (called Buildings).
+Included source codes. Note that some classes are deprecated from Demo v0.02. Ignore those for now.

Game over if a team (red or green) has lost all spawn points. Screen will fade to white, signaling game over. By then, just close the program, there's no Easter eggs after that. See how long you can put down buildings until it's really game over, by clicking in the battlefield (grayish blue area).
 

Attachments

  • demo_v0.03.jar.zip
    25.8 KB · Views: 403
  • demo_v0.03.src.zip
    33.6 KB · Views: 398

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,632
Update [Demo 0.04]:
  • Removed the red side/green side switcheroo scenario. (Trying to maintain both sides staying alive).
  • Added survival mode scenario. (See below description on how to play.)
  • If you win/lose, the game will fade to the winning color, then fade to black. After that, the game restarts.

Survival Mode - How to play:

Every 200 ticks (About 0.2 seconds), the game will randomly spawn a red spawn point (called enemy spawner). Your task is to eliminate all enemy spawners (they are marked as red), by putting down green spawners (green dots). Of course, the game offers you at least 1 green spawner for you to have time to put down your own spawners.

For balancing issues, I put in a timer, so that you can't mass spam green spawners and expect to win easily. But the timer itself is forgiving, so I'm sure you can handle it.

How you try implementing your strategy to defeat the enemy is up to you. Since they are completely randomized, there are no known strategies as of yet.

Good luck completing it.

Of course, you may also view the source code. I should expect very few people interested in my ugly codes.
 

Attachments

  • demo_v0.04.jar.zip
    27.2 KB · Views: 434
  • demo_v0.04.src.zip
    36.2 KB · Views: 360

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,632
Uploading an incomplete and broken source code.

+Removed the working game logic.
+Changed the source code around.
+Added main menu (WIP)

This is temporary. I'm destroying my hard drive. peace!
 

Attachments

  • Demo.zip
    30.5 KB · Views: 395

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,632
GRI56Wn.png
(tm)

Major Update - Pixavive Alpha ("Pixel Survival" portmanteau)

+ Alpha Release! It now looks like an actual game.
+ Added Logo, no longer called "Demo blahblahblah". It finally has a name!
+ Added Options Menu.
+ Added 4 A.I. difficulty modes.
+ Added Heads Up Display, currently showing the spawn build cooldown.
+ Added Main Menu.
+ Fixed all temporary bugs found in the last upload. (After destroying hard drive.)
+ Fixed source code mess-ups. Cleaned up and ready to go.

Will do in the future:

+ Add a tutorial mode.
+ Add some more options.
+ Add sounds. (Learning how to implement sounds via Java.)
+ Add more different types of units.
+ Probably start considering collision detection/response mechanism for pixelated objects.
 

Attachments

  • pixavive_v0.05.jar.zip
    32.9 KB · Views: 369
  • demo_v0.05.src.zip
    66.4 KB · Views: 396

Accname

2D-Graphics enthusiast
Reaction score
1,462
Well, it sure is better then before.
The art style for the menu is okay, I personally like it.
But for some reason the title text is anti-aliased while the text for the menu options is not. Maybe you want to fix that.

The game itself, however, is quite boring. Perhaps you should try to incorporate some more creative and challenging game mechanics.
 

monoVertex

I'm back!
Reaction score
460
I think the first thing that would improve the gameplay would be obstacles. Provide ways in which the player can actually be strategic. At the moment the only strategy is to not leave your units isolated.
 

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,632
Now this is what I wanted, feedbacks everywhere.

Well, it sure is better then before.
The art style for the menu is okay, I personally like it.
But for some reason the title text is anti-aliased while the text for the menu options is not. Maybe you want to fix that.

Ok. I'll redraw it in Photoshop.

The game itself, however, is quite boring. Perhaps you should try to incorporate some more creative and challenging game mechanics.

That's on the to-do list. Thanks for your feedback.

I think the first thing that would improve the gameplay would be obstacles. Provide ways in which the player can actually be strategic. At the moment the only strategy is to not leave your units isolated.

Yes, it does need one badly. Current code is unable to obtain entity data from the game after it has been created, so this needs to be fixed first before I can start adding anything new. It's on the future to-do list for now, listed above along others. Thanks for your feedback.
 

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,632
Bugfix:

+Fixed bug that causes it to hang if there aren't any valid random positions for the AI to put down spawners at.
 

Attachments

  • pixavive_alpha_v0.05a.jar.zip
    33.9 KB · Views: 352
  • demo_v0.05a.src.zip
    67.7 KB · Views: 358

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,632
Update:

KNOWN ISSUE: Added pathfinding AI, causes significant lag, and unstable gameplay.

+ Added A* and concurrency. I suck exceptionally at concurrency.

Worst update ever. Period.

If anyone could teach me how to debug Java concurrency and profiling, I'll be glad to give it a read. This is the best I can do. You may go ahead and give the source code a read. I'm pretty sure that this game requires a MAJOR rewrite in order to fully implement A* pathfinding at a large scale, possibly having to resort to other methods I haven't touched upon yet.

The source code is now messy as fuck, along with the integration of the A* pathfinding algorithm. I bet you, you can't even read 10 lines of code before you give up and say, "Man, it's ugly."
 

Attachments

  • pixavive_alpha_v0.06.jar.zip
    43.9 KB · Views: 397
  • demo_v0.06.src.zip
    86.8 KB · Views: 350

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,632
Downgraded. It's now Pixavive v0.05b.

+ Reverted the new AI pathfinding algorithm, it's not worth it.
+ Kept in a new data structure for future improvements.
 

Attachments

  • pixavive_alpha_v0.05b.jar.zip
    36.9 KB · Views: 391
  • pixavive_v0.05b.src.zip
    72.4 KB · Views: 364

iPeez

Hot food far all world wide!
Reaction score
166
Yo man, how do I even open this? You also make neat Quick Links

oh nvm I found out

Ok What the heck am I doing? What are the dots? Where is the enemy, and how do I make them follow me?

Ok ok I get it, hahah.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top