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.

DarkBASIC Professional Discussion / - DBPro Coding Challenges -

Author
Message
BillR
23
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 19th Jul 2007 00:51
I am also trying to get something together for this challenge
gadgetfreak 66
19
Years of Service
User Offline
Joined: 26th Sep 2006
Location: Kulin,WA, Australia
Posted: 19th Jul 2007 04:25
Ok. Seems it was more popular than I thought. No question about keeping it by the look of the numbers though.

Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 19th Jul 2007 06:55
Here's the beginning of my entry - an aquatic ecosystem. Nothing clever happening yet, just some fish moving randomly. But wait till I throw a shark in there!!



Daemon
20
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 19th Jul 2007 11:04
I've started something too. It just looks like dots, but so far this is what it does:
-Animals stay in appropriate locations (ex. Fish stay in water)
-Predators hunt prey
-When 2 animals of the same species get together you may get a third.



Be ready to hit escape before any of the populations spirals so out of control it freezes your computer.

gadgetfreak 66
19
Years of Service
User Offline
Joined: 26th Sep 2006
Location: Kulin,WA, Australia
Posted: 19th Jul 2007 14:40 Edited at: 19th Jul 2007 15:48
@ Ric:
Nice visuals so far,and the fish move like small fish do as well. Looks like it'll make a good screensaver when finished.

@ Daemon:
Very interesting, particularly because there are so many types of animals. I see what you mean with the populations, every now and then a gigantic explosion of animals will threaten to strangle your CPU to death. It looks as if that might could be solved if you try and keep global energy around the same, for example halving the hunger of a parent when a new animal is born, and having the newborns hunger start at whatever was taken off the parent. Then the larger populations would quickly starve themselves down. I think.

Daemon
20
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 20th Jul 2007 01:31 Edited at: 20th Jul 2007 01:51
Thanks for the tip. I included something like that in this update.
Now there are constants at the top you can change if you think you can make the ecosystem sustain itself longer than I could.
Also, I have a check on the fps when animals reproduce now so it's not in as much danger of taking over your CPU.


If your lucky it could sustain itself for a long time.

HeavyAmp
19
Years of Service
User Offline
Joined: 25th Oct 2006
Location: Castle in the Sky!
Posted: 20th Jul 2007 01:59
Lol I like it Daemon. The squirrel was the winner

In theory, there is no difference between theory and practice. But, in practice, there is.
NA170425
User Deleted
Posted: 20th Jul 2007 05:53
That was fun to watch Daemon. There was a "mass extintion" when I ran it. The fish population was going out of control and then I think something ate them all.

This sig has been viewed times.
Alexb Orsova
20
Years of Service
User Offline
Joined: 6th Dec 2005
Location:
Posted: 20th Jul 2007 20:45
"Game of Life" anyone

Don't believe this sentence.
da power pwnerer
19
Years of Service
User Offline
Joined: 28th Jul 2006
Location: Pittsburgh, PA
Posted: 20th Jul 2007 21:42
I love that game...


http://Freewebs.com/noobisoft
Come to Noobisoft's website today!
qwe
22
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 21st Jul 2007 00:50
game of life

gadgetfreak 66
19
Years of Service
User Offline
Joined: 26th Sep 2006
Location: Kulin,WA, Australia
Posted: 21st Jul 2007 05:22
Heh heh. I once tried making a 3D version of that game, but the rules don't exactly work when you add another dimension. It just ended up producing this cool explosion of cubes that eventually crashed my PC.

Foe7
19
Years of Service
User Offline
Joined: 26th Mar 2007
Location:
Posted: 21st Jul 2007 05:34
Here's a little simulation thingy that I wrote a while ago...it kinda works

If I get time, i'm gonna finish it up (get the hunters working and all dat)



I'm not even sure if it works, haven't touched it's code for the better part of a year. If I recall correctly, the last tweaking of this code was some hacking at it to find a way for the wolves and deer to live in harmony.

-F7
qwe
22
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 21st Jul 2007 12:46 Edited at: 21st Jul 2007 12:46
heres what i have so far. no animals yet. it's a 3d ocean with islands. plz let me know your FPS, and any suggestions

Jimmy
22
Years of Service
User Offline
Joined: 20th Aug 2003
Location: Back in the USA
Posted: 21st Jul 2007 15:38
330 FPS on that ocean thingy.

Looks like Jell-O.

BillR
23
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 22nd Jul 2007 03:17
72 FPS - 1.533Ghz Athlon MP, GeForce3 Ti/200 video card
qwe
22
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 22nd Jul 2007 03:44
people say DB matrices are slow but i have two huge matrices running there, one updated every loop for waves, and FPS is fine.

