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.

Newcomers DBPro Corner / I'm a newb trying to make a simple game.. this is what I have so far (not much)

Author
Message
Robbee101
18
Years of Service
User Offline
Joined: 28th Jun 2006
Location: England
Posted: 21st Oct 2008 14:21
Hey guys!

I'll get right to the point..

If you run the following code, you should see the problem; the 'top.bmp' sprite, (sprite 1) does not follow the mouse the whole time, so it then becomes out of line:




help appreciated!
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 24th Oct 2008 18:00
Could you please attach the media
Robbee101
18
Years of Service
User Offline
Joined: 28th Jun 2006
Location: England
Robbee101
18
Years of Service
User Offline
Joined: 28th Jun 2006
Location: England
Posted: 24th Oct 2008 23:21
I am skeptical as to whether this can actually be fixed
Robbee101
18
Years of Service
User Offline
Joined: 28th Jun 2006
Location: England
Posted: 24th Oct 2008 23:21
I.e perhaps Darkbasic Pro error... although that is coming from someone with very little experience in programming/DarkBASIC
Captain IceT
15
Years of Service
User Offline
Joined: 21st Oct 2008
Location: Boat Murdered, and Im still laughing!
Posted: 25th Oct 2008 00:52
I'm not seeing your problem. It seems to be aligned the whole time to me. (I had to change the display mode to 1680 x 1050, however not sure if that affected it.)

Maybe if you took a screenshot of it being out-of-line and attached that, it would help.

Perhaps you could also play with it a bit, and tell me how, exactly, to duplicate the error?
Captain IceT
15
Years of Service
User Offline
Joined: 21st Oct 2008
Location: Boat Murdered, and Im still laughing!
Posted: 25th Oct 2008 00:54
Oh. Nevermind, I didn't realize you could move the robot. Hmmm, that is a problem.
Captain IceT
15
Years of Service
User Offline
Joined: 21st Oct 2008
Location: Boat Murdered, and Im still laughing!
Posted: 25th Oct 2008 01:24
Ok, I got it to work.

I replaced this part:


With this:


I'm not a math genius, but I started with making a# = mousex and b$ = mousey because it made more sense to me with the atanfull command. Then I noticed that it was rotating backwards so I added the "*-1" Then I noticed that it was pointing the wrong side so I tried "90", "180", and "270", and "180" worked.

Cheers!
Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 1st Nov 2008 19:32
dont mean to be picky but wouldnt it speed the game up when it gets bigger if a,b, and c were integers instead of Floats?
Robbee101
18
Years of Service
User Offline
Joined: 28th Jun 2006
Location: England
Posted: 12th Nov 2008 19:36
I truly appreciate that help has been given, but still doesn't seem to work
Captain IceT
15
Years of Service
User Offline
Joined: 21st Oct 2008
Location: Boat Murdered, and Im still laughing!
Posted: 13th Nov 2008 21:02
Hmm seems to work on my end... let me re-zip what I have here and attach it.

Now, what I did was just the rotation part, making the upper robot body face the mouse, I think you were trying to have it shoot too, but I didn't touch that part of the code, is that what you are having trouble with?

"Dwarf Fortress has taught me that all the world's problems would be substantially reduced had our parent civilizations never minted more than four stacks of coins."
- DwarfFortressWiki

Attachments

Login to view attachments
Xsnip3rX
17
Years of Service
User Offline
Joined: 20th Feb 2007
Location: Washington State
Posted: 15th Nov 2008 03:56
Did you get this fixed yet Rebbee101?

Robbee101
18
Years of Service
User Offline
Joined: 28th Jun 2006
Location: England
Posted: 16th Dec 2008 11:26
Hiya Gents,

Sorry for not posting sooner, it has actually been on my mind..

So much so, that I am now in India on my Holiday and I'm spending time learning DB

Anyway.. from what I remember, the code did not work for the reason that, upon moving the charactor around the screen, the top part of the mech (which looks at the mouse) would become out of line..

I'm now going to download all the code and such and give it another go out here.

Regards.
Robbee101
18
Years of Service
User Offline
Joined: 28th Jun 2006
Location: England
Posted: 20th Dec 2008 07:34
Hello again!

Well I downloaded the rezipped code from CaptainICEt and it works perfectly.. Brilliant, Many Thanks mate.

Well as I said, I am spending time learning Darkbasic on my Holiday and I'm learning loads.. I've now got basic collision, which although basic; Works!

---

Thanks again,
it's this help that keeps me going
Tjones
15
Years of Service
User Offline
Joined: 3rd Nov 2008
Location:
Posted: 6th Jan 2009 02:08
do anybody know how to load skys and bacgrounds in game and also how to build different levels I have been trying and I think there is something that I'm doing wrong. pleas help

T
darkend
16
Years of Service
User Offline
Joined: 9th May 2008
Location:
Posted: 18th Jan 2009 19:23
Tjones, next time create your own thread as this is not relevent, if you want to create a sky in a 3d game make a large sphere and texture it, i cant rember how exactly but im sure you will find out

if life is hell wat is heven

Login to post a reply

Server time is: 2024-09-27 22:30:16
Your offset time is: 2024-09-27 22:30:16