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
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 27th Jan 2010 15:10 Edited at: 27th Jan 2010 15:18
Hi..it looks like this board had gone on winter`s holidays. I`m working on it !...I`v got a lot of spread code and I have to rig it up a bit...any way here we go !! I show here what I`m working on..it`s not finished jet but I`ll keep on it.

have a look to this exe file.


learning every day

Attachments

Login to view attachments
Valle
18
Years of Service
User Offline
Joined: 10th Mar 2006
Location: in your girlfriends bed
Posted: 28th Jan 2010 00:04
looks good chafari, but you should limit the framerate, it's running way too fast on my machine


Nathan C
14
Years of Service
User Offline
Joined: 26th Jan 2010
Location:
Posted: 28th Jan 2010 00:36
Thats amazing.
But whats with the candle at the end?
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 28th Jan 2010 09:34
Ok Valle...I´ll try to adjust it...at home I have three pc...the one I use, has XP Professinal, my oldest son has Vista and my junng daughter has a portable pc with Vista as well, and in all three it works different....I had to udjust the sounds again because in my old trinket PC,it works ok but in Vista, the sounds acelerate and slow down. I know that there is a way to make all pc run at the same speed, but even so, this formula is not reliable at all...I`v got four days to fix it.


cheer.

learning every day
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 28th Jan 2010 18:02 Edited at: 28th Jan 2010 18:06
Hi you all...well here is my code... I have been fighting hard to fit the sync rate and to fit sounds according to correct hit, but not only the sync rate change in differents PC but as well the sounds change completly...a mess !! let see next entry.

don´t forget to load sounds or just switch them off.

cheers.




learning every day
Valle
18
Years of Service
User Offline
Joined: 10th Mar 2006
Location: in your girlfriends bed
Posted: 28th Jan 2010 18:33
this is really great for no media, the hand looks fantastic!
Doesn't a simple "sync rate 60" do it?


Madscientist
14
Years of Service
User Offline
Joined: 23rd Aug 2009
Location: Between a rock and a hard place
Posted: 28th Jan 2010 21:06
That WAS AWSOME!

If it hasn't exploded yet, I haven't touched it.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 29th Jan 2010 09:32
@chafari, that was really cool and ran fine for me on vista! Well done!!

chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 29th Jan 2010 11:51 Edited at: 29th Jan 2010 11:55
Thanks so much for you comments

@Valle
I try to sync rate 60 and it was even worse


Finally I found a way to stop sounds when they must not sound...it´t a poor way of doing that...just seting volumen to cero

Ok folk...no more codes?


cheers.

learning every day
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 1st Feb 2010 11:11
Well done chafari! You win!

Now it's your turn to pick the next challenge.

chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 1st Feb 2010 12:43 Edited at: 1st Feb 2010 12:45
Ok...eerh mmmmm Thanks so much... Not enough entries to decide a winner .....so I feel myself like a kid, any way , let me think about it, and I´ll come soon with next challenge.


cheers.

learning every day
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 1st Feb 2010 13:33
Ok friends ... I got the new challenge.
Most of us wondered if there was a way to make lightmapping without further external programs but DarkBasic itself.

Imagine an area in which there are several objects that cast shadows on the ground.
For the next challenge, create a system that generates lightmapping, with the shadows of objects on the ground or also on other objects.

It is not necessary to save the files, but store them in memory and then texture the objects.Shadows won`t be in real-time...just lightmaps.

We are gonna have two weeks time.The deadline is 2nd sunday of February...February 14st midnight.

Good luck to all participants!!


cheers.

learning every day
paul5147
18
Years of Service
User Offline
Joined: 11th Jan 2006
Location: Hot & Sunny
Posted: 1st Feb 2010 17:43
Chafari,i have a small program that does something like this all ready but it use's sparkys collision dll,from what i remember when i swappped out the sparkys bit for DB Pro intersect object,it went from 10 minuets for a simple scene to over 2 hours and then locked up the PC.I think i remember seeing something like this in the code snippets section as well,i'll have a look.
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 2nd Feb 2010 11:46
@Paul5147
Ok paul. I have not seen all the threads of course, and if this has already been done before, we can change the challenge if we all agree.


cheers.

