Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 21 Apr 2011
Offline Last Active Oct 03 2016 11:12 AM

#5250130 Turn Based Game AI processing display

Posted by on 01 September 2015 - 09:58 AM

Its mainly for debugging purpose.


Seeing NPC behavior whilst playtesting is great.


Its also great debugging tool

#5249983 Turn Based Game AI processing display

Posted by on 31 August 2015 - 01:51 PM

Thank you for your answers!

Ill look into them more carefully.

You don't need to make it complicated by introducing a separate planning thread, I think. Maybe I am misunderstanding, do you want to display, visually, what the AI could do in the future? 

Its rather simple on my i end, I go, enemy faction X, Y, Z goes.


Why i was thinking about separate threading is because AI has to think. Chose from all viable paths (cells), calculate most optimal one or use random roll if needed, go there, look arround for other npcs, identify their faction, chose the target if needed, attack it.

And i just need to highlight every option, because later on i plan to make combined group AI.

(A) checks all the nodes around (map cells get highlighted).

(A) scans for surrounding pack members in his sight (highlights the members)

(A) initiates question to (B), asking what he thinks they should do next (highlighting (B), instead of ©)
(B) checks all the nodes around (map cells get highlighted)
(B) scans for surrounding pack members in hit sight (highlights the members)

(B) tells (A), that they need to kill © (both get highlighted)

(A) moves close to © (highlights)

(A) attacks © (highlights)

(B) attacks © (highlights)


And its all done in one turn.


DishSoap example is good, its just it will take damn a lot of time to make queue and cases for different possible scenarios.


Thread makes it easier, you just highlight the thing you need, and pause the thread for a while.

#5249619 Turn Based Game AI processing display

Posted by on 29 August 2015 - 05:27 PM

Good evening,

I am developing Turn Based Game and i noticed need for graphical representation for AI actions.

- Highlighting possible movement locations

- Highlighting a path to a location

- Moving through the path

- Selecting possible targets


Displaying npc "pack" behavior later on and etc.


So possible paths are:
1) AI action queue plan, so that AI would make action every hundred milliseconds. And GPU would not be frozen.

2) Place AI actions into separate thread.


I have tried (2) and its working quite well and it makes things done FAST. ALTHOUGH, code wasn't meant for multi-threading.

Thou architecture ensures that only ONE "control" at a time, can manipulate data.
Whilst AI is making its turn, player can not change any data, apart from interacting with UI, which is not accessible for AI.

But gameplay field is drawn from the data, AI is accessing.


Maybe someone has any experience with it? Or has any better long term and short term solutions. 

#5196413 Question about Vector graphics artstyle

Posted by on 05 December 2014 - 03:53 AM

Thanks a lot guys!

Got my answers! :)

#5196309 Question about Vector graphics artstyle

Posted by on 04 December 2014 - 01:27 PM

