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.

Dark GDK / DarkGDK Coding Challenges

Author
Message
Papples
17
Years of Service
User Offline
Joined: 19th Jul 2007
Location: Home
Posted: 1st Aug 2009 13:54
Oh and if anyone plans to participate just say so and at least the thread won't die . If we don't have any takers we can just let it die in peace.
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 1st Aug 2009 22:23
I'd love to participate in this one but other demands on my time are preventing it. I'm really trying to get back in the habit of spending some evening time working on my two primary game projects.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 2nd Aug 2009 06:43
I'll see if I can find the time to throw an entry together for this one, I've been following this thread meaning to enter all the time but never actually getting around to it lol.

If it ain't broke.... DONT FIX IT !!!
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 2nd Aug 2009 07:58
Damn, and here my only DGDK project (Cyber Wars: Last Stand) to date was this style of game!

Too bad it wouldn't follow the rules to use it, considering it uses media and... I made it long before the challenge was made, lol.


Aw well, I'll give it a go to make one from scratch without external media. Hope I can make it in time!


The one and only,


Papples
17
Years of Service
User Offline
Joined: 19th Jul 2007
Location: Home
Posted: 2nd Aug 2009 14:11
Thats good to hear. With the mention in the newsletter we could have a competition on our hands.

I'm going on holiday but I'll be back before the deadline to judge a result.

Have fun.
Crazy Programmer
AGK Developer
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Lost in AGK
Posted: 3rd Aug 2009 05:56
Im going to join the fun Will be a good learning experience.

Marvin the Magician by Soharix
http://forum.thegamecreators.com/?m=forum_view&t=141496&b=8&p=0
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 6th Aug 2009 09:19
Just after a slight clarification of the rulz

Number 2 states that no external media is allowed, which I understand.

But when it comes to things like shader files(.fx) that arent media reliant(ie procedurally generate the textures for it) can they be used ?

And also, the built in GDK effects that are reliant on the supplied FX files(stencilshadow.fx rainbow.fx cartoon.fx etc) are we allowed to use those effects in entries provided the no external media is unsed with them ?

Sorry if the answer seems obvious, ive read through this post(thought not the dbpro one, ill have the check there) and couldnt find a definitive answer, but given the naure of the latest challenge(media less effects oriented), I thought I'd better ask about GDK built in effects..

If it ain't broke.... DONT FIX IT !!!
Crazy Programmer
AGK Developer
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Lost in AGK
Posted: 7th Aug 2009 20:52
It shouldnt matter if we use the GDK built in effects because its not external media its built in.

Marvin the Magician by Soharix
http://forum.thegamecreators.com/?m=forum_view&t=141496&b=8&p=0
Aldur
16
Years of Service
User Offline
Joined: 8th Oct 2007
Location: Melbourne, Australia
Posted: 9th Aug 2009 04:37
I might give it a go,
probably won't come up with anything too special though
I still have 11 days!
Papples
17
Years of Service
User Offline
Joined: 19th Jul 2007
Location: Home
Posted: 18th Aug 2009 12:50 Edited at: 18th Aug 2009 13:14
I'll allow the inbuilt cartoon, rainbow, shadow and reflection shaders since they are included with DarkGDK and making custom shaders involve more .fx files which could make it messy.

Yes the output is being generated but the spirit of this of competition is to prove that you can make any program using only DarkGDK (or Visual C++).

I'm sorry if anyone has already started using custom shaders while I was away but I'm sure they'll find a way around it.

If in doubt ask yourself whether I'd be able to run the program if you just pasted the relevant code snippents into this thread.

2 days left!

EDIT: and stencil (which for some reason is not on the documentation).
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 18th Aug 2009 12:59 Edited at: 18th Aug 2009 13:05
Just putting the finishing touches on my entry, trying to catch the last couple of niggley little bugs..

I actually came to that same conclusion, I contemplated using some external shaders, but after I thought about it, I figured that even if technically they arent external media, they dont really fit in the spirit of that rule and dont really demonstrate any coding ability other than setting them up, which honestly isnt that difficult, and I would have to agree that shader code, other than the built in ones, should be covered by that no external media rule aswell, besides the fact that its a GDK coding challenge, not a shader coding challenge lol

