Game Design Music and Art

The Well of Bethlehem Discussion Thread – mene-mene

Mene-Mene

Member

Posts: 1398
From: Fort Wayne, IN, USA
Registered: 10-23-2006
Discuss here what you think, any contributions you have (rewarded with discounts), any anything you have related to WoB.

Right now, I've finally gotten the Months long bug finished thanks be to God. I needed an if statement.

If you want to contribute to the code, I'll send you a piece, but you must not distribute, you may however share the .exe with others due to it being a demo right now. This may change.

Currently Help:
Music: Kenman
Code: M^2 (Me)

Current Bugs:
Keypress: I finally found the reason for my problem wih no key recognition, I was testing for the B3d scan codes rather than BM. I fixed it, but now, it causes the player to disappear.

Code:


Function KeyPressTest()

If KeyHit(key_up)

If CurPlayer.Turn = 1

If Adino.y > 40

If PossHit(Adino.x,Adino.y,Adino.EndX,Adino.EndY,CurPlayer.FWallX[0],CurPlayer.FWallY[0],CurPlayer.FWallEndX[0],CurPlayer.FWallEndY[0],2,40) = False

If PossHit(Adino.x,Adino.y,Adino.endx,Adino.endy,CurPlayer.FWallX[1],CurPlayer.FWallY[1],CurPlayer.FWallEndX[1],CurPlayer.FWallEndY[1],2,40) = False

If PossHit(Adino.x,Adino.y,Adino.endx,Adino.endy,Eleazar.x,Eleazar.y,Eleazar.endx,Eleazar.Endy,2,40) = False

If PossHit(Adino.x,Adino.y,Adino.EndX,Adino.EndY,Shammah.x,Shammah.y,Shammah.EndX,Shammah.EndY,2,40) = False

Adino.y = Adino.y + 40
CurPlayer.turn = 2
mainloop()

EndIf
EndIf
EndIf
EndIf
Else

Adino.y = Adino.y + 40
Adino.Complete = True
CurPlayer.turn = 2
mainloop()

EndIf
ElseIf CurPlayer.turn = 2

If Eleazar.y > 40

If PossHit(Eleazar.x,Eleazar.y,Eleazar.endx,Eleazar.endy,CurPlayer.FWallX[0],CurPlayer.FWallY[0],CurPlayer.FWallEndX[0],CurPlayer.FWallEndY[0],2,40) = False

If PossHit(Eleazar.x,Eleazar.y,Eleazar.EndX,Eleazar.EndY,CurPlayer.FWallX[1],CurPlayer.FWallY[1],CurPlayer.FWallEndX[1],CurPlayer.FWallEndY[1],2,40) = False

If PossHit(Eleazar.x,Eleazar.y,Eleazar.EndX,Eleazar.EndY,Adino.X,Adino.Y,Adino.EndX,Adino.EndY,2,40) = False

If PossHit(Eleazar.X,Eleazar.Y,Eleazar.EndX,Eleazar.EndY,Shammah.X,Shammah.Y,Shammah.EndX,Shammah.EndY,2,40) = False

Eleazar.Y = Eleazar.Y + 40
CurPlayer.Turn = 3
MainLoop()

EndIf
EndIf
EndIf
EndIf
Else

Eleazar.y = Eleazar.Y + 40
Eleazar.Complete = True
CurPlayer.turn = 3
MainLoop()

EndIf

ElseIf CurPlayer.turn = 3

If Shammah.Y > 40

If PossHit(Shammah.X,Shammah.Y,Shammah.EndX,Shammah.EndY,CurPlayer.FWallX[0],CurPlayer.FWallY[0],CurPlayer.FWallEndX[0],CurPlayer.FWallEndY[0],2,40) = False

If PossHit(Shammah.X,Shammah.Y,Shammah.EndX,Shammah.EndY,CurPlayer.FWallX[1],CurPlayer.FWallY[1],CurPlayer.FWallEndX[1],CurPlayer.FWallEndY[1],2,40) = False

If PossHit(Shammah.X,Shammah.Y,Shammah.EndX,Shammah.EndY,Adino.X,Adino.Y,Adino.EndX,Adino.EndY,2,40) = False

