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
Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 6th Mar 2007 11:13
Seems to be a mismatch between what is displayed in the thread, and what it says on the main board. Well, as I'm not counting them all from the beginning, I'd say we're on 5000 somewhere around here, and that'll do! It's a big milestone, and a fantastic achievement which really shows what a great community this is.

Deadline tomorrow I think .... better try and get my entry finished!

gadgetfreak 66
19
Years of Service
User Offline
Joined: 26th Sep 2006
Location: Kulin,WA, Australia
Posted: 6th Mar 2007 14:01
Funny how many people have decided to do shmups, isn't it? Anyway, heres my contribution:



Arrow keys control ship.
Space bar fires energy pulse/big laser thingy.

You are trying to overload the viruses (red crosses). Each one destroyed will give you 500 points.
Try not to hit the civilian traffic(blue rectangles). Destroying one will result in 5 seconds where you cannot gain score.

The viruses will suck in civilian traffic as well as you and leech out their/your health.

Also, before anyone comments on it, not being able to move while firing is not a bug. That's just how it is.


omnia dicta fortiora si dicta Latina
Alexb Orsova
20
Years of Service
User Offline
Joined: 6th Dec 2005
Location:
Posted: 6th Mar 2007 22:36 Edited at: 7th Mar 2007 01:20
Hello again. Here's the most recent update to my game:



I added:
-sound effects and a sound subsystem
which prevents more than one sound
attempting to play at the same time
-sound toggling key (to turn off sound
if it gets too annoying)

I updated:
-the intro message
-the resoluition to 1024 x 768 x 32
-the number of enemies
-the speed of the game

Don't believe this sentence.
Alexb Orsova
20
Years of Service
User Offline
Joined: 6th Dec 2005
Location:
Posted: 7th Mar 2007 00:30 Edited at: 7th Mar 2007 18:37
Sorry for double posting. I didn't realize the message above was mine
until I posted. BTW, my high score on my game is:

Time: 316 Seconds
Enemies Killed: 356

[EDIT]

Today's the deadline (7th)!

[/EDIT]

Don't believe this sentence.
Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 7th Mar 2007 19:35 Edited at: 7th Mar 2007 21:31
Here's Alpharoids, final version.

Like asteroids, but slightly different. You get 10 points for shooting the highest letter (ie. closest to the end of the alphabet) on screen, and 1 point for shooting any other letter. So, to get the maximum score, you should try to shoot them in reverse alphibetical order. Easier said than done!

It has infinite levels, antialiased text, sound effects (thanks Acelepage) and a nice motion blur effect.


<edit> code revised and posted below </edit>

Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 7th Mar 2007 20:18
After the 2nd wave, no more levels would start. Occationally, a letter gets stuck at the bottom of the screen. And several letters passed over me without killing me. (I did die once though)

Alexb Orsova
20
Years of Service
User Offline
Joined: 6th Dec 2005
Location:
Posted: 7th Mar 2007 21:07
@acelepage

I have a question about your sound code. What does wave# do? Through experimentation I've discovered the purpose (somewhat) of the other variables but wave# seems to have no effect. I've even tried it with long sounds (listening and changing its value).

Don't believe this sentence.
Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 7th Mar 2007 21:27 Edited at: 7th Mar 2007 21:30
Phaelax - things that work on my pc never seem to work on yours! I'll take a look and see if I can figure out what's happening.

<edit> This should solve the 'no more letters appear after the second wave' issue. My mistake. But the collision just uses the 'sprite collision' command. Can't think why it wouldn't work the same for you .....



Alexb: I think the wave# variable defines the starting point of the wave - called the phase angle. Playing one sound at a time, you will not hear any difference wherever it starts, but if you used the function to layer sounds, playing waves with same frequencies but different phase angles could result in differences in the way the sounds combine - for example, if they were out of phase (eg. one wave cycle starts at 0 degress, and the other at 180 degrees), the two sounds would destructively intefere - in other words, they would cancel each other out resulting in little or no sound at all.

Alexb Orsova
20
Years of Service
User Offline
Joined: 6th Dec 2005
Location:
Posted: 7th Mar 2007 21:32 Edited at: 7th Mar 2007 21:33
@Ric

Thanks a lot Ric, that helped a lot. By the way, I checked out the link you posted earlier for a sound creation function. It seems as if that one is more clearly defined but harder to use due to the larger amount of settings. Just thought I might tell you.

@ALL

