Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Program Announcements / Pig AI (Based on Minecraft pigs)

Author
Message
C0wbox
14
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 19th Jan 2011 06:04 Edited at: 20th Jan 2011 13:04



Hai, I'm sorta in the middle of waiting for a load of models and a shader to get done before I can do anything to WOR, so I decided to code a silly project just for fun.

I'm quite interested in AI and if I had all the time in the world I'd set out and make a neural brain in DBP (but it'd probably run like crap and there'd be no point) but anyway, I made this based on a cell that responded to objects in its universe in an inquisitive way but has no purpose or motives to make it true intelligence. (So it truely is just artificial intelligence.)

After perfecting the cell and making it do what I wanted I decided I'd model a Minecraft pig in Deled and stick that in in place of the cell. Then I made it do that stoopid thing they do in Minecraft where they just randomly look at you then carry on with what they were doing. (Oh and I made it jump around too.)

Whatever, this PA doesn't really have a point, it's just fun and cracks me up watching the stoopid lil pig jumping around then randomly staring you out and carrying on again. xD

It's open source so you guys can all pick at my code and tell me how inefficient it is (I wasn't exactly trying very hard) or you can just watch a stoopid animal move around a plain.

Click this stoopid pig to download:


Use WASD to move the camera and place stimuli with the left mouse button. (Originally there were going to be different type of stimuli related to different actions and stuff (hence where there is CLASSOBJECT.TYP in the code, but it's not actually being used in this version))

Oh and here's a screenshot so you don't just think I'm being a silly and piggybacking on Minecraft's success !


Van B
Moderator
17
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 19th Jan 2011 08:38
Hehe, Minecraft pigs crack me up. Maybe you should make a pig farm mini-game, raise pigs, produce quality pork for sale in chain supermarkets etc.

Health, Ammo, and bacon and eggs!
C0wbox
14
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 19th Jan 2011 09:12
xD! That'd be something I could easily see myself doing if these models and shader take too long.

baxslash
Valued Member
Bronze Codemaster
13
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 19th Jan 2011 14:08
Nice. I like pigs.

I'd like to see this develop as a fun little game. Maybe you have to defend your pigs from a wolf and keep them away from farm machinery and stuff too.



mr_d
DBPro Tool Maker
13
Years of Service
User Offline
Joined: 26th Mar 2007
Location: Somewhere In Australia
Posted: 20th Jan 2011 04:46
@C0wbox
From the other Minecraft thread - I didn't want to reply there as this wasn't really part of that discussion...); Yes, I was talking about your pig It just sort of sits there and doesn't do anything. I place the stimulus blocks around and move around, but still nothing... Maybe it just doesn't like me

(\___/)
(='.'=) Copy bunny into your signature to
("_(" help him gain world domination.
C0wbox
14
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 20th Jan 2011 05:55
@ mr_d
Well, it's all based on 1/1000 random chance events.

He seems to sit there for quite a while on mine too before moving, but if you leave him he'll start hoping around.

(I'm not sure why he seems to stand still at the start :S)

mr_d
DBPro Tool Maker
13
Years of Service
User Offline
Joined: 26th Mar 2007
Location: Somewhere In Australia
Posted: 20th Jan 2011 06:39 Edited at: 20th Jan 2011 06:40
I waited longer this time and he finally started to hop around and move to the stimulus boxes. very cute
Why do you have so many polys though; it seems a little excessive considering it seems to be made with just a handful of cube objects?
Anyway, it's a nice little experiment

(\___/)
(='.'=) Copy bunny into your signature to
("_(" help him gain world domination.
C0wbox
14
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 20th Jan 2011 06:54 Edited at: 20th Jan 2011 06:58
It really shouldn't have so many polygons but I'm guessing because of the shadow shading it messes up the polycount.

Yeah I just checked it, if you turn the shadow shading off it only adds 12 polygons each time you place a stimulus (6 faces, 2 triangles per face) but for some reason with the shadow shading on it adds 108 polygons per cube.

Oh well, if people don't like it they can just edit it - I've already added windowed mode and centred the mouse because they were annoying me. (The wonder of open source projects. )

baxslash
Valued Member
Bronze Codemaster
13
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 20th Jan 2011 10:57
I only had to play around with the fps a little to get this working as I expected (ran too fast here).

I really like the way the pigs just kind of stand around a bit before actually doing something... it's more 'realistic' behaviour. Ever been to a farm and seen pigs running around all over the place? Normally they just eat and stand around. Piglets are more active (probably because they don't weigh so much).

Piglets / an aging process might be a nice addition but I guess it's turning into a Sim that way...

C0wbox
14
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 20th Jan 2011 11:09
xD It's open source, everyone should just add to the code and upload a new version for each suggestion. !

baxslash
Valued Member
Bronze Codemaster
13
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 20th Jan 2011 11:26
Quote: "It's open source, everyone should just add to the code and upload a new version for each suggestion."

OK, I'll have a look at adding a wolf when I need a break from my current project/s. Nice idea making it open source.

Threeworlds manager
9
Years of Service
User Offline
Joined: 10th Mar 2011
Location: UK
Posted: 2nd Apr 2011 13:39
ive tried the pig but it wouldnt work! please can you check the download file.

also it would be great if you could make some minecraft blocks!

-TWgames-
Threeworlds manager
9
Years of Service
User Offline
Joined: 10th Mar 2011
Location: UK
Posted: 2nd Apr 2011 13:48
cna you please check the file cause the entity didnt work!

looking for free models
C0wbox
14
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 2nd Apr 2011 16:36
?

Doesn't work? - In what way doesn't it work?

And I wasn't trying to make minecraft when I made this, I was just trying to recreate some funky pig AI. - If you want minecraft blocks you should go to this thread.

mr_d
DBPro Tool Maker
13
Years of Service
User Offline
Joined: 26th Mar 2007
Location: Somewhere In Australia
Posted: 2nd Apr 2011 16:49
i suspect that this is because of the windows 7 sp1 problem that causes most (if not all) DBP compiled apps to fail.
the fix was put in and available in the latest v7.7 RC7 download.
Looks like a lot of people are going to have to recompile their old apps...

C0wbox
14
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 2nd Apr 2011 17:06
!!!!!!!!!!

Well, I might get round to recompiling eventually... xD

Login to post a reply

Server time is: 2020-09-18 09:06:55
Your offset time is: 2020-09-18 09:06:55