EDIT : my entry does require the FX file called "stencilshadow.fx" that comes with GDK, ill attach it to my entry when I post it with my code archive, incase people dont have it or cant find it.. Also, my project isnt the kind that you will be able to cut and paste without alot of effort, so ill wrap up the .vcproj and zip that so its easier to understand the file strucure if you want to run it(ill put an EXE in the file to)...the reason for this is that there are 29 game related files containg the various classes and systems of the game, some of them with hundreds or more lines of code lol .... code tags just wouldnt cut it im afraid (its an asteroids 3d remake lol - a complexish convoluted one)

If it ain't broke.... DONT FIX IT !!!
Papples
17
Years of Service
User Offline
Joined: 19th Jul 2007
Location: Home
Posted: 18th Aug 2009 13:20
Thats good to hear. I look forward to playing it.
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 19th Aug 2009 12:03 Edited at: 19th Aug 2009 12:06
Eggeroids - an Asteroids remake in 3D

This is my entry

Here is a bunch of info about the project that I have put togther..
(full docs are contained in the Main.cpp code file at the top)

Effect Synopsis :



Story



Gameplay and Codeing notes :



Screenshots :







Attachment contains all of the code files and also my project file so that yuo can just add it so a solution and get an idea of the file structure.

Any question, just ask If you find any bugs let me know any ill try to get em fixed.

If it ain't broke.... DONT FIX IT !!!

Attachments

Login to view attachments
Wizz
15
Years of Service
User Offline
Joined: 27th Apr 2009
Location:
Posted: 19th Aug 2009 16:54
Nice game mr. Wilson!

I just love the smell of code in the morning...
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 19th Aug 2009 20:44
The game is absolutely WOW!
Amazing result in such a short time.
Krisacz
15
Years of Service
User Offline
Joined: 3rd Mar 2009
Location: UK, Manchester
Posted: 20th Aug 2009 03:05
What time today is deadline? If you could wait till today evening (9-10pm) I will enter because I've almost finish mine, just need couple more hours on pc.
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 20th Aug 2009 12:10
@Mista Wilson: Forgot to say that I love your background story.
Papples
17
Years of Service
User Offline
Joined: 19th Jul 2007
Location: Home
Posted: 20th Aug 2009 16:44
I'll give the results tomorrow but I'll only allow entries posted before midnight.

Good Luck to any UK A levelers. Hope the news is good.
Krisacz
15
Years of Service
User Offline
Joined: 3rd Mar 2009
Location: UK, Manchester
Posted: 20th Aug 2009 17:06
Yeah! That's great news, in that case when I will come home at about 5pm my time it's will be about 11am your time, that's mean I will have about 13h to finish it hehe
Papples
17
Years of Service
User Offline
Joined: 19th Jul 2007
Location: Home
Posted: 20th Aug 2009 17:15
I meant GMT. But in that case we'll use the server time.

@ Kirsacz: I guess you have until 6 in the morning then
Krisacz
15
Years of Service
User Offline
Joined: 3rd Mar 2009
Location: UK, Manchester
Posted: 21st Aug 2009 10:43
Unfortunately I occurred an issue in my code (probably something simple with vector) but I haven't had enough time to fix it. I had to take that failure and learn on it, my fault I should start earlier than week before deadline, next time I will start straight away . So I guess we know who winner is (anyway he would be ) Congrats, really good entry and amazing programming skills!
BTW. maybe I will have a chance to use that game (if I will fix it) in another challenge, hehe
Papples
17
Years of Service
User Offline
Joined: 19th Jul 2007
Location: Home
Posted: 21st Aug 2009 13:36
The entries are in and the results are as follows:

Eggroids - Mista Wilson

Special Effects - 56/60

19pts - explosion related
17pts - weapon related
20pts - other inventive/pretty effects

Gameplay - 6/10

2pts - enemy variety
4pts - powerups

Graphics - 5/5

Total 67/75

Comments:

This is a stunning game. I fell in love with the ripple, and engine thrust effects and I'm very impressed with the HUD. The shaders give it a polished finish.

Improvements:

As you've said planning the code would have made it more efficient but I understand you may not have finished in time. My graphics card continued to crash (minimum required spec) before the second wave so I had use my mate's computer.

