Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
|
Forum Index : Microcontroller and PC projects : ecological simulation on picomite and cmm2
Page 2 of 2 | |||||
Author | Message | ||||
hhtg1968 Senior Member Joined: 25/05/2023 Location: GermanyPosts: 123 |
in the corner down left is a counter for the "years" since start. the exact observer will see that the wolfes only survive in a big area. on a small island they will not survive so long. the params and probabilities are estimated by me. may be there are better params. everybody can try. to turbo46: i think the program is fast running at mmb4w. on the cmm2 one year is about 7 sec... |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1611 |
Thanks hhtg1968. The program is very fast on MMB4W about 5 to 7 'years' per second on my laptop. I expected that when I typed 'H' at startup that it would take me to the help screen but no. It does go to the help screen while the program is running but when I return to the game from that it starts writing the updates to the screen over the help screen text. That maybe something to do with the saving you were talking about earlier and it may be something to do with MMB4W. Maybe the screen buffer may help with that but others will know better. I'm better at being a critic than programming and I will never understand your program. But I can fiddle around the edges of it. I will try it on the CMM2 tomorrow I'm sure it will be better. Also I see nothing about the wolves in the help screen now? Bill Keep safe. Live long and prosper. |
||||
hhtg1968 Senior Member Joined: 25/05/2023 Location: GermanyPosts: 123 |
to turbo46: in the programm i have a sub routine for caching the screen and fetch the screen back. "sub cachescr if v$="Colour Maximite 2" then blit read 1,0,0,dx,dy if v$="PicoMiteVGA" then framebuffer copy N,F end sub sub popscr if v$="Colour Maximite 2" then blit write 1,0,0 if v$="PicoMiteVGA" then framebuffer write N end sub" that means if v$ has another content the program caches not and so on. i do not know the mm.device$ exactly for mmb4w. it could be "DOS". look at the foto... but exists versions for dos and another for windows? in the manual from the dos version i cannot find any graphic commands... |
||||
hhtg1968 Senior Member Joined: 25/05/2023 Location: GermanyPosts: 123 |
to turbo46: it is random wether there are wolfes or not at the beginning... insert wolfes by pressing "w" the keys are: A - atomic bomb! n - count the lifeforms r - run q - quit c - circle water C - filled k - circle clean K - filled g - circle grass G - filled p - circle poison P - filled w - insert wolfs s - insert sheeps W - rain/water x - poisened rain! L - load landscape S - save file: lifepx4.png o - show and change parameters h or ? - this help page |
||||
Turbo46 Guru Joined: 24/12/2017 Location: AustraliaPosts: 1611 |
MM.DEVICE$ from the MMB4W manual. But I would not worry about it until or if you have MMB4W running. Sorry about my 'wolf' comment, it is there I was wrong. Also your use of: do loop until inkey$="" Normally you would be waiting for a key to be pressed: Print Print"press a key to start or wait 10s" . . do loop until inkey$<>"" But I am guessing that it did not work first time for you and I believe that is because there is already some keycode in the buffer. That is why I suggested that you use: do : loop until inkey$="" ' get rid of any earlier keypress before waiting for a keypress like: timer = 0 do : loop until inkey$="" ' get rid of any earlier keypress do if timer => 10000 then exit do ' wait for 10 seconds loop until inkey$<>"" That confused me the first time in CMM2 it may be a bug but I don't know. I stole that idea from someone else but it always works. Bill Keep safe. Live long and prosper. |
||||
hhtg1968 Senior Member Joined: 25/05/2023 Location: GermanyPosts: 123 |
turbo46 wrote: "But I am guessing that it did not work first time for you and I believe that is because there is already some keycode in the buffer." yes, you are right. |
||||
hhtg1968 Senior Member Joined: 25/05/2023 Location: GermanyPosts: 123 |
about one hour ago i started my (first) picomiteVGA! now i must recognize that my simulation does not run 100%. i will change it... here is an ascii version... LIFE.BAS.zip |
||||
hhtg1968 Senior Member Joined: 25/05/2023 Location: GermanyPosts: 123 |
here is a version for picomite without vga - vt100 with colours... lifevt100.bas.zip |
||||
hhtg1968 Senior Member Joined: 25/05/2023 Location: GermanyPosts: 123 |
newer vt100 version: lifevt100.bas.zip |
||||
Page 2 of 2 |
Print this page |