The engine used to build this game was a once-off creation, designed explicitly to run this particular title. This is not a real game engine, this is a GENERIC category.

A game run on an engine built for a few games (a game series, etc.), but not being clearly known or featured, should be assigned to Unknown engine.

Latest Media

No images, videos or audio files have been added to this gallery. Join now to share media with the community.

Blog RSS Feed Report abuse Latest News: Crowd Mechanics and Pathfinding (Part 1/2)

About Ultima Ratio Regum with 1 comment by UltimaRatioRegum on Jul 5th, 2015

This week I’ve been developing the crowd mechanics, and it’s going well, but first we need to talk about how exactly I need this to work:

We have two levels of resolution: the map grid the player is walking around on, and then every other map grid (in the 250×250 tile world map) which is not currently loaded. Therefore, any NPCs who are important but are not currently spawned must be tracked by the game when they’re on a non-loaded world map tile. This, of course, gets very complicated when you have an important NPC start on the loaded map tile the player is walking around, and then step off that map tile onto another… and then how do we track them over, say, 50 turns if the player THEN decided to follow this important NPC onto another map tile, spawning that tile (which the NPC has been walking in, even though it hasn’t been spawned)? Well – for the time being we aren’t worrying about that, although I think I have a good solution. What I’ve been doing this week is getting the standard crowd spawning and walking around sensibly in city districts, which means Lower-Class, Middle-Class, Upper-Class, Military, Market, City Centre, and Religious districts (docks and castles are still not spawning; castles will be coming 0.9, and docks either 0.9 or 0.10 depending on how development plays out).

I tried a few systems last week where NPCs could walk freely around the map without paying attention to the roads, and this ran into two issues. Firstly, having 100+ NPCs moving at once was necessary for the city districts to not feel like a ghost town (even if I made sure the game slyly spawned/de-spawned NPCs around the player to give a false impression of greater density) and this, on 200×200 maps, was beginning to cause minor performance issues; secondly, it just didn’t look very interesting, and there didn’t seem to be any real method or deliberate action to what NPCs were doing. If you trailed them until they hit their target location, they’d just then choose another location, and repeat.

So, this new method had three logics: firstly, to create a form of pathfinding which doesn’t actually need the game to calculate paths to reduce CPU usage; secondly to make NPC movement seem more deliberate; and thirdly to allow NPCs to “path” (or rather, fake-path) towards the gates at the edge of cities, and thereby withdraw themselves from the map if the player trails them long enough, rather than just continuing to identify new locations on one map which they are allowed to travel between. So, I got to work.


The first step (above picture) was to identify areas of the map which a) any NPC could walk (light green), b) which any NPC could walk on and which were curves in the road which the NPCs would have to stop walking straight to traverse (yellow), and which only certain NPCs would be allowed on (dark green) for each of the seven current city districts. There are also some areas of the map which aren’t roads which are blocked to some NPCs (like the courtyard in a mansion, for example), but those aren’t integrated just yet. I created this secret road map, got NPCs spawning on roads, wrote a bit of code for them to be able to identify another road coming off the first road, and let it run.


The first trials would up like the above picture. NPCs spawned on roads, and could sometimes path correctly… but they were always looking for other branches of the road networks they could move onto, but seeing parts of the road they were already on as being a “different” road, and therefore they kept flicking uncertainly back and forth between hundreds of subjective “roads” which, to a human player, would be obvious.The next step was to add a road_direction variable (basically the same as the player’s facing variable) where they keep track of what direction they have been moving, and they can’t read a “road” into their current direction, or their opposite direction, and thus will only detect new roads to explore if those roads are at right-angles. I then upgraded the code for the curves, creating hidden “lanes” for the NPCs to path along:


Which can be usefully compared to the overall pathfinding map for the same district…


…for when we come to NPCs moving off the roads.

Anyway. With that fixed, I upped the number of NPCs, and we got this wonderful image:


This looked cool, but it was a bit too dense, and they looked too similar all sticking to the road paths rather than diverting. We’ll be coming to the “going off the road” issue later in this entry, but the next step was to try and balance their spawning, de-spawning, and the density of the crowd. I firstly needed to make sure an equal number were spawning in front of the player and behind the player, and that some NPCs would spawn directly at the gates, even if those gates are in full sight of the player, and that they would then cut back across the player’s movement. Once that was done, and people were likely to spawn in front of the player, and behind, and at all different locations – and a full complement of civilians was spawned before the player even set foot into a map grid – we had something which looked much better. Here’s a gif of watching a wide range of people wandering around (for now it is spawning them with a random culture, rather than spawning an appropriate population distribution for each nation), and then after they’ve walked around for a bit, I decided to have a closer ‘l’ook at one of them and browse their clothing:


And here’s a comparable screenshot of “examining a passing NPC” in progress, which I have chosen simply because I really liked how this guy looked:


Two stages now remain: to ensure this works for all city districts (and then extend it to tribal settlements, fortresses, towns, etc), and to also make sure that sometimes NPCs wander off the road and go exploring on their own. The first is still in progress, but the second seems to be going reasonably well. The objective is to get the NPCs very rarely “breaking off” from the road and heading to other places on the map, either a randomly-selected location (which they are allowed to walk on), or a door they are allowed to go through (so a random “human” (‘h’) can path towards a random house in a lower-class or middle-class district, and then if the player sees them go through, that NPC is then associated with that house). Equally, we should have a small number of NPCs spawn off roads out of the player’s line of sight, and then path towards the roads, and then move towards road properly. When working nicely, this gets the majority of NPCs keeping to the roads, whilst very rarely we see one of the NPCs break off and head elsewhere, and if you follow them, they will either carve a path through the terrain or make their way to a door and then pass through – I’m clearly going to need some flavour text for “You see a person go through a door”, “You hear a door open and shut” if you’re right next to it but don’t actually see them go through, etc (whilst making sure this doesn’t get obnoxious and it doesn’t fill up the message log). As was suggested in a previous thread, I’m also going to add lots of flavour text when you enter/exit buildings, but that’ll come later this release. I’m still finishing off the pathfinding to non-road areas, so that’ll probably come next week when I’ll likely have finished pathfinding (I hope) and have the remainder of that to show off, and possibly some other clothing too? See you then. In the mean time, you can keep up to date on my devlog, Facebook page, or Twitter!

Add game Games
SUM IDEA
SUM IDEA

SUM IDEA

Updated 44 minutes ago Released Feb 26, 2015 Single Player Educational

Swipe and swap your way through SUM IDEA’s 140 challenges of mental dexterity. 4/5 148Apps: "charming throughout, with visuals that keep you happy as...

JutsuOnline - A Naruto MMORPG (2GB Standalone)
JutsuOnline - A Naruto MMORPG (2GB Standalone)

JutsuOnline - A Naruto MMORPG (2GB Standalone)

Updated 2 hours ago TBD MMO Role Playing

A Naruto-Like MMORPG. Alpha testing phase is now Open! (2GB standalone client.) View gallery for infos.. Visit us at www.jutsuonline.co

BAZAAR
BAZAAR

BAZAAR

Updated 3 hours ago Released Jul 2015 Single, Multiplayer & Co-Op Arcade

A RETRO ARCADE GAME BOY-STYLED DE-REMAKE FOR 1 OR 2 PLAYERS - PC/MAC/LINUX

Conquest (RTS)
Conquest (RTS)

Conquest (RTS)

Updated 8 hours ago Released Dec 2012 Multiplayer Real Time Shooter

Conquest is a real-time, multi-player space warfare game that was originally written in RATFOR for the VAX/VMS platform by Jef Poskanzer and Craig Leres...

SUPER MEGA BEST CAT ADVENTURES
SUPER MEGA BEST CAT ADVENTURES

SUPER MEGA BEST CAT ADVENTURES

Updated 15 hours ago TBD Single Player Arcade

Colourful, retro twin-stick shooter. Battle unusual enemies ranging from washing machines to ice lollies. Explore a randomly generated maze - Hunt down...

Post comment Comments  (90 - 100 of 122)
Piemanlives
Piemanlives Oct 21 2010, 7:15pm buried:

(buried)

go be an *** somewhere else custom engines are engine are engines that are not ever re used or nut given a name or something like that so GET THE **** OFF MODDB

-5 votes     reply to comment
figalot
figalot Oct 23 2010, 9:07pm buried:

(buried)

Is that pointed at me cause sir if it is you must be the dumbest mother ****** ever.

-6 votes     reply to comment
Jok3r098
Jok3r098 Dec 11 2010, 2:15pm replied:

im sorry noone in this community has enough of a sense of humor to tell that was just a joke.

wasnt funny tho :/

+5 votes     reply to comment
kjfytfkytfyt
kjfytfkytfyt Dec 2 2010, 1:45am replied:

im sure it is, cause you are a *******. custom engine, is a engine that is really a place holder, because the people who put the game up either didnt name the engine they used, or whoever posted the game has no idea what engine it is.

+2 votes     reply to comment
figalot
figalot Oct 18 2010, 9:20pm says:

I actaully Created this engine, no joke

-3 votes     reply to comment
vahak11
vahak11 Aug 20 2012, 10:32am replied:

Really? because its not an engine.

0 votes     reply to comment
XManXHunterX
XManXHunterX Sep 1 2010, 9:29am says:

custom built for the WIN!

+3 votes     reply to comment
Nilghai
Nilghai Jul 2 2010, 12:11pm says:

18 pages of games with custom builts... that's awesome

+6 votes     reply to comment
nonenonenonenonenone
nonenonenonenonenone Jun 8 2010, 6:53pm says:

Can you make FPSs?

-1 votes     reply to comment
odysside
odysside Jun 8 2010, 3:53am says:

Why dont people actually upload the engines instead of using
"custom built"

-3 votes     reply to comment
leebarguss
leebarguss Jun 9 2010, 4:54pm replied:

Because a lot of these are built specifically to create the game. They have no names as they are not commercial.

+6 votes     reply to comment
Arvind
Arvind May 31 2010, 3:36pm says:

Best engine made ever. Look at the possible platforms!

+2 votes     reply to comment
Post a Comment
click to sign in

You are not logged in, your comment will be anonymous unless you join the community today (totally free - or sign in with your social account on the right) which we encourage all contributors to do.

2000 characters limit; HTML formatting and smileys are not supported - text only

Company
N/A
Contact
Send Message
Licence
Commercial
Release Date
Released Sep 2007
Engine Watch
Track this engine
Share
Community Rating

Average

9.4

309 votes submitted.

You Say

-

Ratings closed.

Highest Rated (11 agree) 10/10

Dumbledore Gets Killed By Snape.

Sep 6 2011, 9:58pm by pocketlint60

Embed Buttons

Promote Custom Built on your homepage or blog by selecting a button and using the embed code provided (more).

Custom Built Custom Built
Custom Built
Statistics
Rank
15 of 721
Last Update
1 day ago
Watchers
253 members
Games
7,368
News
8,714
Features
246
Tutorials
60
Reviews
38