If PossHit(Shammah.X,Shammah.Y,Shammah.EndX,Shammah.EndY,Eleazar.X,Eleazar.Y,Eleazar.EndX,Eleazar.EndY,2,40) = False

Shammah.Y = Shammah.Y + 40
CurPlayer.Turn = 1
MainLoop()

EndIf
EndIf
EndIf
EndIf
Else

Shammah.Y = Shammah.y + 40
Shammah.Complete = True
CurPlayer.turn = 1
MainLoop()

EndIf
EndIf

EndIf

End Function

Function PossHit(subjectx,subjecty,subjectendx,subjectendy,subject2x,subject2y,subject2endx,subject2endy,direction,range)

If direction = 1

If subjectx < (subject2endx + range) And subjectendx > subject2x

If subjecty = subject2y And subjectendy = subject2endy

Return True

Else

Return False

EndIf

Else

Return False

EndIf

ElseIf direction = 2

If subjecty =< (subject2endy + range) And subjectendy => subject2y

If subjectendx => subject2x And subjectx =< subject2endx

Return True

Else

Return False

EndIf

Else

Return False

EndIf

ElseIf direction = 3


If subjectendx < (subject2x - range) And subjectx > subject2endx

If subjecty = subject2y And subjectendy = subject2endy

Return True

Else

Return False

EndIf

Else

Return False

EndIf


ElseIf direction = 4

If subjectendy > (subject2y - range) And subjecty < subject2endy

If subjectx = subject2x And subjectendx = subject2endx

Return True

Else

Return False

EndIf

Else

Return False

EndIf

EndIf


End Function

PossHit:
I'm also curious to see if 1. It would work, and 2. if it would be more efficent to instead of using mathmatical testing for if a hit is registered, to just image collide in the unseen buffer, and if on the unseen buffer the images collide, then go back, but if not, then have that be the move.

------------------
MM out-
Thought travels much faster than sound, it is better to think something twice, and say it once, than to think something once, and have to say it twice.
"Frogs and Fauns! The tournament!" - Professor Winneynoodle/HanClinto

I reserve the full right to change my views/theories at any time.

[This message has been edited by mene-mene (edited July 05, 2007).]

Randall
Member

Posts: 44
From: Sacramento, California, USA
Registered: 06-19-2007
quote:
I've finally gotten the Months long bug finished thanks be to God. I needed an if statement.

Wait a minute!

Wow, MONTHS LONG, just for a lousy IF statement?

This has to be eliminated? Because how can one finish a game, by spending months on an IF statement?
I've spent, for example, days, but not weeks on IF statements and things like this.

So, how to avoid it?
Please do regular backups of your established code maybe?
Or maybe you are doing the core programming yet? Hmmnnn, yes.
The core is the hardest.

Okay well, get the core programming finished, and then copy and paste and also do regular backups of all code files.

sheesh..., but months is too long for an IF statement friend.
Maybe gotta think of a better plan to avoid this in the future?

[This message has been edited by Randall (edited July 11, 2007).]

Mene-Mene

Member

Posts: 1398
From: Fort Wayne, IN, USA
Registered: 10-23-2006
I didn't know it required an if statement, and no, this isn't constant months. How would backups help figureing out it needed it, and its not like i didn't ask for help. I"m making a prototype.