learning every day
Valle
18
Years of Service
User Offline
Joined: 10th Mar 2006
Location: in your girlfriends bed
Posted: 2nd Feb 2010 12:02
hm, regardless of if this has been done before i think this challenge is a little bit too demanding for many people here...
how about something less ambitious, so many people can join the fun, something like: "Do something with rockets!"

just my two cents


chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 2nd Feb 2010 12:33
OK, I don`t know the rules.Can we change the challenge?

cheers.

learning every day
acelepage
19
Years of Service
User Offline
Joined: 2nd Jun 2004
Location: Plattsville
Posted: 2nd Feb 2010 14:56
If we go by precedence, previous competitions have been changed after the fact to allow more participation. I do not expect that anyone has started coding on this one yet, so I would say that you can change the challenge at this stage.

( 2b || !2b ), that is the question. The answer: true
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 2nd Feb 2010 16:15 Edited at: 2nd Feb 2010 16:17
Ok acelepage... so I,m gona change it in order more participants can star a code.
Valley gave me a suggestion. Something with rockets....let see if this challenge is better!

We can make a kinda robot walking on two or more legs, but not on wheels, and firing rockets...something like this:



cheers

learning every day

Attachments

Login to view attachments
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 4th Feb 2010 21:24
Hi all...I start breaking the ice with this little entry, and I encourage everybody to participate to make more fun this board.



cheers.

learning every day
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 5th Feb 2010 09:46
Something's not quite right here, any ideas @chafari?

Attachments

Login to view attachments
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 5th Feb 2010 11:59
Quote: "Something's not quite right here, any ideas @chafari?"


What do you mean?

learning every day
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 5th Feb 2010 12:04
Yes..I know that in some PC works different...the graphic card, interprets the sprites in wrong order.Have you another computer at home to test it?.

Somebody else can test that ?

cheer.

learning every day
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 5th Feb 2010 12:12
I'll try it at home tonight...

Quote: "the graphic card, interprets the sprites in wrong order"

Is this a known bug?

chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 5th Feb 2010 12:42 Edited at: 5th Feb 2010 12:45
mmmmmmh in my Pc it works fine ...



cheers.

learning every day

Attachments

Login to view attachments
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 5th Feb 2010 13:00
Cool!

I'm planning on doing a representation of a robot to try out the dynamics for my next game. I want to make a working system for a walking robot that adapts to the landscape so if it encounters an obstacle it either steps over it or onto it. Also I want its upper body to balance the Bot as it walks, so maybe it swings its arms and bends its upper half to naturally counteract what it's doing with its legs.

A lot to manage without my toolbox of plugins but I'll see how far I can get...

chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 5th Feb 2010 13:53
Well baxslash....here I was kiding with this little code to break the ice as I mentioned, but I`v got a real 3D robot code that I will show at the end.

cheers.

learning every day
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 5th Feb 2010 13:58
Don't be offended, I'm well aware that you can do much better from some of your other posts I've seen!

I still thought it was cool as a quick demo!

chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 5th Feb 2010 14:15
Ha Ha Sorry...I didn´t want you to think that...probably it´s a bit stupid of me to make that coment.


cheers.

learning every day
Dr Tank
15
Years of Service
User Offline
Joined: 1st Apr 2009
Location: Southampton, UK
Posted: 5th Feb 2010 21:01
I might give this a bash. When's the deadline?

chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 7th Feb 2010 02:33 Edited at: 7th Feb 2010 02:35
14st of February...you`v got a long week.


cheers.

learning every day
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 7th Feb 2010 16:18
Quote: "14st of February...you`v got a long week"

eek, maybe I should get started on this then!

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 8th Feb 2010 17:49 Edited at: 9th Feb 2010 10:21
Here is how mine is coming along (finally got started today!)...

Edit: By the way use WASD to move (no collision checks yet)

...and here's an image with a little more done:


Attachments

Login to view attachments
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 9th Feb 2010 15:13 Edited at: 9th Feb 2010 15:16
I'm doing this for my next WIP but I'll be changing a lot of this code I think as there are so many better ways of doing this.

Anyway here's my code so far for a look see! I know it's not got any clever textures and stuff but I've no knowledge of how to produce 'on-the-fly' textures...

If anyone spots any none DBP native commands then let me know as I sometimes forget whether a command is native or plugin!