I love using the controls for skidding around but I find it hard to shoot (and hit) things. I suppose you could either use absolute (as opposed to relative) mouse aiming or just speed up the bullets.

The enemy variety is ... well different sized eggs.

Conclusion
Awesome game Mista Wilson. Congratulations you win!
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 21st Aug 2009 15:20
hehe cool Thanx

Thanx all for the kind comments...

Lets hope some more people have time to get an entry in for this next one, winning is cool, but its cooler when there is actually some competition lol

@Papples - I actually had plans for a few different kinds of enemies and different kinds of weapons, but wouldnt have finished if I had tried to get em going...

Funny you mention the weapon, originally it was a kind of a lash cannon, like holding the button down made a whip-like projectile, it was basically firing bullets one after the other over and over using similar rules to how it is now, but I found I had to have a really small range and it was still too easy to just fly fast and kill everything lol...

I was actually thinking of continuing to develop this game a little, except with real media and effects, some proper shaders and things, and probably a code refactor too lol it will probably become a side project...

Anyway, onto the next challenge...

Ive noticed that so far all of the challenges have been to make a game of one type or another, thats cool, but I was reading through the DBPro coding challenge thread and they have had alot of challenges that have been about specific things, rather than making a game, so I think ill follow that lead, and make our next challenge something a little more specific than a full game of a certain type.

Ill have to spend a little time thinking about something appropriate, I dont want to set a challenge that people will think is too hard or too easy.

Ill post back in a little while with a specific challenge...

If it ain't broke.... DONT FIX IT !!!
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 21st Aug 2009 16:58
Current Challenge as of 21st August

AI Based Movement Demo

It can be any form of AI based movement, flocking, dispersion, avoidance, attraction or various pathfinding methods or a combination of the above.

Graphical representation is not a judging factor past a basic clear representation of what you are showing, entries can be either 2D or 3D or even text-based as long as the movement is clearly shown and the AI control can be clearly seen.

The Winner will be judged on the following factors -

*AI can clearly be seen to be controlling/influencing the behaviour of the movement.
*Movement of AI entity/entities is clearly visible.
*Demo contains a basic display detailing what the AI is thinking/doing, using text or images or whatever method you choose.
*Demo contains more than a single movement type(ie. flocking and avoidance). Will only be awarded once, for having more than a single type of AI movement in your demo, regardless of how many different types there are.
*Demonstrates the movement in original and/or inovative ways. *Demonstrates possible in-game uses for your chosen movement type/types.(ie, a couple of entities may use flocking to group together to chase another group of fleeing entities that disperse, could represent dogs chasing a flock of birds or a pack of lions chasing down prey)
*User Interaction(from simply placing a target object to controlling a "bot" - anything goes)

The winner will be the entry that best fits the above while being clear and concise, keep in mind that the above are not all required, the main criteria should be considered to be clear AI behaviour and clear Movement, with the other judging factors being second in priority.

Deadline :
4th September (Thats 2 weeks, if that seems too long or short please let me know )

Good Luck everybody, I think this is a nice simple challenge so hopefully more people will have the time to make an entry.

If it ain't broke.... DONT FIX IT !!!
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 22nd Aug 2009 17:11
Flocking? As in how you distribute the white stuff on a Christmas tree?

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
puppyofkosh
17
Years of Service
User Offline
Joined: 9th Jan 2007
Location:
Posted: 22nd Aug 2009 17:57
I think he meant like a flock of birds, moving together.
sydbod
16
Years of Service
User Offline
Joined: 14th Jun 2008
Location: Just look at the picture
Posted: 22nd Aug 2009 18:07
Maybe a little more time may be good for some of the members as some research would be appropriate for them.

http://www.red3d.com/cwr/boids/

Just to get people on the correct path. Have fun all.
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 22nd Aug 2009 19:23
I am Sorry, I should have given a little more explanation on the terms I was using, here is a quick explanation of the terms and some links to help explain further ...

The challenge is meant to demonstrate any kind of AI based movement, I just used those particular types as examples, you could use any form you like, provided there is some form of AI controlling the movement, it doesnt have to be overly complex.


Flocking is movement where the entities react in a manner similar to homing pidgeons flying in formation, usually achieved by having a "group" of entites following a leader or 2.

Dispersion is the opposite, where the entities would start in a group and be dispersed or spread out away from each other, trying to get distance between each other.

