object:procedure template object:pp template
class:programming
class:template
class:racket --- J'S PROGRAMMING PROCEDURE
NOTES --- PROBLEM IN BRIEF ::: state essence of problem concisely --- CONCISE FUNCTION EFFECTS ::: --- CONDITION(S) ::: what potentially triggers the effect --- FUNCTION PROCESS OVERVIEW ::: names and small description --- FUNCTION PROCESS PSEUDO ::: all the parts, in pseudo --- FUNCTION PROCESS ACTUAL CODE ::: parts in actual code, which can be moved to program after --- J'S DEBUGGING PROCEDURE
--- TEST
NOTES
try to write as close to code as possible
try to discover function names
--- PROBLEM IN BRIEF
I want to be able to move PLAYER from one screen (OW/WORLD) to another.
--- CONCISE FUNCTION EFFECTS
move PLAYER to the OVERWORLD and WORLD. --- CONDITION(S)
When PLAYER or potentially NPC moves beyond the edge of a map or walks into a portal (into -1 or (add1 maxxy))
spell effects. recall or warp-other (teleport-other would be on screen) --- FUNCTION PROCESS OVERVIEW moveOW? ::: check for moveWORLD condition checkOW ::: check for connected OVERWORLD / WORLD worldGEN ::: generate OW / WORLD if non existent or say nothing over there and block movement. moveOW ::: switch OVERWORLD load WORLD ::: loading the WORLD location, moveWORLD ::: and move the player there. --- FUNCTION PROCESS PSEUDO moveOW? ::: check for moveWORLD condition cond ::: if PLAYER newxy > WORLD maxxy or < 0 uses ::: PLAYER newx, PLAYER newy, WORLD xmax, WORLD ymax who calls ::: bumpCHECK? result ::: next step (checkOW) extra ::: requires upgrading xmax and ymax to hash-forms so worlds can be of different sizes? checkOW ::: check for connected OVERWORLD / WORLD cond ::: called by moveOW uses ::: curWORLD, OVERWORLD x y, needs ::: PLAYER "OW" (list x, y) who calls ::: switch OVERWORLD
look for newOW based on +/- of curOW and which edge of WORLD newxy PLAYER is on. worldGEN ::: generate OW / WORLD if non existent or say nothing over there and block movement. cond ::: needs to be generated before game even? just to get it working. --- FUNCTION PROCESS ACTUAL CODE
--- THE PROBLEM
1) when edging its a bit faulty in display the ". its tricky to get it working without breaking '5'
2) player ow works, but they all link to the same world. i need different ones. but how to generate different worlds, in a way that is navigatable? problem vague ::: cant switch screens problem specific ::: OW just links to WORLD, each "OW () var" needs to be a separate instance.
something like (0, 0) (hr W1),
(0, 1) (hr W2) problem again ::: I want (not (eq? (hr OW 0 0) (hr OW 0 1))) goal exact ::: I want (hr OW 0 0) to = a WORLD, but (hr OW 0 0) and (hr OW -1 0) to = a different WORLD. goal in code form ::: (and (eq? (hash-ref OW '(0 0)) WORLD) simplest essence of goal ::: I need a hash table in a hash table ref.
3) so now there are multiple WORLDS (OW 0 0) (OW 0 1) etc, (I think)
but it doesnt draw anything on the second map, BUTTTTT you can move back and forth.
4) okay okay. so the @ stays visible, and I can move amongst most screens.. except right.
it keeps on spewing
hash-ref: no value found for key
key: '(0 0 (32 10))
so does that mean that its not resetting x or newx to 1?
so I need to see where it is exactly breaking.
5) OKAY CAN MOVE AROUND YAY but I walk through objects.. and erase them. lol. still.
1) bump doesnt work.. (probably not too hard to fix)
2) removing old @ symbols
cant currently check newsym across OW, perhaps why it breaks?
OTHER
potential components
requirements
effect
(scale .8 (bitmap "/home/j/Pictures/design_patterns_-_figure_4.png"))
--- OLDER
1) I decide what I want to work on.
[lets try 'k' for example]
[pretty print]
2) figure out where code is for it
[in this case its taggted "main" in racket/wordlist-terminal]
[pretty print is MAKETEXT]
3) open code section in editor
4) define exact goal precisely without superfluities
--> instead of make all text one color, split text, make images accordingly and reassemble to make variable picture.
see also ::: PROGRAMS, jrl, , TEMPLATES, wordlist entry template
questions, comments, suggestions/feedback, take-down requests, contribute, etc
contact me @ integralyogin@gmail.com or join the integral discord server (chatrooms)
if the page you visited was empty, it may be noted and I will try to fill it out. cheers