KevKelley Posted February 10, 2019 Share Posted February 10, 2019 Are life counter and/or status bar minikernel not compatible with DPC+? Quote Link to comment Share on other sites More sharing options...
+Muddyfunster Posted February 10, 2019 Share Posted February 10, 2019 I don't think so, but I'll defer to the more knowledgable minikernal folks. Quote Link to comment Share on other sites More sharing options...
KevKelley Posted February 10, 2019 Author Share Posted February 10, 2019 I wasn't 100% certain. When I placed it in my code I got a rolling screen and some buzzing so I was gonna opt for a separate screen that announces lives but I liked the idea of a status bar for doing something like act as a timer. Quote Link to comment Share on other sites More sharing options...
+Karl G Posted February 10, 2019 Share Posted February 10, 2019 No minikernels work with the DPC+ kernel out of the box for various reasons that I mention in the text minikernel topic. Once I have it working for the text minikernel, I can probably make a version of the lives/status minikernel that will work with DPC+. Quote Link to comment Share on other sites More sharing options...
KevKelley Posted February 10, 2019 Author Share Posted February 10, 2019 Okay. Thanks. I was playing around with a separate screen and I like the idea of a graphic appearing with a life total. I was having a hard time trying to use the title screen wizard so I guess this will be an opportunity for me to learn! I'll keep my eyes on any development... Quote Link to comment Share on other sites More sharing options...
+TwentySixHundred Posted February 11, 2019 Share Posted February 11, 2019 Im sure i got it working for DPC+ ill see if i have the test program Quote Link to comment Share on other sites More sharing options...
+TwentySixHundred Posted February 11, 2019 Share Posted February 11, 2019 Yeah it was the playfield lives and status bar i used, not to sure about the minikernal. It's not all that pretty but works nonetheless. Anyway the joystick directions change the values. Life CounterStatus BarTestProgram.bas 1 Quote Link to comment Share on other sites More sharing options...
KevKelley Posted February 11, 2019 Author Share Posted February 11, 2019 Cool. I'm gonna have to check that out. Thanks. Quote Link to comment Share on other sites More sharing options...
KevKelley Posted February 14, 2019 Author Share Posted February 14, 2019 I had finally got an opportunity to implement the test code you had posted and it works perfectly! Thank you very much. This little thing had kind of held up some gameplay elements I had wanted to play around with. Quote Link to comment Share on other sites More sharing options...
KevKelley Posted February 14, 2019 Author Share Posted February 14, 2019 Now all I have to figure out is how to make the statusbar act as a timer and decrease at a reasonable speed. Quote Link to comment Share on other sites More sharing options...
+TwentySixHundred Posted February 15, 2019 Share Posted February 15, 2019 No worries, yeah all depends how you're wanting to implement a counter and what for. There is many ways and im sure everyone has their own methods. Personally for a simple global counter i would throw something like this in the mainloop. You can use the same global counter for other features in your game aswell. rem x = milliseconds x = x + 1 rem y = seconds if x = 60 then x = 0 : y = y + 1 if y = 10 then pfscore2 = %01111111 if y = 20 then pfscore2 = %00111111 if y = 30 then pfscore2 = %00011111 if y = 40 then pfscore2 = %00001111 if y = 50 then pfscore2 = %00001111 if y = 60 then pfscore2 = %00000011 if y = 70 then pfscore2 = %00000001 if y = 80 then pfscore2 = %00000000 : goto GAMEOVER or whatever or if x = 0 && y = 10 then pfscore2 = pfscore2/2 if x = 0 && y = 20 then pfscore2 = pfscore2/2 if x = 0 && y = 30 then pfscore2 = pfscore2/2 if x = 0 && y = 40 then pfscore2 = pfscore2/2 if x = 0 && y = 50 then pfscore2 = pfscore2/2 if x = 0 && y = 60 then pfscore2 = pfscore2/2 if x = 0 && y = 70 then pfscore2 = pfscore2/2 if x = 0 && y = 80 then pfscore2 = pfscore2/2 : goto GAMEOVER So basically the statusbar decrements approximately every 10 seconds. Obviously you can define the x & y variables to whatever you like aswell. You could also use a "for" loop, but for simplicity and understanding purposes i wrote this. Quote Link to comment Share on other sites More sharing options...
KevKelley Posted February 15, 2019 Author Share Posted February 15, 2019 Thanks again! I had wound up using a scheme similar to the first option and had indeed considered using a global counter. So far I have it set to decrease one position every couple of seconds but can increase from a collision between the player and its target. I will eventually try to make a power up that can increase or stop the clock. I guess what tripped me up was that I thought the mini kernel was the only way. I had tried to make some kind of pfpixel counter to some success but didn't like the appearance. With this I like that it fills the blank space on either end of the score. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.