When is the deadline (time not date)? Is it at midnight?

Don't believe this sentence.
Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 7th Mar 2007 21:37
Yes, it takes a bit more getting used to because of all the parameters, but it does give you good control of the sound if you understand what they all do. However, it appears not to work anymore since versions 6.4 and 6.5 of DBPro - they did something to the sound memblock commands. Luckily, Green Gandalf has been taking a look at it and we should have a new version soon. He is working on including a piano keyboard with record/playback, so we may be able to include no media music into our challenge entries soon!

Alexb Orsova
20
Years of Service
User Offline
Joined: 6th Dec 2005
Location:
Posted: 7th Mar 2007 21:43
So, Ric, whose entry do you like so far?

Don't believe this sentence.
Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 7th Mar 2007 21:50
Mine of course !!

But seriously, I think they're all great, but it's not for me to say - I'm not judging this one. The deadline is usually midnight in your own time zone. But, as it's a weeknight, we should all be in bed long before that!

Alexb Orsova
20
Years of Service
User Offline
Joined: 6th Dec 2005
Location:
Posted: 7th Mar 2007 21:52
I know, I was simply asking your opinion. I believe Brain111 is judging this one, no?

Don't believe this sentence.
Brain111
19
Years of Service
User Offline
Joined: 5th Feb 2007
Location: In my own little world.
Posted: 8th Mar 2007 03:52
Well, it's currently 10. I'm not staying up, so I'm gonna judge it right now.

Runner up:


Winner:
Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 8th Mar 2007 08:51
Congratulations GF66! Godd challenge, that was. What's up next then?

gadgetfreak 66
19
Years of Service
User Offline
Joined: 26th Sep 2006
Location: Kulin,WA, Australia
Posted: 8th Mar 2007 09:55 Edited at: 8th Mar 2007 10:00
2/4. Not a bad ratio if I do say so myself.

To be honest though, my imaginative capability is basically non-existant. I really have no ideas whatsoever for the next challenge. Therefore, anyones ideas will be gladly welcomed.


omnia dicta fortiora si dicta Latina
Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 8th Mar 2007 23:37
Explosion effects?

gadgetfreak 66
19
Years of Service
User Offline
Joined: 26th Sep 2006
Location: Kulin,WA, Australia
Posted: 9th Mar 2007 00:04 Edited at: 9th Mar 2007 00:05
hmm...its definitely a contender. I've always wondered how to do good explosion effects, but never really tried. Most people would probably have a good use for it too. Anyone else have any more ideas/comments?


omnia dicta fortiora si dicta Latina
Nicholas Thompson
21
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 9th Mar 2007 00:14
Explosion effects would be cool - but DAMN hard to do without media.

My suggestion for the last challenge was a "low profile" plasma like effect. The kind of thing you often see WinAmp making to music. It could go in the background of an existing game to make it more psychedelic. Something like this but constantly "evolving". The trick would be to do it in such an efficient way that it didn't want to set fire to your PC. Something with a VERY light footprint.

[center]
Brain111
19
Years of Service
User Offline
Joined: 5th Feb 2007
Location: In my own little world.
Posted: 9th Mar 2007 00:47
Ohhhh.... your last suggestion for the competition makes sense now.
acelepage
22
Years of Service
User Offline
Joined: 2nd Jun 2004
Location: Plattsville
Posted: 9th Mar 2007 01:04 Edited at: 9th Mar 2007 01:04
@Alexb:
Sorry for a late response. Ric's explanation is very good. The wave# variable is used to generate the sine wave for the sound. It loops back to 0 when it hits 360.

@gadgetfreak:
For a challenge idea, how about creating a morph effect? This is where one image/object changes smoothly into another object. This could be a 2D morph of an image to another image, or a 3D morph of an object into another. It could even be like a transformer, those toys that change into other toys.

