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 / In search of a little bit of help.

Author
Message
MegaCodeOne
12
Years of Service
User Offline
Joined: 16th Jan 2014
Location:
Posted: 21st Feb 2014 23:15
I want to created a game prototype but I'm having a bit of
trouble. I was wondering if someone could please code me up
a small piece of code. I got the idea but need a bit of help.
I need a 2D maze where there are doors that act like switches.
If you press on say a little circle where the door is connected
to the wall you can swing it open and close but remember there is
probably a door at every turn. This is only half the idea but I will work on the second half and give a copy when done to the
person or persons halping me with the maze.
It does not need to be anything special just a 2D - maze with doors
that can be switched open or closed. I don't care about fancy
graphics right now that will come later.
Thank you
ScottieB
Derek Darkly
14
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 22nd Feb 2014 01:24 Edited at: 22nd Feb 2014 01:26
I like your forthrightness, kid...
You didn't beat around the bush, you said "GIMMIE DA DANG CODEZ!!!"

It's like a blast of music to the ears... er, eyes...

Derek Darkly
14
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 22nd Feb 2014 04:57 Edited at: 22nd Feb 2014 20:42
I have put together a small starter package for you. It has one door.

I have attached a horribly bad maze graphic I made with MS Paint, which you can save to your computer and load into the provided code. It's really just a sample though, to show that we can load a maze this way.

(You can also draw 2D mazes with the BOX command.)

I have not placed your door or enabled it to open with mouse clicks. Look at the DBPro help in your editor (Press F1) and figure out how to copy sprites to make more doors. You will see an example in the code for rotating your doors. Play with OFFSET SPRITE to find your hinge point.



If this isn't what you wanted... sorry!
Someone else may give you different ideas.

If you're wondering about how to do wall collisions with an image like this, look up the POINT command. I used it exclusively in my demo for D-ZONE. A lot of people say the command is slow, but I say do what works for you.

Sph!nx
17
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 22nd Feb 2014 16:06
FORUM TIP
Use an informative thread title (Post Topic), so other can search it in the future if they have a similar problem.

Regards Sph!nx
www.mental-image.net
Derek Darkly
14
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 22nd Feb 2014 20:46 Edited at: 22nd Feb 2014 20:56
Quote: "FORUM TIP
Use an informative thread title (Post Topic), so other can search it in the future if they have a similar problem."


Yeah, I dunno why we can't edit our thread titles, or at least have the mods do it. Something to do with database/indexing issues maybe? I have never seen a site that does, though.

Also, to search threads that may be buried or unsearchable you can use a google specific search and it will include the entire thread content in the search.

TGC might want to consider revamping their search engine this way, or even adding a google search engine here on the site. You obviously get way more choices when you include more than just the title.

MegaCodeOne
12
Years of Service
User Offline
Joined: 16th Jan 2014
Location:
Posted: 23rd Feb 2014 00:41
This is a nice start and thank you for trying to help me but
I looking for something like a array that will hold the maze
data. I still will have a look at this further to see if it might
possibly still might do the job. I hear the talk about the thread
for others that might have same problem bit I'm not sure how to do
that. Post topic thingy. Still It sounds important but I think it is killing my topic. So once again can anyone think of other different way which we can do this to a maze and please post some demo code to help me understand.
Thanks again
ScottieB
tiffer
20
Years of Service
User Offline
Joined: 6th Apr 2006
Location: Scotland
Posted: 24th Feb 2014 02:39
You're asking an awful lot young man. Hey why don't you have a pop at it and see what you can learn ?

Cwatson

Login to post a reply

Server time is: 2026-07-07 13:16:44
Your offset time is: 2026-07-07 13:16:44