EDIT: As well as WASD for movement you can now use left mouseclick to fire missiles!!

Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 9th Feb 2010 20:12
@baxslash - that's totally awesome!

I'm impressed with a couple of things in particular...

No limbs - you are moving all the parts individually, and the movement looks great. Love the way the toes angle up and down.

The rockets swoosh out, then swoosh back to hit the target. Is that right? It seems to do that, but my eyes are really old and the screen is kind of dark.

Lovely shadows! I can't get shadows to work on my limbs, not sure why it doesn't work.

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 9th Feb 2010 22:25
Quote: "that's totally awesome!"

Thanks!

Quote: "The rockets swoosh out, then swoosh back to hit the target. Is that right?"

Yes they go out in a straight line from the launcher for a set amount of time then they turn towards the target.

Quote: "I can't get shadows to work on my limbs"

That's odd, are the limbs part of the object or are they objects attached to limbs? If they are attached then maybe you need to set shadow shading onto them seperately?

Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 10th Feb 2010 09:20
Not bad.

My signature is NOT a moderator plaything! Stop changing it!
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 10th Feb 2010 12:44
@baxslash

Wow !!...it looks my own robot ..I like the way you made it walk...it really walks on its own legs...step by step ...really impresive... in my robot code, I just scroll the floor texture, in order the robot doesn`t get lost. T hat made my day .

cheers.

learning every day
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 10th Feb 2010 13:06
Quote: "Not bad."

...thanks, I'll take that as a compliment!

Quote: "it looks my own robot"

They say imitation is the sincerest form of flattery, I liked your 2D robot and thought I'd make mine like it...

I don't think I'll have time to add to it now though so I'd consider it as my entry unless you hear from me before the deadline (shame as I never got round to getting him to crush cars underfoot...)!

chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 10th Feb 2010 14:15
Quote: "shame as I never got round to getting him to crush cars underfoot...)!"


Don´t give up...its a nice entry.
I think that just checking collision to move cars down would be enough...or perhaps scaling the y to cero


cheers.

learning every day
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 10th Feb 2010 15:12
Quote: "...thanks, I'll take that as a compliment!"

You should.

My signature is NOT a moderator plaything! Stop changing it!
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 10th Feb 2010 21:33
Quote: "Don´t give up..."

I'm not, this is a starting block for a project I really want to work on, I just don't know if I'll have time to do any more before the deadline!

It doesn't help that 24 series 8, Survivors series 2 and Lost the 'final' series are all on too!!

TV is rubbish for nearly six months then this... I'm not complaining mind you!

chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 12th Feb 2010 10:47
Well ... we almost reached the weekend...not too many entries for this challenge. this is my entry, although is not finished yet ,as I'm getting very lazy.







cheers.

learning every day
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 12th Feb 2010 12:16
That looks cool. I like the fact you have sound and textures too!

Skyrift
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location:
Posted: 12th Feb 2010 17:55 Edited at: 12th Feb 2010 17:57
As usual, the code is a bit messy, but here's my entry.

Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 12th Feb 2010 20:51
I'm working on an entry, but it may come down to the wire. What's the deadline? Sunday night at midnight forum time?

chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 12th Feb 2010 22:05
@baxslash
Thanks ...I didn`t finishet the rockets yet...I`m on it, but I`m very lazy..

@Skyrift
Nice entry...I couldn´t kill more than two of them...keep trying

@Rich Dersheimer
That´s right..you`v got two days.


cheers.

learning every day
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 12th Feb 2010 23:02
Quote: "You died but took 0 of them with you!"

1st play, I'm going to be annoyingly addicted to this thanks @Skyrift...

And if I get bored of the game I'll learn a few things from the code!! Nice entry!

Skyrift
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location:
Posted: 14th Feb 2010 16:01
Got a bit of difficulty scaling now, as well as a shield and slightly different effects. The shield only recharges when you're not firing.

chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 14th Feb 2010 19:41
I realized that now you gave more chance to the player....Now seven enemies rest in peace


cheers.

learning every day
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 15th Feb 2010 00:37
Feh, I'm not going to have my entry done on time. Oh, well, next time I'll start earlier.

Login to post a reply

Server time is: 2024-05-03 14:31:57
Your offset time is: 2024-05-03 14:31:57