What I did today

Really nice work. Clever for using circles to get around not having a grid. How many times will you recalculate pathing? Would be interesting to see if this method can handle unit on unit collision

[quote]Would be interesting to see if this method can handle unit on unit collision
[/quote]
Updating the collision map is very cheap and short paths are very cheap too, i might just try recalculating part of the path on collision or wait depending on what the unit is colliding with.

I could also merge paths if they overlap and then separate them again, but thatā€™s potentially complex.

I could take into account when paths are blocked and use that information in the pathfinder when polling for obstacles, the pathfinder can approximate the time it takes to get to a certain point so it can ask for obstacles in cell X at time T and pathfind with that, but thatā€™s again interfering with path optimization a bit, i would have to optimize paths simultaneously while pathfinding to get accurate times for that, but even then itā€™ll still be neither 100% accurate nor easy to implementā€¦

A good thing is that this game isnā€™t supposed to have infantry moving together with multiple tanks in a compact blob at full speed like in Star Craft, that would be suicidal, itā€™ll be more like an hierarchy of who makes place / stalls for whom. Vehicles will usually not move in a blob but in a line anyway and infantry can slip through the cracks and get shoved around, they donā€™t even need to be positioned accurately. The server doesnā€™t need to know where exactly they are getting drawn, they are behaving consistently as long as they are displayed to the player somewhere within X meters of their simulated position.

I donā€™t know a good solution right now ??? itā€™s a very hard problem to solve efficiently.

[quote]How many times will you recalculate pathing?
[/quote]
Often but i might use hierarchical pathfinding so i donā€™t spend so much time when recalculating is needed.

Great ideas. Maybe just do unit on unit collision between opposing players, or between stationary units and moving units, not moving on moving units. Most times stationary units are used for blocking. Blocking with moving units would not be expected by the player.

Thatā€™s a good start I guess. And I like those little Tiger tanks you have there. You always seem to be doing WWII stuff, huh? :wink:

Yesterday I realized that it wouldā€™ve been a good idea to decouple the game logic and the rendering in my game. The problem with this is that I do all the work on the JavaFX thread, and that slows everything down, e.g. the profiler shows that some ā€œwaitForRenderingToCompleteā€ method takes half of CPU time :o (with GPU load being very low, so it definitely is the game logic that blocks the rendering). Then I tried to make it two threads, but that didnā€™t work as it should because of my messed up code. Iā€™ll leave it like it is and hope that people who play it have fast enough CPUsā€¦

But Iā€™ve learned and am still learning from my mistakes. Before doing my next poject Iā€™ll read Game Programming Patterns closely. It helps a ton for unexperienced programmers like me. And Iā€™ll make at least one prototype before starting to code the real game next time.

Cheers

P.S.: I definitely wonā€™t use JavaFX for a game again.

Where would I post JDialogue on here? The showcase or another subforum? Iā€™m not really sure what to do since itā€™s not technically a game, but it is a fully functioning program thatā€™s used for game making.

Post it on WIP games, tools & toy projects

I always figured that the WIP part was implied for all of those

Today I worked on parallelized map loading for my game. It always took very long to load maps (my reflection-based approach is actually slow, but anyway) and made debugging and testing uncomfortable. Now my idea was to split a map file into as many parts as CPU cores available on the system when loading it. This worked and it was already ~200% faster, however it turned out to be even faster when using a number of threads two times the number of CPU cores (now 300-400% faster than the serial approach).

Here is the output of a testing run with a few runs for each method. You can also see the JVM HotSpot in action for both methods (itā€™s getting faster):


Serial: 1.227s
Parallel: 0.847s
Serial: 1.626s
Parallel: 0.198s
Serial: 0.675s
Parallel: 0.174s
Serial: 0.636s
Parallel: 0.145s
Serial: 0.614s
Parallel: 0.130s

Does anyone have an explanation why itā€™s faster to use ā€œnumber of cores x 2ā€ threads? Thereā€™s no hyperthreading involved on my CPU. Also had a look at it in the profiler, but couldnā€™t see anything suspicious.