i'll be adding animals and their AI today
qwe
22
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 22nd Jul 2007 11:07 Edited at: 24th Jul 2007 03:11
(edit) update, the animals now exist and move around!

gadgetfreak 66
19
Years of Service
User Offline
Joined: 26th Sep 2006
Location: Kulin,WA, Australia
Posted: 25th Jul 2007 13:24
Two more days to go!

acelepage
22
Years of Service
User Offline
Joined: 2nd Jun 2004
Location: Plattsville
Posted: 25th Jul 2007 22:42
Here is my entry. I won't have any more time this week to work on it, so I post it as is. A bit heavy on the animation.


( 2b || !2b ), that is the question. The answer: true
Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 26th Jul 2007 03:28
Very nice running animation - that could have been a whole challenge by itself!

qwe
22
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 26th Jul 2007 07:53 Edited at: 26th Jul 2007 08:01
this is not my final entry



it is in a 3d ocean with islands. most of the organisms either float or swim, some also walk, and the bird flies

each animal has certain types of prey to eat. it needs to be nearby its prey to eat the prey and increase its food value

an animal needs a certain amount of food and a nearby opposite-gendered counterpart to mate

each organism dies if it goes too long without food

prokaryotes go around eating corpses (waste) and churning out nutrients. the (photosynthetic) plankton eat the nutrients. krill eat the plankton. the 'primary consumers' (biology term) eat the krill (whale, seal, squid) and secondary consumers eat seals or squid (fish, whale, penguin, et al)

thus everything cycles, from waste to producer to primary consumer to secondary consumer to waste, but the system is rather unstable, like real life

i'm still trying to find starting values that establish an equilibrium (ie they dont all die out after a couple minutes) feel free to play with the numebers (either the starting # of each organism, its weight, or whatever else)

also the program may skip a bit, since once per 15 loops, lots of calculation is done
Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 26th Jul 2007 14:50 Edited at: 26th Jul 2007 15:04
My little entry - an aquarium. Nothing special, just an attempt at movement patterns (flocking/dispersing etc.)



qwe: very interesting simulation to watch - the sperm whale was the first to snuff it - the prokaryotes seemed to do the best. No text display for the number of fish, though?

Jimmy
22
Years of Service
User Offline
Joined: 20th Aug 2003
Location: Back in the USA
Posted: 27th Jul 2007 02:51
That's way cool, Ric.

They move like real fishes!

"Oh hey, nice website Jimmy, it's really nice and fancy." -- That C++ Nerd
Visit. Website. NOW!
gadgetfreak 66
19
Years of Service
User Offline
Joined: 26th Sep 2006
Location: Kulin,WA, Australia
Posted: 28th Jul 2007 12:02 Edited at: 28th Jul 2007 12:08
As far as I can see the entries were:

Acelpage: Hunting?
Small sim that shows a group of animals running away from some people. It's a shame you didn't have time to do more on it, as it looked like it would have progressed really well.

Code Dragon: Gravity Simulation
Not sure if this was an entry or not, but it was showing a natural relationship, so I've included it. One of the more interesting grav sims I've seen on this thread, the clump of planets zooming around each other was fun to watch.

Daemon: Species Ecosim
2D land map with some water, and small colored squares for the different species. A great entry, there was something different to watch every time you ran it.

Foe7: Population Graph
Though not overly detailed or graphic, this entry directly connected with the subject of the challenge, and easily showed relationship between the populations.

QWE: Islands Ecosim
A 3D sim set around a group of islands in the ocean. This entry had a lot of different types of animals, (flying, walking, floating, swimming, etc), and concentrated on showing an obvius food chain.

Rick: Aquarium
A flocking sim set in a glass aquarium, showing the groups of fish dart around, disperse, and form new ones. Really realistic fish movements, and definitely interesting to watch.

And so:

Runner up goes to:


And the winner is:


da power pwnerer
19
Years of Service
User Offline
Joined: 28th Jul 2006
Location: Pittsburgh, PA
Posted: 28th Jul 2007 15:36
Congratulations qwe


http://Freewebs.com/noobisoft
Come to Noobisoft's website today!
Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 28th Jul 2007 17:37
Nice one qwe - well deserved winner. Also, good review of the entries Gadgetfreak.

What's up next?

acelepage
22
Years of Service
User Offline
Joined: 2nd Jun 2004
Location: Plattsville
Posted: 28th Jul 2007 17:43
How about a running animation? Just kidding!

I had a thought a while back about creating a morphing animation. This is where one object changes its shape into a different object.