( 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: 9th Mar 2007 01:07
I like the plasma effect thingy idea. Some other ideas off the top of my head:

-top down racer - like scaletrix (or however you spell it)
-radio controlled helicopter/aeroplane sim
-curling game
-text adventure

Nicholas Thompson
21
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 9th Mar 2007 01:46
Top Down Racer - I like!!
Curling game? Do you mean like the scotish sport?

[center]
Alexb Orsova
20
Years of Service
User Offline
Joined: 6th Dec 2005
Location:
Posted: 9th Mar 2007 02:44
How about a planetary weather simulation?

Don't believe this sentence.
Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 9th Mar 2007 10:19 Edited at: 9th Mar 2007 10:39
Quote: "Curling game? Do you mean like the Scottish sport?"


Yeah - like bowls on ice. Never played it in real life, but it looks quite fun. <edit> Just looked at the link on wikipedia - woah! It's more involved than I realised!

gadgetfreak 66
19
Years of Service
User Offline
Joined: 26th Sep 2006
Location: Kulin,WA, Australia
Posted: 9th Mar 2007 11:04
Woah. This must be the most posts while I've been at school. The top-down racer sounds good. If you look at something like this: http://generally.rscsites.org/, you can see that the cars don't have to be that detailed with media, etc. to make an absolutely awesome game. So:

Challenge: Top-down racer.
Closing date:Friday 23rd of March (two weeks from now)

The game can either be 2D or 3D, as long as the camera is top-down. The camera does not have to be fixed, mind, it is allowed to scroll sideways. Other than that, it can be any type of racing you want, and it is not necessarily confined to vehicles with wheels.



omnia dicta fortiora si dicta Latina
Nicholas Thompson
21
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 9th Mar 2007 14:40
Generally is one of my most favourite games EVER - if someone can do justice to that game here and add network, I'd love you forever!

[center]
Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 9th Mar 2007 15:39
Cool - this one is going to be fun!

gadgetfreak 66
19
Years of Service
User Offline
Joined: 26th Sep 2006
Location: Kulin,WA, Australia
Posted: 9th Mar 2007 16:59
It's interesting though, the most fun in Generally is usually had with three other people crammed on the keyboard running amok all over the screen, not racing at all. We used to almost fall over laughing every time someone in a one-wheeler got smashed side on with a truck. Good times.


omnia dicta fortiora si dicta Latina
Darth Vader
21
Years of Service
User Offline
Joined: 10th May 2005
Location: Adelaide SA, I am the only DB user here!
Posted: 11th Mar 2007 10:30
I have a brilliant idea for this game! I just wish I knew how to make good textures from the DATA command!

Any help with that?
Quote: "f someone can do justice to that game here and add network, I'd love you forever!"

Might be a good chance for me to learn about networking!
I'm definitely in on this one unless my map editor gets in the way!


gadgetfreak 66
19
Years of Service
User Offline
Joined: 26th Sep 2006
Location: Kulin,WA, Australia
Posted: 11th Mar 2007 14:34
What kind of textures are you talking about? If it was just blocks of colour on different faces, you could just put the co-ords and colours for boxes on the texture in a data statement. It might take a bit if trial and error to line it up with the default UV coordinates of DBP's primitives, but it's possible. Short of listing every pixel bitmap style, I think boxes or even a vector graphics system is the only way to go.


omnia dicta fortiora si dicta Latina
Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 11th Mar 2007 15:10
Discuss:

What methods are people thinking of for producing a track which will enable collision with the edges of the road, and waypoint markers for AI cars?

I was thinking about using a tile based system, perhaps made of 3d planes. Some road tiles, and some grass or other non-road tiles, and placing them according to a set of data statements. Numbering the road tiles in the order they go around the circuit would provide the waypoint data.

I can see this method working for a circuit with straight roads and right angle corners, but I don't know how to go about curved sections. Ideas?

Nicholas Thompson
21
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 11th Mar 2007 16:49
The way generally does it (which also makes it really accessible for "newbies") is you make your track in MS Paint with about 8 colours - each colour representing a different track part, eg grey = track, green = dirt, brown = mud, red = red/white kerb, etc. You also provide a greyscale heightmap too.

Dunno if thats any help - obviously, the no-media thing is limiting, but you could provide 1 built in track which is made using data statements and then pass that data into functions which could also take the data in the same form, but from a file-read instead?

As for AI, GR lets you define waypoints. I assume then, the game maybe uses bezier curves or something? The AI in GR is very simple, but quite fun. I think the difficulty is adjusted by how quick the opponent cars are (eg power, grip and top speed multiplier).

[center]
Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 11th Mar 2007 20:54
So, if you colour coded the various parts, I guess you would use the 'point' command to check what colour a car is currently over, and whether it is on the road? If so, then I think using 2d sprites would probably work best for the cars, as the point command takes 2d coordinates.

Daemon
20
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 11th Mar 2007 21:18 Edited at: 11th Mar 2007 21:55
It's not the best looking think I've ever made, and the place it says you are in is a huge approximation, but it works well.

Use arrowkeys to move.
It uses a tile based system
-grey=road (good)
-green=grass (slows you down)
-black=wall (bad)



Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 11th Mar 2007 23:01
Woah - that's really good! I'm impressed you've got this far within 300 lines, too. I'm going to study your tile system now.

Daemon
20
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 12th Mar 2007 02:24 Edited at: 12th Mar 2007 21:04
Thanks, but the tiles aren't complicated enough to really study. It was your idea which I stole anyway.
I've made some superficial upgrades. You can now use "wasd" to control the car.
Also, I stole some sound code from Hobgoblin Lord.
There are now boost squares (the red and yellow ones)


Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 13th Mar 2007 10:49 Edited at: 13th Mar 2007 10:50
I know I been saying this a lot lately, but I really am going to try and enter this time!

I been working a track editor which, when done, will just give me the info I need to put in a few lines of DATA statements.

Right-click to add a new point, left click to move the nodes and control points.





Nicholas Thompson
21
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 13th Mar 2007 11:28
nice code! I like the concept of using curves like that for the track. I'd personally look into using bezier curves... You'd get a little more accurate control over the curve.

[center]
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 13th Mar 2007 21:02
I'll take a look at that, thx.

BillR
23
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 18th Mar 2007 13:12 Edited at: 18th Mar 2007 13:16
I can't jump to the last page, or past page 126.

edit: I thought there was a problem, no posts lately, and couldn't jump to the last page, seems ok now.

Anyway, It has been a long time since I have had any time to enter a challenge. I am working on an idea for this challenge, hope it works.
gadgetfreak 66
19
Years of Service
User Offline
Joined: 26th Sep 2006
Location: Kulin,WA, Australia
Posted: 18th Mar 2007 13:53
Just as a notice to everyone, I'm going on a school camp tomorrow, so I wont be able to post until Friday afternoon, which happens to be the end of the challenge.

Just incase someone thinks I've disappeared.


omnia dicta fortiora si dicta Latina
Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 18th Mar 2007 14:11
The jump to last page problem always happens when a page is completely full - and no-one has posted at the beginning of the next page. I guess when a page is full, it triggers an increase in the number of pages - but when you go to the new page there is nothing there.

I'll definitely be entering something for this challenge too ... hopefully find some time over the next couple of days.

Nicholas Thompson
21
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 19th Mar 2007 11:03
Ric - its often more to do with deleted posts. You can see that there is a +3 difference between this page and the topic list page in terms of post count. This means while the topic page thinks we're on a new page, this post listing (here) think's were still a page behind.

[center]
Philip
23
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 19th Mar 2007 21:56
I'd recommend splines over bezier curves. That is because mathematically if you add two splines together, i.e. with one's end at the other's beginning, you get a much smoother curve than trying to put two bezier curves adjacent to each other. There is a long explanation of why this is the case in the book Mathematics for Game Developers (by Tremblay).

Cheer if you like bears! Cheer if you like jam sandwiches!
"I highly recommend Philip" (Philip)
Nicholas Thompson
21
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 19th Mar 2007 23:09
Philip - while I bow down to your knowledge on such subjects (I will now look into what exactly Splines are), I know that it is more than possible to join two bezier curves together, especially if they're quadratic (ie, both start/end points have their own control points).

Basically, say you have an end point with it's control point at [-5, -3] away from it, relatively. The start point of the next curve should have its own control point at [+5, +3] (relative). Basically, equal in magnitude, opposite in direction. This should cause the curves to line up nicely. I might try to bash out an example tonight (I've been meaning to for a while).

[center]
Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 20th Mar 2007 18:58
Argh! Just lost a good hour or so of code on my top down racer!! The IDE didn't save when I clicked save for some reason.

Back to the start again!!!

Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 20th Mar 2007 19:28
What IDE do you use???

Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 20th Mar 2007 23:25
I was using the default IDE ... I'm now using Codesurge. Codesurge is definitely a more refined piece of software, but I did like the default IDE - guess it's just what you get used to.

NA170425
User Deleted
Posted: 20th Mar 2007 23:40 Edited at: 20th Mar 2007 23:42
I liked the default IDE too but couldn't live with code getting eaten, so I changed CodeSurge's colors to make it look like the default IDE. It feels a lot more familiar now.



Do not meddle in the affairs of dragons...for you are crunchy and good with ketchup.

Login to post a reply

Server time is: 2026-07-20 04:15:17
Your offset time is: 2026-07-20 04:15:17