Rereading the quote I see that it sounded pretty lousy. But what really was going on was I had a routine in my program that would check for input, do the enemy AI ext. Clear the Screen, flip the buffers, clear the keys, and clear the mouse. Unfortunetly my clearing of the mouse was clearing not only the unwanted input(like say clicking on the player, and then moving the mouse over to the exit button would exit, even if you didn't want to exit, it would record the one cllick, and then whenever it would check for clicks, it would have one, even though it wasn't on the targeted area( it would also clear out the wanted input of clicking on the button. What I needed to do, was create an if statement saying, If mouseontopofbutton = true then checkinput; if mouseontopofbutton = false then clearmousehits;

I am exceptional, but all said and done, I"m still a 12 yr old who's been coding in blitz for just over 2 years in blitz, and less than a year in C++.

If i"ve done something before, or its rather simple, (Writing the beginnings of a game/setting up a quiz game) then I can spit about 700 lines of code over a few hours of dedicated coding. Of course I am a bit quicker to type than others.

I sound proud, but I'm both saying this to myself, and saying to you, I"m not a failure, I"m not perfect, I'm a skilled kid without being perfect or poor.
------------------
MM out-
Thought travels much faster than sound, it is better to think something twice, and say it once, than to think something once, and have to say it twice.
"Frogs and Fauns! The tournament!" - Professor Winneynoodle/HanClinto

I reserve the full right to change my views/theories at any time.

[This message has been edited by Mene-Mene (edited July 12, 2007).]

buddboy

Member

Posts: 2220
From: New Albany, Indiana, U.S.
Registered: 10-08-2004
quote:
Originally posted by Randall:
I've spent, for example, days, but not weeks on IF statements and things like this.
[This message has been edited by Randall (edited July 11, 2007).][/B]

wow, what a jerk. what gives? he's only 12, he's still relatively new, and (most likely) you don't even know the situation of the problem.

he is a pretty sweet coder for a 12 year old though.

plus like he said, not constant months.

how is backups of his code going to change the fact that he didn't know he needed the if statement?

maybe you should take more things like that into account before making a harsh statement like that.

------------------
that post was really cool ^
|
[|=D) <---|| me

samw3

Member

Posts: 542
From: Toccoa, GA, USA
Registered: 08-15-2006
I thought Randall's post was a bit harsh as well. Maybe he meant it to be tongue-in-cheek. Hmm.

I am an experienced programmer and have often had trouble with logic orientation in a conditional statement that sometimes took weeks to find. I remember when I finally got a ide that let me debug with breakpoints, stepping through line by line. Does BM have anything like that? It really helps in finding bugs like these.

Well, don't be discouraged M^2, you are doing a fine job. But also be careful of boasting as well. God resists the proud and gives grace to the humble. I like what Paul says: Rom 12:3(NLT) As God's messenger, I give each of you this warning: Be honest in your estimate of yourselves, measuring your value by how much faith God has given you.

You are progressing fine as a programmer, but only Mel was truly exceptional.

God Bless!

------------------
Sam Washburn

[This message has been edited by samw3 (edited July 12, 2007).]

Mene-Mene

Member

Posts: 1398
From: Fort Wayne, IN, USA
Registered: 10-23-2006
Sam: BM doesn't have anything like that, but B3d I bellieve does. It does however have an excellent finder for bugs, unfortunetly, that technically wasn't a bug.

As for my prideful statments, I was partialy presenting to him that I wasn't a:


choice$ = input$("What's youre age?")

function Talk()
Print "Hello"
end function

Forgetting the:


choice$ = input$("What's you're age?")

if Choice <> 18
Talk()
endif

Function Talk()
Print "Hello, you're not 18."
end function


or the like.

It was also an encouragement to myself and sometimes I use oftenly concieved highly-rated compliments so that I don't get upset or depressed over an "insult". I realize that I"m not truely exception in comparison to the programmers of the world, I'm very poor infact. I can hardly understand C++, and am struggling with some of the most basic concepts of C++. I can't figure out how to clothe a model, ext

[minirant]
On a lighter note, I'm rather tired, but one thing I"ve always found amusing, is statements people make that are relative. Skilled programmer is a relative statement for HanClinto (No offense Han I beseech thee) probably isn't quite as Great or Exceptional compared to Mel, as opposed to his awesomeness compared to me.
[/minirant]

Remember always, its God who made the brain which concieved the computer, create a brain from dust only, and then you'll impress me.

Love!

Edit: Know that I don't think very highly of my self, and while I believe that in Christ I can do anything, I know that in myself, I am nothing.
------------------
MM out-
Thought travels much faster than sound, it is better to think something twice, and say it once, than to think something once, and have to say it twice.
"Frogs and Fauns! The tournament!" - Professor Winneynoodle/HanClinto

I reserve the full right to change my views/theories at any time.

[This message has been edited by Mene-Mene (edited July 13, 2007).]

HanClinto

Administrator

Posts: 1828
From: Indiana
Registered: 10-11-2004
That story about Mel was incredible -- I'd never heard of that before -- thanks for sharing that link!
quote:
Originally posted by Mene-Mene:
one thing I"ve always found amusing, is statements people make that are relative. Skilled programmer is a relative statement for HanClinto (No offense Han I beseech thee) probably isn't quite as Great or Exceptional compared to Mel, as opposed to his awesomeness compared to me.


God has certainly blessed me with some measure of technical aptitude, but I find it interesting that it's even more than that -- I really need God's hand of blessing on my heart and mind in order to be as good of a programmer as I know I can be. It seems like God often has had to remind me about this, but I am fully convinced that not only do all of my talents come from God, but that I need his continual sustaining power as well. And even if I was a good programmer "on my own", I would still want the Lord to direct my steps. One of my favorite verses regarding this is Psalm 127:1
quote:
Unless the LORD builds the house,
those who build it labor in vain.
Unless the LORD watches over the city,
the watchman stays awake in vain.


So I sortof apply that to coding -- the CAV (Clint Applied Version) would say something like "Unless the LORD builds the project, those who code it labor in vain."

But yeah. When my mind is straying from God, I write crummy code. It's just a fact.

--clint

Mene-Mene

Member

Posts: 1398
From: Fort Wayne, IN, USA
Registered: 10-23-2006
Alright you guys replying is spurring me on. I've done some more testing, and remembered that BM deals in 1,2,3 rather than B3d's 0,1,2. I also found out that my movement for my character is working, but for some reason it doesn't seem to be drawing him correctly.

Edit: Just as I sent this message I found the problem. In my keypresstest funcion it was adding coordinates where they should be subracted, regardless another effect should have occured, and it shouldn't have gone back, but atleast I found the problem.

Edit2: I could use some help with why the computer isn't doing what its supposed to.

To give some general details, I'm going through a loop in which after going through a couple of processes it goes to a keyinput testing function inside that function it test to see if the upkey has been pressed if true then it tests what value CurPlayer.Turn (A Variable inside a type) is. If 1, then it checks for collisions, and if none are made then it moves the player up, and sets the turn to 2 so that on the next pass it will move the second character.

Unfortunetly its not changing the turn to 2. i'll send the full code to those who want it.
------------------
MM out-
Thought travels much faster than sound, it is better to think something twice, and say it once, than to think something once, and have to say it twice.
"Frogs and Fauns! The tournament!" - Professor Winneynoodle/HanClinto

I reserve the full right to change my views/theories at any time.

[This message has been edited by Mene-Mene (edited July 13, 2007).]

[This message has been edited by Mene-Mene (edited July 13, 2007).]

Randall
Member

Posts: 44
From: Sacramento, California, USA
Registered: 06-19-2007
quote:
Originally posted by buddboy:
wow, what a jerk. what gives? he's only 12, he's still relatively new, and (most likely) you don't even know the situation of the problem.

Wow, did you ever reply to this thread to help him?
Did you care? No? Why is it that I had to reply? Why me?

I was just trying to give some advice to him, is that important? So, I became a jerk when I cared? Was that it? hehe Perhaps if I never replied or ever cared, then I would be a hero?

Okay, so it looks like he's doing the core programming, but months for an "IF statement" is something that he needs to improve on.

Sometimes, my engine compiler gives out errors that is not discernable, so I find that doing backups of code helps. I just restore to the old version to get the compiler going again as a last resort.

Mene-Mene

Member

Posts: 1398
From: Fort Wayne, IN, USA
Registered: 10-23-2006
Randall: I realize that perhaps you recieved a negative reaction, I am glad that you replied regardless of what you said, it motivated me. Probably if you took the time and compiled it into days that i coded at all it would be weeks. I'm glad you care, infact your coming back to this thread when it seems like a anti-Randall warzone shows you care.

Some people are your teachers, some coaches. A teacher will give you something to learn, a teacher will hand you information, a teacher will encourage you on what you do right. A teacher will motivate you by telling you what you did right and help you make everything also right.

A coach will show you where you need to learn. A coach will show you what information to look for. A coach will point out your faults. A coach will motivate you by causing yourself to see fault in yourself, and motivate you to correct it.

You need both, some people are coaches, some teachers, there is a time for everything.

I just want to say thank you to all my helpers.

Bugs:
Keypress!
Alright, I figured out my keypress problem, it took at most a couple hours. Basically I was adding where subtraction was needed.

PossHit!
I've gotten my upwards work done, I'm working on making left capability. It just needs a little refining, but I think it might be able to be done soon with left capability.



Jesus Rules
I His Stool
Jointly I cool

Just a little random not-so poetry.

[This message has been edited by Mene-Mene (edited July 14, 2007).]

Jari

Member

Posts: 1471
From: Helsinki, Finland
Registered: 03-11-2005
I thought Randal wanted to help. In the past I have coding experiences of hours and hours gone by on fixing some bug which was actually really simple. At those times I wished some one had told me to take a break.

But thanks to Jesus for teaching me this and I now know that it's better to pray than go with the flow of your minds thoughts. Which are left as tired some waves, not even the tide bringing them back.
(was that poetry any good? )

------------------
Psa 32:5 I acknowledged my sin unto thee, and mine iniquity have I not hid. I said, I will confess my transgressions unto the LORD; and thou forgavest the iniquity of my sin. Selah.

[VoHW] (Help needed) [Blog] (Contact) - Truedisciple (mp3)

Mene-Mene

Member

Posts: 1398
From: Fort Wayne, IN, USA
Registered: 10-23-2006
Jari: I"m sorry, I'm rather clumsy with poetry, expecially free verse, I wouldn't know.

I've gotten the player one pretty functional, and now the "family" is actually switching, as I kept resetting some values both slowing down the program, and not allowing the proper play.

Now, unfortunetly Adino is very happy, and ready to slay 700 men, but Eleazar is stuck on a rock, and Shammah is waiting for Eleazar.

To be more comprehensible, for some reason Eleazar isn't working, if you have any advice that is simple so that I can save some time it'd be helpful. (Especially motivating, even a little spam would be a little motivating.

edit: correction, Adino is Mostly functional,

[This message has been edited by Mene-Mene (edited July 14, 2007).]

Randall
Member

Posts: 44
From: Sacramento, California, USA
Registered: 06-19-2007
Helping was my goal. I consider mene mene to be a friend.
Don't we try to help our friends? Yes?

This is MORE than an IF statement, this is a game project that he's doing!
I wanted to offer advice to better himself.

Still though, I resent the personal attack and label of "JERK" being said of me.
I regret it. I could reply harshly and I feel like it, but I won't.

And the moderators and everyone just let it happen on this forum.
Thank you. Thanks. I will remember this...

Please refrain from personal attacks on others please!
and
Please don't call others NAMES on this forum!

I will go to the non-christian heathen forums to get that okay?!

Jari

Member

Posts: 1471
From: Helsinki, Finland
Registered: 03-11-2005
Randall, none of us is perfect and we all make mistakes. But what we can all do is to forgive and rather pray for each other.
So please forgive me. I have to pray about this and for you. After all this is just a forum and we cannot always know what others mean.

We don't have to think negatively of others but hope there was good intent. 1Co 13:7 We don't have to wait for apology before forgiving and trying to make peace. (Mat 5:23-24)

Heb 13:1

------------------
Psa 32:5 I acknowledged my sin unto thee, and mine iniquity have I not hid. I said, I will confess my transgressions unto the LORD; and thou forgavest the iniquity of my sin. Selah.

[VoHW] (Help needed) [Blog] (Contact) - Truedisciple (mp3)

Jari

Member

Posts: 1471
From: Helsinki, Finland
Registered: 03-11-2005
quote:
Originally posted by Mene-Mene:
Jari: I"m sorry, I'm rather clumsy with poetry, expecially free verse, I wouldn't know.

That's alright. I actually hope no one takes example even of my english.