Cheers

Could be the way cpus often have 2 logical cores per one physical core. Your ā€˜number of coresā€™ probably gives physical cores, not logical cores.

What are those maps exactly? How did you load them before?

As I said, on my CPU the physical cores are equal to logical ones. I retrieve them with

Runtime.getRuntime().availableProcessors()

They are text files with my own, custom markup language (similiar to JSON), and they essentially contain a list of objects of the same type. These objects represent Java classes, and I can define the values for the variables of a certain class etc. Now I read that file and parse it, and then I create instances of the classes and set the variables with the Java Reflection API. That is slow already, and my parser is not the fastest either.
Example for one entry in my entity template file:


[Entity] {
   name="Jumper"
   components={
      [PhysicsComponent] {
         mass=1.15
      }
      [MovementComponent] {
         maxVelo=2.2
         maxAcc=0.1
         jumpPower=1.4
      }
      [CollisionComponent] {
         box=[Hitbox] {
            width=32
            height=40
         }
         mask=All
      }
      [RenderComponent] {
         ...
      }
      ...
   }
}

Now when I had a few thousand entities in one map, the parser could only use one CPU core, which was inefficient. So I split the list of entries and and create threads of which each one parses a part of the list.
That is how I load my maps :slight_smile:

Cheers

Working on Scene Editor ā€¦

  • Fixed Undo Bug
  • Added UndoableEdit for Layer Deletion
  • Fixed some Layer Action logic
  • Started fixing Copy Layer logic and linking Layer Creation UndoableEdit to it

New DEMO available! (july 19, 2018)

http://button.indiedb.com/popularity/medium/games/65990.png

or

@beeaware
Youā€™ve been aā€¦ Busy little bee ::slight_smile:

Iā€™ve finally gotten around to implement my UI library into my IDE I was working on a few months ago:

http://magaimg.net/img/5reo.png

Coming along well!

[edit]
Anyone know a nice source of 32x32 application icons? The ones Iā€™m using are only 16x16 so they donā€™t look great on higher resolutions.

Lolā€¦I really got to publish this ā€˜vehicleā€™ on Steam soon, time to move on to something else.

Youā€™ve been busy as well, are you actually creating your own IDE?

@orange451 Ofc free says nothing about the license.
https://commons.wikimedia.org/wiki/Crystal_Clear


http://www.iconarchive.com/commercialfree.html

https://icons8.com/iconizer

If you have a *buntu Linux installed, you can find loads of icons in ā€œ/usr/share/icons/ā€¦ā€, all application icon related stuff you could possibly want. I usually search for keywords in filenames in all of the folders recursively to find what I need. Otherwise have a look at e.g. the Xfce icons https://github.com/shimmerproject/elementary-xfce. I didnā€™t find a better resource for now, but all the icons of the free desktop environments are under some kind of open license, so you could try to do some research in this direction.

Cheers

My friend gave me 21 PS3 games, and I assumed PS4 could play them. Nope. So I found a PS3 on CraigsList for 50 bucks, with 2 games included. Great deal! (He hooked it up to show me it works first).

The application Iā€™ve been working on, ToneCircleDrone, has data files with a .tcd extension. I decided it would kind of make sense to allow clicking on those files to open the application with the associated data, before putting the app up for sale. Agreed? Thatā€™s not something that should wait for a later release.

Not sure anyone needs to hear about the various mistakes made along the way. It took about a week to accomplish, with debugging.

Today, I plan to install Java on my wifeā€™s Windows 7 machine. The only way to make an x86 version apparently is on a machine with x86 Java, and my desktop and laptop are both 64-bit Windows. Am hoping the steps that I wrote for JLinking and packaging work without a problem on her machine.

Thereā€™s the Material Design icons which are Apache licensed - https://material.io/tools/icons/

Which makes me wonder, why are you looking specifically for 32x32? Why not scalable? Could use your existing font rendering?