If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Fixed* For any one learning about arrays and maps

Fixed*

ive been working on this since my last post but i added a monster('=') to it so far
monster('=') moves and takes off hp when you go 1 space in any vertical or horisontal from it.
also added score for how steps you take before you losse

Re: For any one learning about arrays and maps

i donno i made this ages ago but i donno about "compete chaos" it works rather well
and the dimensions are not wrong.
if you still think they are say why
and the loops arnt infinite. in GLoop it waits for key input jumps to GLoadMap

Re: For any one learning about arrays and maps

Originally Posted by madmarky

i donno i made this ages ago but i donno about "compete chaos" it works rather well
and the dimensions are not wrong.
if you still think they are say why
and the loops arnt infinite. in GLoop it waits for key input jumps to GLoadMap

Re: For any one learning about arrays and maps

Originally Posted by madmarky

i donno i made this ages ago but i donno about "compete chaos" it works rather well

A program can work well for the time being and yet be very difficult to maintain because it is in "complete chaos". You would do well to stop the use of global variables and to break up GLoadMap() into smaller functions that do one thing and do it well. You probably also should rename GLoop to something more descriptive, and avoid the mutual recursion while you are at it, e.g., by using a loop instead.

Originally Posted by madmarky

and the loops arnt infinite. in GLoop it waits for key input jumps to GLoadMap

That just means that the infinite mutual recursion is punctuated by waits for input.

Re: For any one learning about arrays and maps

Originally Posted by JVene

We are generally a friendly group most of the time

I didn't mean to be unfriendly. But the original post did not state a question, neither was it a reply to a question, it simply stated "this code works" so I thought it to be necessary to state that there is a big difference between correct code and code that works when tested.

@madmarky: You edited your original post, which means, you removed the context of all the answers in this thread so far. Please in the future post a reply with your corrections (if you want to receive further comments on your code, that is). Editing is meant for doing small corrections (spelling errors, small errors in the code) but not to replace a post with an entirely new one.

More computing sins are committed in the name of efficiency (without necessarily achieving it) than for any other single reason - including blind stupidity. --W.A.Wulf

* The Perfect Platform for Game Developers: Android
Developing rich, high performance Android games from the ground up is a daunting task. Intel has provided Android developers with a number of tools that can be leveraged by Android game developers.

* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.