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
Virtual Nomad
Moderator
20
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 27th Aug 2007 00:57
redflames -

some friendly advice:

please show code in code tags as you did in your previous post, and most people won't appreciate a 3.75mb bmp file. if you want people to view something, take a minute to convert it to jpg or another compressed format.

and, welcome to the forums!

RedFlames
18
Years of Service
User Offline
Joined: 25th Aug 2007
Location: Germania
Posted: 28th Aug 2007 17:33
anyone else workin' on that?^^

I improved the physics, shadow-positioning and collision and added jump-pads but the ball is visible through walls because I disabled its zread, so its drawn in front of the bigger,black outline ball(otherwise it would be completly black )

New Code:


btw: fixed code-tag in previous post and attached image as jpg
gadgetfreak 66
19
Years of Service
User Offline
Joined: 26th Sep 2006
Location: Kulin,WA, Australia
Posted: 29th Aug 2007 11:37 Edited at: 29th Aug 2007 11:40
@ RedFlames: Looks great, but for some reason neither the collisions or reflections will work properly on my computer. The reflection is constantly flickering, and though I can move the ball left and right along the platform, the ball will fall through a few units forward or backward, and sometimes just randomly. Not being a fan of DBP's collision system myself, I'm not exactly sure how to get it working properly, so I guess I've done something wrong compiling it or something.

Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 29th Aug 2007 15:52
Looking nice Redflames - groovy background! I get the same problem as Gadgetfreak - the ball keeps falling through the floor after moving it a tiny but.

RedFlames
18
Years of Service
User Offline
Joined: 25th Aug 2007
Location: Germania
Posted: 29th Aug 2007 17:43
thanks but i don't know why thats not working
maybe because i use german darkbasic pro called
"3d games creator - Dark Basic Profesional"...

I attached a compiled version of 5.56mb ( now zipped because it "exceeded maximum upload size" [ 5.5>50 ???] )
Master Xilo
19
Years of Service
User Offline
Joined: 8th Sep 2006
Location: Bern, Switzerland
Posted: 1st Sep 2007 02:19 Edited at: 1st Sep 2007 02:19
@ RedFlames:
- I get the same problems as Gadgetfreak
- you don't need to disable zread for any object if you want to make a comic outline, simply scale your second cartoon-outline ball by -100 (scale object X,-100,-100,-100), this will invert the nromals and bring finally exactly the same effect without seeing the ball through the wall

@ Ric:
Quote: "inc xm#,v#/5

should be:

inc xm#,v#/5.0"

