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
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 14th Dec 2005 23:37
ah yes, that is a very fine texure you got there. Now I need to make some sort of smoky texture for my particles.. uhhh, ok, I\'ll make some circles

Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 14th Dec 2005 23:40
interesting - I thought the forum blocked duplicate posts...

Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 14th Dec 2005 23:45
Nice work Zotoaster - the car shadow is a nice touch - and I like the feel you get of flying through the air when you jump!

Flindiana Jones
20
Years of Service
User Offline
Joined: 3rd Nov 2004
Location: Bosnian Power
Posted: 14th Dec 2005 23:49
Thanks TDK!

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 15th Dec 2005 00:06
Thanks Ric.

Anyway, here's an updated version.

when you slide particles come out of the back end of the car. They kinda look like smoke, not enough, but doesn't matter at the moment



Now, time to make it more like a racing game.

I'm wondering, should I make it so you do laps, or capture the flag kind of race, like limit rush.

Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 15th Dec 2005 00:09 Edited at: 15th Dec 2005 00:10
I'm happy with either! Laps are standard and "safe" whereas flag based could be good old fashioned origional fun!

EDIT: The skidding is cool - however I tend to jump so often I cant skid

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 15th Dec 2005 00:15
Yeah, but dont worry, that's only a test landscape. It won't be so jumpy in the end. I think I'll go with laps for this one. I haven't ever done that before, it should be a challenge.

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 15th Dec 2005 02:52
Ok, back now with a brand new landscape, and some lighting too...




I must say though, that matrix tilting is driving me insane Really annoying.

I'm off to bed. I don't have any exams now till May, but I'm sleepy anyway

RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 15th Dec 2005 07:29
Nice work Zotoaster! I like the miniature golf feel of the track and the slidding effects.