Avoidance would involve the entities having a sensor, where it could detect if it was moving into another object and adjust it's course appropriately, they usually use a number of sensors for more accurate detection and movement

Attraction could be equated to something like gravity between entities, where they are attracted to each other and congregate in small groups, almost similar to flocking but without the motion

Here are some links to various AI movement pages :


AI Junkie :

http://www.ai-junkie.com/


AI Wisdom :

http://www.aiwisdom.com/


AI Depot :

http://ai-depot.com/


GameDev.Net AI Discussions :

http://www.gamedev.net/community/forums/forum.asp?forum_id=9


AIGameDev.com - Movement/Animation discussions :

http://aigamedev.com/open/tutorials/backbone-behaviors-movement-animation/


And perhaps it might be an idea to extend the deadline a little aswell if everybody agrees.

Im open to suggestions, I thought 2 weeks would be enough to put something simple together, but if anybody think they will need longer, please say so and Ill extend the deadline, I would rather have a slightly longer challenge if it means we can get more entries in.

If it ain't broke.... DONT FIX IT !!!
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 22nd Aug 2009 20:37
This is a very interesting and very useful challenge. I can't resist trying my hands on it. Actually started today, although I should have been doing something else.

Two weeks should be OK but I'm not against extending the deadline if more people will join in then.
Crazy Programmer
AGK Developer
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Lost in AGK
Posted: 23rd Aug 2009 02:29
I will def be joining in. Sounds like it will be fun Gona try to put something simple together tn

Marvin the Magician by Soharix
http://forum.thegamecreators.com/?m=forum_view&t=141496&b=8&p=0
Krisacz
15
Years of Service
User Offline
Joined: 3rd Mar 2009
Location: UK, Manchester
Posted: 25th Aug 2009 11:06
Can it be a presentation of A* algorithm for route finding? Connected with some other bits?
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 25th Aug 2009 12:29
Sure, A* pathfinding can be used as a form of AI based movement

Any form of AI that can be used to represent movement is cool. It can be as complex or simple as you like.

You could even code up a topologically evolving neural network driven by constant genetic evolution, and train it to move a cube around if you really really had some time to kill lol

Anybody actually interested in that, search for "rtNeat AI" on google and NERO AI AGENTS for a game using the principal lol

If it ain't broke.... DONT FIX IT !!!
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 30th Aug 2009 15:07
I have the bad news that I probably won't be able to finish in time the program I wanted to submit for the challenge. At present I have:

- the 3D demonstration framework which shows the moving entities on a game field with randomly placed obstacles,
- the code for debug messages to show what the AI is doing,
- the menus to switch between different AI modes (the modes are not fully finished yet),
- collision detection for static obstacles and moving entities,
- and a basic movement AI which "steers" around obstacles. Often it finds the way looking more intelligent than it really is, but it gets stuck more often than I would like. Regarding that the main point of the challenge is the AI, that is not good enough.