( 2b || !2b ), that is the question. The answer: true
Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 28th Jul 2007 20:41
Like transformers - robots in disguise?!

Or, how about a simple flight sim. Could be very easy for a beginner (eg. randomise a matrix, and use the arrow keys to control a camera - simple as that), or could be more in depth for the more experienced - (aircraft model, basic physics, a runway, take off/landing - maybe even bombing targets/aerial combat etc.)

Or, how about a planet generator/terraformer?

Or a boat racing game?

qwe
22
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 29th Jul 2007 00:58 Edited at: 29th Jul 2007 01:20
thanks gadget. 800 isn't actually what their equilibrium would be, it's the population limit for each species (which is editable, it's a constant near the top). my program suffers from the same thing that daemon's did earlier (population explosion killing CPU)

I really enjoyed daemon's program btw

i like the flight sim idea

in case other good ideas come up i'll wait until tomorrow to set the challenge

would there be interest in another science-type simulation?

has anyone played games like Spelunx? it's exploration/fun, but also education in disguise. ideas related to this would also be great
gadgetfreak 66
19
Years of Service
User Offline
Joined: 26th Sep 2006
Location: Kulin,WA, Australia
Posted: 29th Jul 2007 05:56
As far as the next challenge goes, how about one of those space adventure games? They're similar to the RPG suggestion for the last challenge, just require less media. Something like Space Miner, or Jack of all Trades, where you go from space station to space station trading stuff, or killing pirates for bounty, etc.

da power pwnerer
19
Years of Service
User Offline
Joined: 28th Jul 2006
Location: Pittsburgh, PA
Posted: 29th Jul 2007 06:42 Edited at: 29th Jul 2007 06:42
I kind of like that space adventure idea too


http://Freewebs.com/noobisoft
Come to Noobisoft's website today!
Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 29th Jul 2007 18:17
Sounds like 'Elite' - the original Space Trading/combat game, which defined the genre back in the '80s. Would be a cool challenge.

jasonhtml
22
Years of Service
User Offline
Joined: 20th Mar 2004
Location: OC, California, USA
Posted: 30th Jul 2007 00:24
if you guys are planning to do the space sim, ill gladly take part
(never done one of these coding challenges before...)

MickeyIII
19
Years of Service
User Offline
Joined: 12th Aug 2006
Location: Louisiana
Posted: 30th Jul 2007 00:26
Hey, I used to own a game for Windows 3.1 on my old IBM YEEAARS back. It was called Star Fleet II... Not very graphical though, yet the idea of taking turns with firing upon each other, sometimes missing...It was kind of like Chess only in space and you could "hyperspace" to the next grid, keeping in mind your sheild configuration incase an enemy or two showed up in the grid...

I would suggest something similar, only instead of it just being letter's, numbers, a grid, and Buttons, add some little graphical twists, maybe even make it realtime, although the game was turnbased...

Just thought I'd pop that in when I read about the Space Trade/Combat thingy.

Mickey III
el zilcho
19
Years of Service
User Offline
Joined: 4th Dec 2006
Location:
Posted: 30th Jul 2007 00:57
i like the idea of the flight sim much more tbh.

working out the mechanics of the plane and aerodynamics for different aircraft could be really good.

i also want to see how effectively i can make a jet fighter out of primitives
qwe
22
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 30th Jul 2007 01:29 Edited at: 30th Jul 2007 19:59
^spaceship mechanics wouldn't be too much different from plane mechanics

extra points if you actually have each engine in 3d space, and when you press a movement key, eg left, you don't "Move Object Left" you put something like "fire_thruster(2, 1.0) : fire_thruster(3, -1.0)" and these apply appropriate acceleration based on the position and angle of the thruster fired and amount of thrust applied

also extra points if, when a particular engine is damaged, it either doesnt fire or keeps firing, annoying the player

>>Sounds like 'Elite' - the original Space Trading/combat game, which defined the genre back in the '80s. Would be a cool challenge.>>

also sounds like the Star Wraith series of games (which are some of the most professional feeling and fun games made in DB ive ever played)

link: http://starwraith3dgames.home.att.net/go.htm

playing those should help with ideas for this challenge

---

**** Challenge: Space Sim ****

The player controls a space-ship. You can focus on space combat, space exploration, space trade, other space missions, or some combination thereof

Ends August 19 (in three weeks)

---

Some useful functions (more will be added later, by myself and maybe others)

Merge multiple objects into one object (eg, construct your spaceship [or jet fighter if you're that stubborn] out of primitives)


Rotate a 3d point in relation to the origin (parameters: X, Y, Z (the point), XAngle, YAngle, ZAngle). the function returns information in return_x, return_y, and return_z, which should be global floats


Set 3d beam (3d line)... Obj must be a triangle, preferably set to wireframe mode
MickeyIII
19
Years of Service
User Offline
Joined: 12th Aug 2006
Location: Louisiana
Posted: 30th Jul 2007 01:33
I saw a thread about making a Stealth Fighter out of a Cube called a StealCube. Try searching "vertex manipulation" and see if you can find it...It's a good way to cut down on limbs and such and to keep it in just one object.

I'm making models space sim in Blender and Texturing with
Gimp 2.2

I could use "dummy objects" for now and start coding when the challenge starts, cuz I would love to try this out.
MickeyIII
19
Years of Service
User Offline
Joined: 12th Aug 2006
Location: Louisiana
Posted: 30th Jul 2007 01:38
My wish came TRUE!!!!!!!!!

A space sim...hmmm.

Hey qwe, would it be possible to make it three weeks, cuz I wanted to add not only space flight and combat, but maybe just a little of a strategic Battle Zone/BZ II:Combat Commander aspect to it, only in space of course.

If not, I'll just focus on combat.

Mickey III
Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 30th Jul 2007 16:00
I think three weeks would be suitable for this challenge, as it could be quite involved. Also, some people have summer holidays at the moment, so hopefully this will be a nice project for them to really get their teeth into.

I'll post an announcement on the main board - with an ammended deadline of Sunday 19th August if qwe agrees.

el zilcho
19
Years of Service
User Offline
Joined: 4th Dec 2006
Location:
Posted: 30th Jul 2007 17:06
damn,.. i really want to do this one, but i'll only have less than a week to complete it in. because i'm going away.

we finally get set a REALLY good challenge and i'm not here. wheeyy.
Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 30th Jul 2007 17:54
My first stab at a ship:



qwe
22
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 30th Jul 2007 19:58
that ship looks great

three weeks sounds good
BillR
23
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 31st Jul 2007 13:30
Very cool ship!
I also liked the flocking behavior of your fish in the last challenge, nice work.
Jimmy
22
Years of Service
User Offline
Joined: 20th Aug 2003
Location: Back in the USA
Posted: 2nd Aug 2007 22:08
Woo!

Reached the 1000 line mark and thought I'd show y'all my progressions.

Features:
Lame-o stars
Lame-o sun
Fake-o physics
Sweet 3D radar!

I suggest using a joystick+keyboard combo or gamepad for this, such as one like my Xbox 360 game paddle. But you do what you like. Oh, and do not be mislead. It does not actually have mouse support yet.

Here it be: http://www.kingofawesome.com/Orbitrocious.txt

Sorry for using a link to a txt file instead of a code snippet. My ISP times out when uploading even the smallest amount.

Have fun!

"Oh hey, nice website Jimmy, it's really nice and fancy." -- That C++ Nerd
Visit. Website. NOW!
qwe
22
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 3rd Aug 2007 00:05 Edited at: 3rd Aug 2007 00:13
^when it tells me to set up controls, it always thinks there's a joystick doing something. so when i press a key, it says multiple inputs detected. i have no joystick. so i commented out the following two lines



nice radar, and nice feel to the program. perhaps put in the ability to turn left/right? currently we can roll/pitch but no yaw

pretty stars, and nice engines:p

one of your type names is physx. this may cause problems for those of us with dark physics (physx shows up as blue in my compiler)
Jimmy
22
Years of Service
User Offline
Joined: 20th Aug 2003
Location: Back in the USA
Posted: 3rd Aug 2007 04:33
All of the issues you found are now resolved.

Text file updated.

Thanks for checking it out

"Oh hey, nice website Jimmy, it's really nice and fancy." -- That C++ Nerd
Visit. Website. NOW!
Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 3rd Aug 2007 19:08 Edited at: 3rd Aug 2007 19:23
Looking good so far Jimmy.


Here's where I've got to - you can now fly the ship using the keyboard, and choose between cockpit view or chase-cam view. There are also other ships, and you can set the camera to follow them too .... they don't do anything yet other than fly in a straight line, though!



qwe
22
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 3rd Aug 2007 22:40
you both are setting a nice standard. can't wait for more entries. this will be hard to judge

btw, using a vector3() instead of SQRT() might be faster when getting distances
Crazy Programmer
AGK Developer
21
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Lost in AGK
Posted: 4th Aug 2007 21:42
Nice work Ric. Yall are making me not wana join in keep up the work.


http://www.freewebs.com/zornoxstudios/
Learning C++ thanks DGDK

Login to post a reply

Server time is: 2026-07-23 10:35:09
Your offset time is: 2026-07-23 10:35:09