that's not true, only one part of a division or multiplication needs to be float to get the result to be float too. If you change it to:
int(v#)/5, then the result will be different, but

v#/5 == v#/5.0
Mason
22
Years of Service
User Offline
Joined: 20th Mar 2004
Location: Arizona
Posted: 1st Sep 2007 03:07
It's funny because I started making a game called marbles earlier this week just to brush up on DB Pro and I happened to run across your thread with same problem I'm having. I can't seem to fix the rotation of the ball from getting all tweaked. The mesh is a good idea but it definitely kills fps. I'm gunna check out the Lower Logic Rotation Dll, but I've never heard of it. *searching time*


gadgetfreak 66
19
Years of Service
User Offline
Joined: 26th Sep 2006
Location: Kulin,WA, Australia
Posted: 1st Sep 2007 04:15
Dll? I thought it was just a set of functions. The relevant ones are in one of Ric's posts on the previous page, near the end I think.

Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 1st Sep 2007 21:27
Yes - they are a set of functions which can be found here: http://forum.thegamecreators.com/?m=forum_view&t=96978&b=8

Extremely useful stuff in there - shame the thread is locked due to inactivity.

@Xilo: I stand corrected - you learn something new every day!

gadgetfreak 66
19
Years of Service
User Offline
Joined: 26th Sep 2006
Location: Kulin,WA, Australia
Posted: 4th Sep 2007 02:53
Time is running out: 2 more days to go.

So far the only entrant is Red Flames, as well as the examples from Ric, I suppose.

Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 4th Sep 2007 12:37
I will definitely have a proper entry in before the deadline. It probably won't be a full game as such, but it will have the basic ingredients.

gadgetfreak 66
19
Years of Service
User Offline
Joined: 26th Sep 2006
Location: Kulin,WA, Australia
Posted: 4th Sep 2007 13:17
Cool. 30 hrs to go.

RedFlames
18
Years of Service
User Offline
Joined: 25th Aug 2007
Location: Germania
Posted: 4th Sep 2007 21:55
I'll update my code:



Hope this will run anywhere
but i attached compiled version again...
btw i think i know why other get wrong/no collision: the ONLY collision command i use is:

ObjB Num = Object Collision(ObjA Num,0)

maybe this is workin' different here

Mason
22
Years of Service
User Offline
Joined: 20th Mar 2004
Location: Arizona
Posted: 5th Sep 2007 11:44
trying to do this as well but I'm having trouble with physics. If anyone thinks they can help check out this thread

http://forum.thegamecreators.com/?m=forum_view&t=113717&b=1


Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 5th Sep 2007 15:34
Here's my entry. The idea is to get the marble onto the purple platform. Follow the green path - the start is at the front left of the table.

Arrow keys to tilt the table, space key to nudge the marble just incase it gets stuck.

Oh - by the way, it's hard, but possible, I promise!



RedFlames
18
Years of Service
User Offline
Joined: 25th Aug 2007
Location: Germania
Posted: 5th Sep 2007 20:08
Now here is my final code.

Some facts/new things:
- collision just with "object collision(...)" command
- chaotic code
- move with arrowkeys, adapts to camera rotation ( 90°-steps)
- dynamic resetpoint and falling-depth ("checkpoint")
- angular(/aslant/aslope/bevel/ don't know how its called^^) grounds ( with crappy collision)
- moving platform
- jumpers/jump-pads
- (crappy^^) "dynamic" scaled/positioned shadow
- graphics better than crysis/FPSC X10 etc.
- have fun/good luck^^
PS: my best run was 17 seconds, but of course you have to play around and not just rush through to finish XD

Code:


and compiled version attached, as every time ^^

Master Xilo
19
Years of Service
User Offline
Joined: 8th Sep 2006
Location: Bern, Switzerland
Posted: 5th Sep 2007 22:13 Edited at: 5th Sep 2007 22:54
I like this challenges!
Here's my entry:

Line-Roller
by Hurricane-Eye Entertainment


[/center]Visit also: Pacman Challenge, LANdvantiX, LEGO rpg wip, DarkLEGO - BlockCAD in DBPro, LEGO mmorpg, My website


PICTURE



Quote: "CONTROLS:
- press space-button to start
- press return to "pay" 1 point (score) to reload the level (if not yet started)
- click and hold the mouse button to draw lines

Try to get the amount of yellow boxes needed as "target" by drawing lines on wich the ball rolls.
The end point of a line must be more down and right than the startpoint.
You loose if the ball falls / rolls out of the screen."





© 2007 Hurricane-Eye Entertainment
Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 5th Sep 2007 23:19
Redflames: good to see someone going to town with dbpro's lighting effects - emissivity, diffusion, specularity etc. Your code snippet still makes the ball fall through the floor here, but the compiled version works fine. Most odd. Guess it's a versioning difference with the object collision commands or something.

Xilo: nice work - could have been an entry for the 'line runner' challenge we had not so long ago!

gadgetfreak 66
19
Years of Service
User Offline
Joined: 26th Sep 2006
Location: Kulin,WA, Australia
Posted: 6th Sep 2007 11:29 Edited at: 6th Sep 2007 11:31
I know it is now Thursday afternoon, but I couldn't fit it in this morning. There were three entries this time:

Redflames: Marble puzzle game. Cool graphics, good use of lighting. Moving platforms and jump pads.

Ric: Marble puzzle game. Involved tilting the game board to roll a marble round a thin track. Extremely difficult.

Xilo: Line runner, but with a ball. Interesting merge of 2D and 3D, involved drawing the lines while the ball was rolling.

Runner up:


Winner:


Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 6th Sep 2007 13:22
Thanks GF66. I guess it was too difficult - I may update it some time and make it easier by putting more walls in. The hysteresis you mentioned may be that I set the ball's velocity to zero once it is smaller than a certain value. This was put in to make it easier - before, it was virtually impossible to get the ball to stop for the tricky corners.

I'll have a bit of a think and then set the next challenge later.

RedFlames
18
Years of Service
User Offline
Joined: 25th Aug 2007
Location: Germania
Posted: 6th Sep 2007 17:21
Cool I am runner up^^
but its really odd with my compiler...
if i try Ric's entry the camera just points to the wrong direction, Xilos game just exits if the ball hits a line or stops if the ball falls off screen,and at first it said it does not understand "delete objects 100,10000" so i replaced it with

but even with leaving this part out it just exits everytime...

Mason
22
Years of Service
User Offline
Joined: 20th Mar 2004
Location: Arizona
Posted: 6th Sep 2007 21:06 Edited at: 7th Sep 2007 02:59
Looking forward to next challenge, I've been wanting to do one for a while now but never got to it due to school being seven hours. Now it's only two so I got time for Db pro once again

@ Redflames: Your using the trial Version correct? If So, I'm guessing its not the current version everyone here is using. The collision build into Dark Basic Pro has gone through some serious changes through different versions, probably explaining why we have problems with your code. Are you planning on Buy Dark Basic because that would surely do the trick.

@ Ric: The info you gave me for the marble game I'm making should work I'm sure of it, but I'm having some issues with the SC_intersectObject command. If you have time and you can help me figure it out either here or in the thread I made, I would greatly appreciate it

Edit: and Redflames, I think the reason that block of code doesn't work is the fact your limited to a certain amount of objects in the trial version. Regular Dark Basic Pro can have more objects than the limited trial version. Try changing the number to a lower number.


RedFlames
18
Years of Service
User Offline
Joined: 25th Aug 2007
Location: Germania
Posted: 7th Sep 2007 17:02
No, as I mentioned before I have full version, but german one.

but afaik i have all updates, so it should be compatible with others codes...
but that doesnt matter atm, lets first think of a new challenge.
My ideas:
- some round-based cannon-game like scorched 3d (or maybe 2d)

Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 8th Sep 2007 01:43
Ok - this idea has been mentioned before and already had some support, so I'm going to get it started straight away.

_______________________________________________________
New Challenge

Challenge: Flight Simulation

Deadline: Friday 21st September (2 weeks)

Notes: This challenge should be quite appealing, as it should be very easy to get started, but allows for as much detail and complexity to be added as you like. At the very simplest level, a flight simulator could simply take the form of a matrix and a camera which you can control (and I distinctly remeber that the first flight sim I bought for my ZX81 many moons ago wasn't even that complex!). Then you could add an aircraft model, a runway, some terrain ... and some collision detection and physics - maybe even some other AI planes ....

Judging: I'm not judging on any one particular aspect, but I do like to have an 'aim' when trying out an entry - like taking off and landing without crashing, or trying to bomb a target or fly under a bridge - whatever!

Good luck!

Mason
22
Years of Service
User Offline
Joined: 20th Mar 2004
Location: Arizona
Posted: 8th Sep 2007 02:36
Sounds good to me I'm gunna get started


Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 8th Sep 2007 18:59
Excellent choice! I just finished the code for the cartoon plane

Mr Kohlenstoff
20
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Germany
Posted: 9th Sep 2007 02:41
I was bored, so I wrote a small airplane-game-whatever-thing.

You have to fly through the rings to get points. The faster you are, the more points you get. The levels get harder each time, by increasing the speed and the amount of rings. The player loses, when he collides with the ground, or doesn't collect at least half of all rings.




Mason
22
Years of Service
User Offline
Joined: 20th Mar 2004
Location: Arizona
Posted: 9th Sep 2007 03:05
Thats pretty cool game, took me a while to get it working though. in one of your functions you use the variables min and max. These are reserved keywords in the MatrixUtility Dll pack. I just changed the variables to tMin and tMax.


Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 9th Sep 2007 13:24
Yep, that's quite cool - I like the 2d bi-plane. We have a benchmark!

Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 9th Sep 2007 13:52 Edited at: 9th Sep 2007 13:54
Does anybody know how to get media-less sounds? There was a thread before, but the function doesn't seem to work in the latest versions of DBP

BTW, here's my entry so far


Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 9th Sep 2007 18:42
Nice explosion when you hit the ground!

Something happened between versions to the sound memblock format, screwing up the old createsound() function we came up with a while back. As I'm still using 6.2 I haven't been able to do any testing to get it working with later versions. (I can't update now as I have too much work based on 6.2 to risk changing things). If you want to delve into the old code, though, it's here:



and an example of the parameters used to make a sound:



Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 9th Sep 2007 18:52
Too late I already fixed it up to work on all versions of DBP (and maybe DBC?) check the code snippets board

Virtual Nomad
Moderator
20
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 9th Sep 2007 20:18 Edited at: 9th Sep 2007 20:21
nice, diggsey pretty tough but i landed a couple rounds. i gotta brush up on my bi-plane skills. it's a little too frantic (i haven't had enough coffee yet today) but i'll give it more time later. oh, also, i was smoked the first time and it called it a "draw". 2nd round scored an accurate "you lose!". and, the explosion rocked. add that sound code and i'll be hooked!

Virtual Nomad
AMD XP 1800+ (~1.6 Ghz) / 1.5 GB RAM
ATI Radeon 8700LE 128 MB / Windows XP
Virtual Nomad
Moderator
20
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 9th Sep 2007 21:22 Edited at: 9th Sep 2007 21:26
i'll throw my idea into the hat here. plenty to work on (more realistic physics, critter AI, etc) but the basic premise is there:

mouse = look
button 1 = flap
ctrl = center camera
arrow keys = rotate + tilt



could someone tell me how to make the wings face up vs down? and i've little experience with limbs. can the head be "smoothed" to remove the gap?

Virtual Nomad
AMD XP 1800+ (~1.6 Ghz) / 1.5 GB RAM
ATI Radeon 8700LE 128 MB / Windows XP
Mason
22
Years of Service
User Offline
Joined: 20th Mar 2004
Location: Arizona
Posted: 9th Sep 2007 22:46
I don't really know whats going on in the game, 5 seconds after flying I blow up... but... That explosion effect is siick Nice work so far


Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 9th Sep 2007 22:50
@Virtual Nomad
You must have crashed into the enemy The AI is quite good, but not perfect, and can sometimes crash into you.

Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 10th Sep 2007 20:40
OK, here's my new version, WITH 3D SOUNDS!!! (not using the built in 3d sounds though)


RiiDii
21
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 19th Sep 2007 08:19 Edited at: 19th Sep 2007 08:21
I've been away from these challenges for a while; now I have a vacation and I am staying home. So I figured I'd give it a go as I really do miss these challenges.

Here's my start, a flight sim so far. I've got the terrain and the basic controls. Next, I want to add some physics. Then collisions. I might go either Dog Fight game against an AI opponent or an Aerial Course to fly through.

Controls:
Up/Down Arrow = Speed Up/Down
Left/Right Arrow = Rutter Left/Right (slow turn)
W/S = Pitch Down/Up
A/Z = Roll Left/Right



Edit: PS Ric: That last challenge you won was fantastic. I hope you continue work on it. Not only was it great eye-candy, it was fun to play as well (not that I got very far )


Open MMORPG: It's your game!
Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 19th Sep 2007 10:31
Welcome back Rii - I missed you around here!

I wondered if anyone was going to make use of the advanced terrain in this challenge. That's an impressively big landscape (or, the plane moves impressively slowly!)

@everyone: 3 days left on this - deadline is Friday night.

Virtual Nomad
Moderator
20
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 19th Sep 2007 20:29
count me out of the challenge. i was dished a new work schedule... a steaming pile of a dish :/ atleast i can still watch from the sidelines.

riidii - purdy.

Virtual Nomad
AMD XP 1800+ (~1.6 Ghz) / 1.5 GB RAM
ATI Radeon 8700LE 128 MB / Windows XP
RiiDii
21
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 19th Sep 2007 22:00
Thanks Ric and V.N. Here's an update... has some physics - no crashing yet. You may want to tweak some of the settings; gravity, friction, and lift. Right now, I think it is pretty close. You can crash if you head to the ground too fast, take off and landing is doable, and the controls handle well.

There is also the start of an instrument panel. On the right is an angle-ometer (I have no idea what it is called). On the left is a something akin to an altimeter, showing the distance between the plane and the ground: It auto scales; red is no scaling, yellow is *0.1, and white is *0.01.




Open MMORPG: It's your game!
Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 22nd Sep 2007 13:26
Ok - judging time!

There were four entries into this challenge - and they couldn't have been more different from one another:

Mr. Kohlenstoff: A 2d flying game, using just line graphics, which gave it a nice retro look. I liked the bi-plane drawing, and the entry was very neatly coded. It had an objective, which involved flying through hoops and avoiding the ground - and it seemed to get harder as you progressed. Quite playable, too.

Virtual Nomad: An unexpected interpratation of a flight sim - it was either a bird or a Leonardo da Vinci flying machine - either way, you had to flap your wings to gain altitude, and could then glide back down again. Interesting entry with potential.

Diggsey: A 3d dogfight with a cartoon style. Had lots of game elements, including 3d models, sound (good to see you got that working again), collision, artificial intelligence, and some cool explosion effects - all of which, when put together, made a playable game.

RiiDii: A more traditional flight sim, in 3d from a cockpit view. Was the most realistic entry, due in part to the huge landscape which made use of the advanced terrain commands, and some physics which meant, unlike the other entries, you actually needed to gain some speed before taking off. The controls seemed a bit slow - but I guess you were going for more of a 747 than F18 feel! Would have been good to have a runway and the possibility to crash if you missed it or hit it too heavily. Also had some cockpit instruments.


Because the entries were all so different, it was difficult to compare them on a like for like basis - however, after taking a number of factors into consideration, the runner up is:



and the winner is:



Onto the next challenge!

da power pwnerer
19
Years of Service
User Offline
Joined: 28th Jul 2006
Location: Pittsburgh, PA
Posted: 22nd Sep 2007 14:20
Digg, go for an RPG compo


http://Freewebs.com/noobisoft
Come to Noobisoft's website today!
RiiDii
21
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 22nd Sep 2007 20:02
Congrats Diggsey!


Open MMORPG: It's your game!
Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 22nd Sep 2007 23:03
YAY

An RPG sounds a little too much to do for a compo, so more ideas are welcome

el zilcho
19
Years of Service
User Offline
Joined: 4th Dec 2006
Location:
Posted: 23rd Sep 2007 01:56 Edited at: 23rd Sep 2007 01:56
what about a particle effects editor?
Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 23rd Sep 2007 11:11
Good idea, but I'll expand on it a bit

Create a special effects editor challenge

You must create an editor that allows the creation of special effects. They can be 2D or 3D, and should have as many varieties of possible effects as possible. If it exports to .dba code, that would be a HUGE plus!

Deadline:
2 weeks from now, 7th October

da power pwnerer
19
Years of Service
User Offline
Joined: 28th Jul 2006
Location: Pittsburgh, PA
Posted: 23rd Sep 2007 15:40
and the RPG idea would be hard... pfft, nah.....


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: 23rd Sep 2007 19:59
Hmmm..... don't know about a whole code exporting multi-special effects editor - that sounds like a pretty big job!

I'll have a go at creating just one or two special effects functions, though. Like an explosion, or lens flare or something, that could easily be integrated into someones code.

Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 24th Sep 2007 00:40
It doesn't have to do many different things, it just has to have as many 'tweakables' as possible

Login to post a reply

Server time is: 2026-07-16 19:54:05
Your offset time is: 2026-07-16 19:54:05