[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,667
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,667
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,667
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: 361

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,667
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,667
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: 409
  • demo_v0.03.src.zip
    33.6 KB · Views: 402

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,667
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: 440
  • demo_v0.04.src.zip
    36.2 KB · Views: 365

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,667
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: 399

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,667
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: 375
  • demo_v0.05.src.zip
    66.4 KB · Views: 401

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,667
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,667
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: 357
  • demo_v0.05a.src.zip
    67.7 KB · Views: 362

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,667
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: 401
  • demo_v0.06.src.zip
    86.8 KB · Views: 354

tom_mai78101

The Helper Connoisseur / Ex-MineCraft Host
Staff member
Reaction score
1,667
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: 396
  • pixavive_v0.05b.src.zip
    72.4 KB · Views: 370

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.
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/
  • The Helper The Helper:
    Another bot invasion 493 members online most of them bots that do not show up on stats
  • Varine Varine:
    I'm looking at a solid 378 guests, but 3 members. Of which two are me and VSNES. The third is unlisted, which makes me think its a ghost.
    +1
  • The Helper The Helper:
    Some members choose invisibility mode
    +1
  • The Helper The Helper:
    I bitch about Xenforo sometimes but it really is full featured you just have to really know what you are doing to get the most out of it.
  • The Helper The Helper:
    It is just not easy to fix styles and customize but it definitely can be done
  • The Helper The Helper:
    I do know this - xenforo dropped the ball by not keeping the vbulletin reputation comments as a feature. The loss of the Reputation comments data when we switched to Xenforo really was the death knell for the site when it came to all the users that left. I know I missed it so much and I got way less interested in the site when that feature was gone and I run the site.
  • Blackveiled Blackveiled:
    People love rep, lol
    +1
  • The Helper The Helper:
    The recipe today is Sloppy Joe Casserole - one of my faves LOL https://www.thehelper.net/threads/sloppy-joe-casserole-with-manwich.193585/
  • The Helper The Helper:
    Decided to put up a healthier type recipe to mix it up - Honey Garlic Shrimp Stir-Fry https://www.thehelper.net/threads/recipe-honey-garlic-shrimp-stir-fry.193595/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top