What I wanted to do still, is to implement a decent A* pathfinding, so the entities would switch to pathfinding mode when they get stuck, or maybe let the user control which mode he wants to use. I planned also a debug graphic which would show the path the entity chose. It would also be good to find a way to detect when the target waypoint is not reachable (it's on top of an obstacle, for example), because in this case the poor entity is circling around it helplessly. But it looks like next week I will have exactly zero time for this, and I'm not even sure that extending the deadline would help much, because I can't estimate the time it will take to finish the program.

I will probably submit what I have anyway, and if I can return to it later, then I will post the improved version outside competition.
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 30th Aug 2009 15:52
Im sorry to hear that Mireben but its ok. If you decide that you want some extra time thats fine with me, If you dont think extra time would help you get it finished thats ok too, just submit what you have if you want to, like I said, it doesnt have to be comlpex.

Your system sounds pretty cool though and I would like to see it completed lol but really, it sounds like its more than complete enough for this challenge, which is just to show us some AI movement, so dont feel too obligated to have a polished 100% not getting stuck pathfinder, I know how hard that can be lol... from the sounds of the work you have put in, its a pretty capable system too. Im Looking forward to seeing it

If it ain't broke.... DONT FIX IT !!!
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 31st Aug 2009 10:41
ANNBOIDS - Artificial Neural Networking BOID AI Movement Demo

Hello Everyone, this is going to be my entry for this challenge. I know I cant win as I won the last, but I figured I would still enter and maybe provide something useful to someone else somewhere down the track.

My entry is an Artificial Neural Network, driving BOIDS around and learning either to attack the player or flee from the player based on how well the player can do damage to them. They will eventually learn to attack only in large groups and flee if faced singly or in small groups...if taught correctly, and I even noticed actual evasive behaviour(turning sharply when the player is just about to be able to damage them, movement is physics based) leading the player to the largest flock when fleeing, which was more than likely a combo of the AI fleeing and trying to flock, but a similar technique could be used to make it look like the AI has learnt to draw players into ambushes....

Here is a definition of BOID :

Quote: "Boids, developed by Craig Reynolds in 1986, is an artificial life program, simulating the flocking behaviour of birds. His paper on this topic was published in 1987 in the proceedings of the ACM SIGGRAPH conference. The name refers to a "bird-like object", but its pronunciation evokes that of "bird" in a stereotypical New York accent.

As with most artificial life simulations, Boids is an example of emergent behavior; that is, the complexity of Boids arises from the interaction of individual agents (the boids, in this case) adhering to a set of simple rules. The rules applied in the simplest Boids world are as follows:

separation: steer to avoid crowding local flockmates
alignment: steer towards the average heading of local flockmates
cohesion: steer to move toward the average position of local flockmates
More complex rules can be added, such as obstacle avoidance and goal seeking.

The movement of Boids can be characterized as either chaotic (splitting groups and wild behaviour) or orderly. Unexpected behaviours, such as splitting flocks and reuniting after avoiding obstacles, can be considered emergent."


I wont try to explain how Neural Networks work here(its a huge and complex topic and took me a long time to understand), suffice to say they are a form of AI that is designed to learn in a similar, although greatly simplified, way to that of the human brain. The Net presented here is very simple, 3 layer network. Here are some links to pages that describe what a Neural Network is :

http://en.wikipedia.org/wiki/Artificial_neural_network

http://en.wikipedia.org/wiki/Neural_network

http://www.learnartificialneuralnetworks.com/



The demo has some basic controls. The player is represented by the bright GREEN cyclinder. The BOIDS are represented by cubes that change color based on what they are doing.

RED = attacking/chasing/flocking to player
BLUE = flocking/searching
YELLOW = fleeing/dispersing

Use the mouse, A-D or LeftArrow-RightArrow to rotate the players cylinder, the force driving it is physics based though constant, so it will slow slightly with sharp turns etc, you will notice the AI use this to its advantage after awhile if you dont just teach to to flee at the sight of you.

Press Y to turn on and off the AI Debug Text.
Press V to turn on and off the Force/Movement vector display
Press 0-9 to change the player damage modifier(9=instantly teach AI to flee | 0=no damage, AI will learn to chase you and never flee)
Press + - to increase/decrease the Lateral Velocity coefficient
Press [ ] to increase/decrease the Angular velocity coefficient
Press ESCAPE to exit

As for basically how to teach the AI, depending on how extrame the damage modifier is, it will learn instantly or it may take a few minutes to start to see emergent behaviour, eitherway, the AI is constantly learning and being re-trained so it will continue to evolve it's behaviour for a fair while. I have not tested for period of longer than 30 or so mins though myself lol...

To teach the AI to instantly FLEE the player, press 9 and start trying to run into the largest group you can see... If this is done near the start of the program, the AI will instantly start to flee anytime it detects that you are heading towards it, eventually from further and further away to give itself the best chance of survival.

To teach the AI to never flee, press 0 and try to survive at the same time as attacking the BOIDS as much as you can.

To teach the AI to attack in groups will take a while longer, press 3 and try to keep your player alive as long as possible, while doing as much damage to single BOIDS as you can... stay away from the large flocking groups and only target singles. Flee as soon as a larger group approaches. If you do this for long enough you will notice that the BOIDS will begin to flee you when you encounter them in small gruops, but will just attack nonstop in larger groups. If you attack larger groups too early, the AI will not learn properly and you will end up teaching it to disperse when it approaches you.

To ATTACK a BOID, you need to be either in contact with it, or within 2 units of it, for a BOID to attack and damage you, it needs to be just outside of the range you need to attack it and facing you. So you will take damage on the way in if it is facing you.

There is a visual representation of the AI VIEW, it is only very basic, as the AI actually uses a number of different sensors and they have different properties. (Its actually the camera frustrum being rendered, but the camera view has been setup to match the AI's forward sight)

Ok, one last word before I stop yapping, some of the code in this entry may kind of "bend" the rules of the challenge slightly, as I am using my D3DLIB to draw the movement vectors in 3D as the GDK functions just dont cut it, and slow the program way too much... I actually figured that given I cant enter the challenge to compete anyway, noone would mind if I did what I have.

Just to be clear on this.... NO ONE is competing against my entry in this challenge(I won the last one so this entry doesnt count), its just present as a bit of fun and to demo the principles. It also contains some very useful 2D physics functions and the Neural Net itself that can be pulled apart and examined...

Here is a screeny of the demo running :




Attachment has all of the source code and my project so you can see how it is structued, a compiled EXE and the stencilshadow.fx file for the shadows I added to spice it up lol(GDK inbuilt shadowshader). Please note that the project was made using Visual Studio Pro 2008 SP1 so wont compile in a standard VS Express install. Just add all the code files(*.cpp *.h, minus resource.h) to a new GDK project inside Express and it will be fine.

If anyone has any questions, ask away, and sorry for the long winded explanation.

If it ain't broke.... DONT FIX IT !!!

Attachments

Login to view attachments
puppyofkosh
17
Years of Service
User Offline
Joined: 9th Jan 2007
Location:
Posted: 31st Aug 2009 17:37
I get the error, "The application has failed to start because d3dx9_41.dll was not found"
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 31st Aug 2009 23:59
looks like you will need to update directX. I compiled that with GDK 7.4 and the March 2009 SDK.

Alot of the commands wont work in GDK version prior to 7.3

If it ain't broke.... DONT FIX IT !!!
marlou
15
Years of Service
User Offline
Joined: 17th Jan 2009
Location:
Posted: 1st Sep 2009 06:02
@Mista Wilson
ANNBOIDS - Artificial Neural Networking BOID AI Movement Demo

What kind of neural network are you using??MLP,SOFM,Boltzman??
I hope its not a quantum neuralnetwork...qubits and quantum gates..
God knows..Its so freaking hard to understand..quantum entanglements are BS..hahahaha...

When a person has nothing but a dream, can he dare to dream.
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 1st Sep 2009 07:16 Edited at: 1st Sep 2009 07:55
@marlou - nothing so complex lol

Its just a simple 3 layer feed forward network. 4 inputs, 3 outputs. It doesnt have any genetic algorithms or anything complex like that, its not designed to learn continously forever like some networks, its designed to obtain an optimal performance quickly.

You can see this in the fact that you can teach the AI to instantly "fear" the player, so that it will always run away when approached.... that would be the optimal beaviour.. although it does still evolve slightly, but once it has that optimum it wont change much.. in the above example you would notice that you would never be able to "re-train" it to attack again it will always flee, but it will also slowly learn to flee from greater ranges and that offers the best chance of survival.

Have a look at the ANNBOID.h and ANNBOID.cpp files, they contain the neural network in it's entirety. The only things external to that, that have anything todo with it, are contained in the main.cpp file, and are the training data, and the methods that access and update it.

Hope this answers you question... this isnt meant to be a perfect learning network or anything, not by a long shot lol, but it does demonstrate a way in which ANN's could be used for simple purposes in games.

EDIT : It has 4 input, 3 output neurons, had them the wrong way sorry... and it uses Back-propogration to learn, I should have mentioned.

If it ain't broke.... DONT FIX IT !!!
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 2nd Sep 2009 23:51 Edited at: 3rd Sep 2009 08:46
Here is my entry to the AI challenge. The program features several different AI modes and a simple waypoint finding method, in a test environment with randomly placed obstacles.

Please see the README.txt on how to control the program and how it works. The source code also contains a lot of comments.

***EDIT: Uploaded a new attachment, just to remove one stupid comment from the source and optimize a calculation. Functionality did not change. I'm still within the deadline.***

Attachments

Login to view attachments
Brillig
16
Years of Service
User Offline
Joined: 19th May 2008
Location:
Posted: 4th Sep 2009 10:35
Hey all,

I've been following this thread and think it's a great concept.

So I decided to work on a flocking simulator for the current challenge!

The features:

Flocking - Objects try to match their velocity to that of all other objects in the flock.

Grouping - Objects find their neighbors and either move toward them or away from them. (The definition of a neighbor is determined by the value of the slider that appears in Grouping modes. Drag the box to adjust the value.)

User Interaction via Mouse - Objects will respond to the area around the position of the mouse according to the specified rule (attract/repel/slow).

I've included a sub-directory with just the executable if you don't feel like building from source.

Have fun!

Attachments

Login to view attachments
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 4th Sep 2009 17:19
Im glad we have a couple of entries in this one now, if anybody else would like some more time to complete theirs, now is the time to speak up or forever hold your peace... lol

Anyway, just wanted to drop in and say that I will be judging the winners a little later according to servertime, provided noone wants extra time.

Its just after midnight here at the moment(5th sept) lol, So im planning on doing it in the morning, which is kind of mid-late afternoon/early evening server time(4th sept).

Good luck to everyone who has or is planning on entering.

If it ain't broke.... DONT FIX IT !!!
Mista Wilson
16
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 5th Sep 2009 06:12
And the Winner Is......
(sorry for the delay, My 10yr old has been making life hard today lol)

Both entries I have a to say are very well done, clearly demonstrating the technique of AI Movement. The winner was actually quite hard to choose, as both entires met the challenge criteria and added a bunch of cool extras to it, it was quite difficult to choose one over the other as a winner as both entries have their own merits and are very well done, albiet showing different types of AI movement.


The Winner of this Challenge is :

MIREBEN

and the Runner up is :

BRILLIG


Mireben's entry was chosen as the eventual winner(it was close, and took some hard thinking on my part to differentiate them) because of the depth of the AI movement that was displayed.

The AI pathed to a target, avoided other entities, did so in an efficient manner and showed that an AI can be used to control movement using pathfinding algorithims.. the only small thing I noticed while playing with it were that occasionally(as mentioned my Mireben) the AI entity gets stuck slightly, depending on the obstacles, but that doesnt happen often and would be quite easy to workaround given the time, the system also shows extensibility and looks like it would be quite easy to use something similar in a game.


Billig's entry was no less impressive for me, the only little issue I had was the size of the environment the entities were moving around. The techniques were demonstrated very well and very clearly, with easy controls and display to let you know what they were doing. The slide control at the bottom of the screen was a little funny, having to be pushed rather than slid, but thats just an aesthetic thing and not important at all, but I think the behaviour could have been demonstrated alot more readily in a larger environment(camera view I mean really... they entities kept leaving the edge of the screen and I was always wondering what they were doing out there lol)

I think that the entities would have definately been able to show some more emergent behaviour if they had a larger environment and maybe some obstacles, by that I mean things like splitting and re-joining around an obstacle - this can be made to happen with flocking and avoidance and looks cool-its an "emergent" behaviour. But, it did definately show the flocking/dispersion behaviour quite well...

One touch that I really liked was the ability to use the mouse cursor to attract or repel the entities, that was quite fun.. though a larger environment would have made that a little more fun too, I had them being sent off the edge of the screen quite a bit while repelling them and couldnt help but wonder what they were doing, AI-wise, before they made their way back into view lol and if I had a larger environment, how far could I disperse them and things like that... all in all, a very clever sim.


So, Congratulations to both Mireben and Brillig on a pair of excellent entries that both met and exceeded what the challenge required.

I'll be looking forward to the next one. If anybody has any question about what I have said above or if I wasnt clear enough on something, feel free to ask

If it ain't broke.... DONT FIX IT !!!
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 5th Sep 2009 12:59
Yay I won! Thank you Mista, but as you said, the two programs are quite different and not really comparable. I'd like to mention that your neural network is also something worth to look at and again, an entirely different approach.

I will think about the next challenge and post it still today.
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 5th Sep 2009 16:25 Edited at: 5th Sep 2009 16:36
Here comes the next coding challenge:

2D sidescroller platform game

I noticed that on the forum, people often ask basic questions about 2D sidescroller games and ask if there is a tutorial. Let's help them! The task is to make an "engine", a basic framework for a 2D sidescroller platform game.

Let's see the compulsory points:
- The program should define the map of a game level using some memory structure.
- The level must be composed of a few basic types of tiles and it must be at least 3 times the length of the game screen, so that side-scrolling is compulsory.
- The program must be able to move the player sprite through this level using left/right/jump keyboard controls. Pay special attention to movement on the first and last screens. (Always keeping the player in the centre may be a good approach for the middle parts, but the player should be able to navigate to the beginning/end of the game area, so there may be a point where you switch from background scrolling to moving the player sprite instead.)
- The level should have several platform heights, between which the player character is able to jump or fall. Gravity should be implemented.

Bonus points are given for anything extra you can squeeze in. A few ideas:
- Timer-based movement (not compulsory but highly recommended and it's easy to implement).
- If the player sprite falls a long distance, it dies and restarts the level from the beginning.
- Collectible items, traps, portals?
- Detect on which side the sprites collided (also a regular question). E.g. if the player is trying to jump on a platform but only hits the side of it, it should not be regarded as a successful jump.

Note that this is not a finished game, so don't worry about being entertaining. It only needs to be controllable.

You don't need to make any fancy graphics for the sprites, the focus is on the game mechanics. Artistic quality is not a judging point: blue boxes, red circles and the like are enough. As usual in this challenge, the sprites should be created with Dark GDK code, without external media.

However, I'm going to extend the rules a little and allow the use of one external picture, which is installed together with Dark GDK, so everyone using the GDK should have it:
<Dark GDK install directory>/Samples/Bin/Media/wall.jpg

Bonus point if you use this image to create an "endlessly" scrolling background picture, behing your level tiles. It can scroll either at the same speed or at a different speed as your level tiles (parallax scrolling). Assume that the picture is copied into the same directory as the executable. The image file must remain unchanged, so you cannot edit it in an image editor for example, but you are allowed to resize (stretch, UV coords) it in the code to fit the game screen.

I think even beginners can try this task. Have fun coding!

The deadline is: 21st September (Monday).
Brillig
16
Years of Service
User Offline
Joined: 19th May 2008
Location:
Posted: 6th Sep 2009 02:28
Thanks for the feedback!

I made the decision not to use rigid walls for the bounds of my environment, and thought that giving the option to zoom in or out would compensate, but now I see that it could be very frustrating to have your objects go off the screen without knowing that they would eventually come back. A good lesson for sure!

I agree with you about the slider. I threw it in at the end because I thought it would be fun, but it definitely needs some tuning! Perhaps if, instead of using dbMouseMoxeX, I just moved toward the position of the mouse? Anyone know of a good example of a slider using our api?
puppyofkosh
17
Years of Service
User Offline
Joined: 9th Jan 2007
Location:
Posted: 6th Sep 2009 04:03
I think someone released the start of a level editor...I forget who, but it had a slider in it. (I never tried it though). I'd search for "Start of level editor" or something.
Brillig
16
Years of Service
User Offline
Joined: 19th May 2008
Location:
Posted: 7th Sep 2009 01:53
Ah, thanks, p.o.k. - found it here: http://forum.thegamecreators.com/?m=forum_view&t=155390&b=22
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 21st Sep 2009 19:44 Edited at: 10th Oct 2009 13:13
I'm sad to see that this challenge has not generated any interest. Today is the deadline.

I actually started to work on this task but it's not finished yet. (Time, time...) I'll post it some day later when it's ready, because I still believe that it may be useful to someone. **EDIT: See the first code version a few posts down.**

However, I'll follow the rules and keep the deadline. If nobody else comes forward in the last minute, I will set a new challenge tomorrow.
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 22nd Sep 2009 21:38
Let's try to set a new challenge, in the hope that you will find it more interesting.

The new task is:

Make a particle effect, but without using the built-in particle commands. Code your own particles! They can be 2D or 3D. You can make any effect you like: volcano, moths, fountain, smoke, anything.

You can create some environment for the effect if you like (e.g. draw the body of the volcano under the particles), but it is not compulsory.

Bonus point if you demonstrate several different effects.

The deadline is: 9th of October.

Login to post a reply

Server time is: 2024-10-01 16:31:59
Your offset time is: 2024-10-01 16:31:59