{"id":2621,"date":"2024-11-07T12:56:19","date_gmt":"2024-11-07T12:56:19","guid":{"rendered":"https:\/\/research.swissdigitization.ch\/?p=2621"},"modified":"2024-11-07T12:56:19","modified_gmt":"2024-11-07T12:56:19","slug":"assembler-das-grosse-problem-der-dynamischen-strukturen-etwa-bei-strings","status":"publish","type":"post","link":"https:\/\/research.swissdigitization.ch\/?p=2621","title":{"rendered":"Assembler: Das grosse Problem der dynamischen Strukturen (etwa bei Strings)"},"content":{"rendered":"\n<p>Ein Problem beim Coden von Games sind dynamische Strukturen gerade bei Adventures. Zum Beispiel m\u00f6chte man verschieden lange Texte haben statt des Normalzustandes eine Liste mit etwa 40 Bytes langen Strings zu haben. In diesen kann man ja dann einfach Strings[10] finden mit 10*40. All das entf\u00e4llt bei Strings die verschieden lang sind. Man br\u00e4uchte eine eigene Verwaltung daf\u00fcr &#8211; also einen Index oder aber man sucht jedes Mal die &#8222;0&#8220;-Bytes am Ende. Und sucht einfach 10 davon, was nicht gerade optimal ist bei wenig Rechenzeit.<\/p>\n\n\n\n<p>Hier ein Beispiel mit immer gleichvielen Bytes (PlanetCoward)<br><br><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"806\" src=\"https:\/\/research.swissdigitization.ch\/wp-content\/uploads\/2024\/11\/Bildschirmfoto-2024-11-07-um-13.55.19-1024x806.png\" alt=\"\" class=\"wp-image-2622\" srcset=\"https:\/\/research.swissdigitization.ch\/wp-content\/uploads\/2024\/11\/Bildschirmfoto-2024-11-07-um-13.55.19-1024x806.png 1024w, https:\/\/research.swissdigitization.ch\/wp-content\/uploads\/2024\/11\/Bildschirmfoto-2024-11-07-um-13.55.19-300x236.png 300w, https:\/\/research.swissdigitization.ch\/wp-content\/uploads\/2024\/11\/Bildschirmfoto-2024-11-07-um-13.55.19-768x605.png 768w, https:\/\/research.swissdigitization.ch\/wp-content\/uploads\/2024\/11\/Bildschirmfoto-2024-11-07-um-13.55.19-624x491.png 624w, https:\/\/research.swissdigitization.ch\/wp-content\/uploads\/2024\/11\/Bildschirmfoto-2024-11-07-um-13.55.19.png 1364w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Ein Problem beim Coden von Games sind dynamische Strukturen gerade bei Adventures. Zum Beispiel m\u00f6chte man verschieden lange Texte haben statt des Normalzustandes eine Liste mit etwa 40 Bytes langen Strings zu haben. In diesen kann man ja dann einfach Strings[10] finden mit 10*40. All das entf\u00e4llt bei Strings die verschieden lang sind. Man br\u00e4uchte [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2621","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/research.swissdigitization.ch\/index.php?rest_route=\/wp\/v2\/posts\/2621","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/research.swissdigitization.ch\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/research.swissdigitization.ch\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/research.swissdigitization.ch\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/research.swissdigitization.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2621"}],"version-history":[{"count":1,"href":"https:\/\/research.swissdigitization.ch\/index.php?rest_route=\/wp\/v2\/posts\/2621\/revisions"}],"predecessor-version":[{"id":2623,"href":"https:\/\/research.swissdigitization.ch\/index.php?rest_route=\/wp\/v2\/posts\/2621\/revisions\/2623"}],"wp:attachment":[{"href":"https:\/\/research.swissdigitization.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2621"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/research.swissdigitization.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2621"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/research.swissdigitization.ch\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2621"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}