Well, not really :(

But thanks for the resource!

By serious i mean something like this...
Pokemons are "soft" and "cute", but by changing art style you can make it look more "serious" and "freaky".





By using right art style you can transform "kids show" to "freak show".

But can you create "freak show" with vector graphics?

#5141460 Stench of poor stories and how to cure them?

Posted by on 23 March 2014 - 09:54 AM

Good afternoon lads,


I'll be straight forward - how do people notice difference between good story and utter crap and how to avoid getting into latter category?


For example, you sit down and read "Spawn" comic book, without rose tinted glasses. You can clearly notice its a story that has quality in it.

Try googling for fanfic. It stinks! Even with the best grammar and accurate use of characters, even without bullshit powerups - it sucks!


It's not only that. Another example - anime.

Most of anime are based on manga. Sometimes Anime show different stuff from manga. Those are called fillers.

Fillers have good animation... but story stinks!


Maybe there are some "key points" in "non crappy story"?

#5105759 Game timer dilema

Posted by on 30 October 2013 - 02:55 PM

Good evening,


I have a simple dilemma, i cannot solve myself. Or rather, make up my mind.

I am making a game for both desktop and android devices. In my first game i was using "fps based movement". Which resulted game to run faster on some devices, due to the fact that not every device was running it on 60 fps.


I don't want to make same mistake, because this time it's not a puzzle game and its more action orientated.

But "distance traveled per time" is double edged sword. If device lags for 3 seconds, i might get dead.


Other option i thought of, hardcap FPS to 30. But then... how do i manage stuff like "buffs" and etc?... base them on time or frames passed?


Anyone could give me advice?

#5047944 Which is easier to program C# or Java?

Posted by on 29 March 2013 - 04:24 AM

Go for C#.


I make food from C# and use Java for hobby projects.


Personally, i hate how Java handles event listening and etc, on UI level. Writing a shitton of code instead of just passing one delegate.

+ Visual studio is way better than Eclipse, of course, Eclipse is the BEST (IMHO) free IDE out there.

#5023570 Version control for begginers

Posted by on 20 January 2013 - 12:48 PM

If you plan to work in a company as a developer, eventually you'll be forced to use SVN. So i'd suggest sacrificing few hours to studying SVN's.

At work we use Team Foundation Server, Microsoft crap for Microsoft related stuff.

At my hobby projects i use Java, don't want to be slave to one language. Question tho, does anybody know good and easy to set up SVN for Eclipse?

#5016160 Strange bug in Release mode

Posted by on 31 December 2012 - 02:01 PM

I haven't used C++ on VS2012, only C#, but maybe solutions are handled the same way.

Are you using two or more projects in your solution, where one project contains node and the other one, the code your showing? If yes, check compilation options for those projects.

I recently had the same issue at work. Two projects set to "Any CPU" mode and one goes for "x86". Switching it to "Any CPU" didn't help either, so i usually switch all projects to x84 and make sure they are built on compilation

#5015860 What to do first? Making web-based game

Posted by on 30 December 2012 - 03:20 PM

Take a ton of paper and a good load of pencils and start writing and drawing.
When all the questions are answered in written form, start coding.

Web browser games usually are something with RPG or TBS (or even RTS). You can do the gameplay model in real life, on paper with matches, as units and etc.

What i am trying to say - Test out the model in real life before sitting down and coding. Will save you lots of time.

#5015142 mysql database

Posted by on 28 December 2012 - 01:33 PM

i thought SELECTs were like looping through the entire database, well all your help should help me be on the way, now i suddendly dont feel stucked, and i can go on and keep working on my project, thanks a lot

I would advice befriending joins. Main workhorse of RDBM.


--For example, select all character names that have healing potions, by item id


--by name

WHERE IT.ITEM_TITLE = 'Healing Potion'


--Select all character names that have no items overall

I wont explain difference between joins, so you would go and study them on your own, but have in mind, you shouldn't abuse * to much, select only whats needed and not everything. Don't be afraid to use indexing and avoid doing searches by text as much as possible on classified fields. If you are looking for a Sword of Uberness don't go for "WHERE X.NAME = 'Sword of Uberness'", its slow, make sure application passes classifier ID, because searching for 1337 on indexed not null int field is far faster that doing varchar search.

#5014718 mysql database

Posted by on 27 December 2012 - 10:05 AM



for example


123, TYPE.RESTORE_HEALTH, 15 (over 15 seconds), PERCENTAGE, 15%


when you pool out effect, you simply check its TYPE, and then do needed stuff with VALUES.



Well, that's at least what i usually do.

#5014436 mysql database

Posted by on 26 December 2012 - 11:01 AM

Well with items it could be like this.






Table CHARACTER_ITEMS { ID, CID, IID, RANDOM_FIELD_A, ..., RANDOM_FIELD_N } (where CID and IID are foreing keys from CHARACTER and ITEM)


If you're going to use MySQL, i'd advise you to read some literature on RDBM.


Here's a fine example



#5014434 Game Multi-Threading

Posted by on 26 December 2012 - 10:49 AM

I had a similar problem when i was starting out. I didn't comprehend how its possible to do everything in a loop, because frankly, something has to catch those damn KeyPress when your software is drawing, right? So i had keyboard events in one thread, drawing and logic in another, and i was using GDI with Windows API.


Well worry not. Since you're using Java, try libraries like LWJGL ( http://www.lwjgl.org/ ), they have a good set of tutorials that will get you started.


You don't need multithreading for this. Just search for some gameloop explanations.


But the most standart thing is



- Filter Keyboard/Mouse input

- Do logic, like move units or select unit

- Draw



I additionally like to create one additional class i call "DataSet", where i store all information, that is being used by Graphic, Logic and Input classes