Open MMORPG: It's your game!
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 15th Dec 2005 08:15
thats fantastic!! It seems to slow down a little too much in the air maybe, but you're certainly in the lead!!

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 15th Dec 2005 09:41
True, but you can just put the air traction up (atrac#)

Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 15th Dec 2005 12:35 Edited at: 15th Dec 2005 12:38
Another update.

Now the traction is up to 1 so you dont slow down in the air. Plus, I have some pretty descent AI in now.

All that's really left now is to make laps and see who wins, and make winning and losing screens. I also thought I could perhaps make a menu where you can customise your car (well, colour it )




[edit]

Quote: "I'm happy with either! Laps are standard and "safe" whereas flag based could be good old fashioned origional fun!"


Hmm, maybe both? Could be an option, I still have, like, 2 weeks left to do it

Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 15th Dec 2005 15:04
Nice entry so far Zotoaster!

It seemed a little fast but it was much better then i expected for a no-media game

Quote: "Although December is an unusual time of year for those isn't it?! Thought finals were more about May time?"

Those are "end-of-spring-semester-finals"
i was doing "end-of-fall-semester-finals"

Maybe you're thinking of high school finals... (or maybe the UK just does things different )

"We make the worst games in the universe..."
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 15th Dec 2005 19:31
Here's n update.

I know the countdown is crap, but.. oh well, lol... I only really posted it to show off the speedometer.



DarkBasic Pro Guy
20
Years of Service
User Offline
Joined: 4th Jun 2004
Location: Broomfield, Colorado
Posted: 15th Dec 2005 20:05 Edited at: 15th Dec 2005 20:07
@Zotoaster:

your speedometer only goes to 70.

Very good otherwise.

On the countdown, it gets you ready. Only suggestion, the countdown would be more interesting if it were actual 3d objects.

If you are asking for available DLLs, Go here
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 15th Dec 2005 20:14
yah, as I said, it was crap...

and the speedometer only goes to 70 because the maximum speed is 70, you can change that by changing the maxspeed# variable to whatever you want.

DarkBasic Pro Guy
20
Years of Service
User Offline
Joined: 4th Jun 2004
Location: Broomfield, Colorado
Posted: 15th Dec 2005 21:00 Edited at: 15th Dec 2005 21:08
I can see why you chose 70, I tried 200 (I could not steer)

I will try some things with this such as user chosen speed

If you are asking for available DLLs, Go here
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 15th Dec 2005 22:53
Zotoaseter is running away with this one already. I guess I better make a start on mine! Anyone else working on this challenge?

Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 16th Dec 2005 01:57
I plan on it, but it just seems like I never have any time these days.


Deadly Night Assassins
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 16th Dec 2005 11:34
I'm working on 1. I'm not good at finishing programs, so don't expect too much from it.



The car still needs to be modeled. Same for the wheels.
I'm going for the physics.

Immunity and Annihalation makes Immunihalation...
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 16th Dec 2005 14:07
That's quite interesting physics, makes more sense than mine anyway.

Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 16th Dec 2005 14:14
I had to improvise

Immunity and Annihalation makes Immunihalation...
CPU
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Carlsbad, CA
Posted: 16th Dec 2005 16:51
@Zotoaster - Just a little hint, but your gravity needs a bit of tweaking, if you go over the jump real slowly, you seem to just float down... might need a little adjustment on that, but otherwise good job!

CPU

[center]K-OS Battlefields
IS
///---///---///---UNDER CONSTRUCTION---\\\---\\\---\\\
[center]
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 16th Dec 2005 17:04
Yeah, I noticed that too... really easy to just change it though.

Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 16th Dec 2005 20:36
top speed seems dependent on angle. Sometimes I top out at 5, other times at 6.666


Deadly Night Assassins
Neofish
20
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 16th Dec 2005 23:58
i got it to 8 once

New site!
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 17th Dec 2005 07:23 Edited at: 17th Dec 2005 17:29
This is a sort of attempt at something that I think might be similar by a distant relationship to ragdoll physics. In other words, my attempt to do ragdoll-ish physics. Each wheel has independent physics applied to it and then the wheels are "joined" together. The physics continue to apply, so you get the flipping around. If you flip over, the controls are reversed because, well the vehicle (if you can call it that) is upside down.

Needs more work, but it's at a point you can see where this is headed.




Open MMORPG: It's your game!
DarkBasic Pro Guy
20
Years of Service
User Offline
Joined: 4th Jun 2004
Location: Broomfield, Colorado
Posted: 17th Dec 2005 10:59
@RiiDii - Very nice, you could make a game like quad with that there.

If you are asking for available DLLs, Go here
CPU
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Carlsbad, CA
Posted: 17th Dec 2005 17:13
Argg... Rii, why does your code keep giving me these 'debug asertations' when it's trying to make the terrain? And it's not just this one, your last one (star wars trench run) did the same thing... And why is it crashing during advanced terrain?

CPU

[center]K-OS Battlefields
IS
///---///---///---UNDER CONSTRUCTION---\\\---\\\---\\\
[center]
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 17th Dec 2005 17:30
Try it now CPU. I took out the extra AT work since this isn't infinate terrain.


Open MMORPG: It's your game!
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 18th Dec 2005 02:56 Edited at: 18th Dec 2005 06:29
Okay, got it to be 4 wheels working together now. Pretty decent physics going on; each wheel has its own applied physics. It can be a little rough to steer right now (need to work on a limiter and a decent turning speed) so it takes a little getting used to. Also, if you flip over, the controls are all reversed still. The floating numbers are for debug purposes only right now. I also want to try and speed it up a bit.



Edit: Some improvements. Mainly, the FPS is back up to speed. Physics are improved; mainly less friction in the air and more friction on the ground. Add a "sticky" accelerator that holds the speed for a while, but it slowly drops off. Steering is improved a bit with a limiter, but it still needs some fine-tuning.

Enjoy.


Open MMORPG: It's your game!
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 18th Dec 2005 06:38
Okay - I really would like to fix this, but without a little more information - I really doubt I can. I removed any messing with the Advanced Terrain, so that should no longer be an issue.

I need at least a line number to start with. Ideally, this should be retreived from Step-Through Debug mode. Note: Line 52, as indicated by the error message box, is not anything that should cause a crash. Next thing I would need to know is which version of DBPro is being run and if there are any dlls added. And finally, when running the code, are you running it in debug mode or exe mode?


Open MMORPG: It's your game!
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 18th Dec 2005 11:07 Edited at: 18th Dec 2005 11:08
Riidii - thats fantastic! The first time I ran it was when it was in the temp folder - that failed. Silently crashes and I cant find a crash log. I then changed the IDE to compile it to c:testgame.exe and it worked fine 2-3 times in a row. Those are some great physics!!

One point, The speed should be linked to the power wheel's rpm, otherwise when you jump, you dont lose speed and it causes the landings to be quite "energetic" I think you might need to make it so when you let go of up/down, it stards to make the speed tend towards zero... Similar with the steering too I think...

EDIT: Mold Rat, Riddii, etc - what version of DBP u using? I'm using 5.9b3...

Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 18th Dec 2005 11:38
@Mold Rat

I had a similar error message to that one recently. I found that I had the Advance Terrain plugin in two different places. (User-plugins and Licensed plugins I think) I deleted it from user-plugins and everything was fine.

Maybe you should have a look and see if you have the same thing.


Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 18th Dec 2005 12:47
Great coding Rii. Some refining to do obviously, but the underlying physics is great. The wheels tend to 'sink' into the ground quite a bit on my pc - to the extent that I'm often seeing the wheels from underneath the terrain. Impressive start though - can't wait to see where this one goes.

Freddy 007
19
Years of Service
User Offline
Joined: 30th Nov 2004
Location: Denmark
Posted: 19th Dec 2005 16:34
RiiDii, I can't run your code. I'm using the "final" 5.9. It just crashes silently right after the heightmap has been build.


I can't be fired... Slaves are SOLD!
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 19th Dec 2005 17:33
Okay for those that cannot run my code, please help with the following.

First, make sure you do not have a second version of the Advanced Terrain plugin anywhere. If you have DBPro V5.8/V5.9, you need to delete any old versions of Advanced Terrain (see Scraggles post above).

Second, try runnning this simplified code of Advanced Terrain. Let me know if it works or not. If this code silent crashes, please look for a crash log and post that.



Third, no one has to help. But since it works fine on my computer - don't expect a fix unless I can get more information. It's been well over 24 hours since I last asked for help and all I got is another 'it doesn't work'. That's not very helpful.


Open MMORPG: It's your game!
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 19th Dec 2005 18:05
That code works fine for me but your main program crashes out silently. I have had lots of issues with all your code snippets in the past when you were plotting points outside valid bitmap area. Some pcs crashed silently, others didnt. I haven't had time to debug your snippet yet to see which line is causing the crash but if noone has found the answer I'll have a go later.

Boo!
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 19th Dec 2005 20:21
Your code works fine here - I'm using v5.9 and haven't made any changes to my advanced terrain folder. Just a thought though - I've sometimes had trouble running a program which uses load and save files from a temporary directory. I've found that making a proper project folder and running the program from there sometimes solves the problem.

Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 19th Dec 2005 22:10 Edited at: 19th Dec 2005 22:35
works fine for me, i'm using 5.8

ok i ran your other demo that actually had the vehicle in it, and it crashed silently on me.

Quote: "
[COMMON]
PathToEXE=Cark Basic SoftwareDark Basic ProfessionalTempCrashOn_12_19_05.txt
[CEXE]
m_dwRuntimeErrorDWORD=Internal Code:0
m_dwRuntimeErrorLineDWORD=203
"


the advanced terrain plugin is only in the "plugins-licensed" folder

it seems to be crashing when creating the heightmap, but completes the "global heights" ok.

it's crashing after the completion of the first FOR loop.

This is the line that appears to be crashing it.


I simply changed that line to:


and it worked. The car physics however, that's a completely different story.


Deadly Night Assassins
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 20th Dec 2005 10:42
Nice one Phaelax

As I mentioned earlier it is because some pcs crash when doing some of the 2d commands outside current bitmap.

It is because sx and sy can be negative and thus it crashes.

I added this just before that point command;



so at least it uses the heightmap to generate the terrain.

Car physics are fun once you get car orientated correctly. Seems to start off wrong way round or upside down or something and controls back to front, but once corrected it's not bad and could be the start of a good game.

Boo!
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 20th Dec 2005 10:44
To test the crash theory my pc crashes doing this (using 5.8);



But I know it works quite happily on others.

Boo!
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 20th Dec 2005 18:13
Thanks for the help everyone . From now on I will do my best to avoid the negative heightmap values. I'll post an update fixing that and a few other things soon.


Open MMORPG: It's your game!
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 21st Dec 2005 10:03 Edited at: 21st Dec 2005 10:05
One week to go - however I have recently been informed of family plans which means I will be in Wales on the day of the deadline for this one. Internet wont be an issue - however a machine capable of DBP will be an issue (if only my iBook ran DBP!!)
Because of this - I propose to bring the deadline forward 1 day to Boxing Day. The alternative is to extend the deadline to just before New Years Eve.

What do people prefer - Boxing Day, or just before New Years Eve?

Cheers,
Nick

Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 21st Dec 2005 12:48
I personally vote for an extension until the end of December. I think this challenge is a really good one, but what with family stuff, I don't think many of us will be getting a chance to do much over the next week. Lets see what other people think.

Darkbasic MADPSP
19
Years of Service
User Offline
Joined: 15th Jun 2005
Location: Uk
Posted: 21st Dec 2005 12:53
carry it on till the 9th of january please i forgot about the compo


Experienced DB http://www.greatgames3d.com (work in progress site)
CPU
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Carlsbad, CA
Posted: 21st Dec 2005 15:32
Arr... Rii... I can't get either of your last two programs to run... The one without the advanced terrain gets to Heightmap done... make terrain... and then crashes. The other one with the advanced terrain also gives me a bunch of junk...

Here, this is what the error I'm getting

Debug Assertation Failed!

Program: ...les\Dark Basic Software\Dark Basic Professional\TEMP\temp.exe
File: dbgdel.cpp
Line: 52

Expression: _BLOCK_TYPE_IS_VALID(pHead->nBlockUse)

For information on how your program can cause an assertation
failure, see the Visual C++ documentation on asserts.

CPU

[center]K-OS Battlefields
IS
///---///---///---UNDER CONSTRUCTION---\\\---\\\---\\\
[center]
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 21st Dec 2005 15:37
which version of DBP and the IDE you running?

CPU
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Carlsbad, CA
Posted: 21st Dec 2005 19:22
@Nicholas T - 5.9 (the latest released one) and the Blue IDE

[center]K-OS Battlefields
IS
///---///---///---UNDER CONSTRUCTION---\\\---\\\---\\\
[center]
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 21st Dec 2005 21:22
have u tried it from the default IDE?

Login to post a reply

Server time is: 2024-11-24 03:49:07
Your offset time is: 2024-11-24 03:49:07