Discussion about software development for the old-school Gameboys, ranging from the "Gray brick" to Gameboy Color
(Launched in 2008)
You are not logged in.
Hello everyone
I already asked people on ZGB thread if there is a way to pause the game on the ZGB engine. While Chris was the only one who answered. Sadly that isn't going to work on ZGB. I will be grateful if someone out there helps me out kindly. Then we also add a lives system with a HUD. I would just like to at least have pause menu done the most.
Thanks
Offline
Have you attempted to write either system? If so post your code and any errors you've gotten.
Offline
gbjosh wrote:
Have you attempted to write either system? If so post your code and any errors you've gotten.
Nope sorry but I am gonna have to try it myself if no one can help
Offline
bump
any ideas to get the answer I need ?
Last edited by npzman (2018-01-05 12:42:29)
Offline
in "main.c":
... //some code void pause() { //here is a function sleep(1); // wait 1 second to be sure that the user has released the button gotoxy(7,16); //replace the cursor printf("PAUSE"); UPDATE_KEYS(); //we check the keys while (!(KEY_PRESSED(J_START)) { //while start is not pressed UPDATE_KEYS(); } printf(" "); //if we are here, start is pressed so we can clear the message } void main() { ... //some code while(1) { while (state_running) { ... //some code UPDATE_KEYS(); if (KEY_PRESSED(J_START) { pause(); } SpriteManagerUpdate(); ... //some code } } ...//some code } ... //some code
I'm not sure if sleep works in gb environment (it's been less than an hour since I discovered the site and the ZGB project)...
I've seen your videos and there are nice, but you should learn the C by following a tutorial before try to make a complete game
EDIT: I want my money.
Last edited by helper (2018-01-05 15:10:19)
Offline
helper wrote:
in "main.c":
Code:
... //some code void pause() { //here is a function sleep(1); // wait 1 second to be sure that the user has released the button gotoxy(7,16); //replace the cursor printf("PAUSE"); UPDATE_KEYS(); //we check the keys while (!(KEY_PRESSED(J_START)) { //while start is not pressed UPDATE_KEYS(); } printf(" "); //if we are here, start is pressed so we can clear the message } void main() { ... //some code while(1) { while (state_running) { ... //some code UPDATE_KEYS(); if (KEY_PRESSED(J_START) { pause(); } SpriteManagerUpdate(); ... //some code } } ...//some code } ... //some codei'm not sure if sleep works in gb environment (it's been less than an hour since I discovered the site and the ZGB project)...
I've seen your videos and there are nice, but you should learn the C by following a tutorial before try to make a complete game
Thanks it seen you are new here welcome. Also gbjosh was helping me for a bit on email . Try to use ZGB wish you success
Last edited by npzman (2018-01-05 15:08:18)
Offline
Actually I think I'm not going to make some game before long time, I'm just passing through here.
I don't really care about your private life (and about your email): I just want my money
Offline
helper wrote:
Actually I think I'm not going to make some game before long time, I'm just passing through here.
I don't really care about your private life (and about your email): I just want my money
is this a troll account. Plus still not working on ZGB
Last edited by npzman (2018-01-05 15:28:40)
Offline
npzman wrote:
Seriously $10 goes to the person who helps me out. I would even pay before I make you do anything
npzman wrote:
$15 now
I think not...
Offline
What is the error ?
Offline
I just need to get a pause on ZGB for once this account was made today
Offline
I know, I just discovered the website today ><
But does my code work?
Last edited by helper (2018-01-05 15:35:24)
Offline
Ok adieu.
Offline
it needs to work on ZGB learn it
Offline
Literally all you need to do (and if you had studied C and a few basic concepts before, you'd know that) is use some variable to store whether the game is running. Only update if that is the case. Because if you don't update, nothing will change on screen, AKA you've got pause.
Offline
Robbi_Blechdose wrote:
Literally all you need to do (and if you had studied C and a few basic concepts before, you'd know that) is use some variable to store whether the game is running. Only update if that is the case. Because if you don't update, nothing will change on screen, AKA you've got pause.
Alright now translate that into C code ZGB can read. If it is that simple why no one is helping. Ignoring that then.
I am sick of making post of the same thing again and again. I want to move on to new stuff
Last edited by npzman (2018-01-06 06:08:28)
Offline
npzman wrote:
Alright now translate that into C code ZGB can read.
No.
npzman wrote:
If it is that simple why no one is helping.
Because you should be able to do it yourself with a TINY bit of thinking.
We're not here to write your game for you.
Offline
Well I am doing that myself. I spent 5 hour straight. So much rage quits. Please do it just once. I am spreading knowledge in youtube videos so it doesn't benefits just one person.
Last edited by npzman (2018-01-06 06:34:26)
Offline
this is taken me even longer robbi if you know how be kind and tell me I will owe you
Offline
Robbi_Blechdose wrote:
npzman wrote:
Alright now translate that into C code ZGB can read.
No.
npzman wrote:
If it is that simple why no one is helping.
Because you should be able to do it yourself with a TINY bit of thinking.
We're not here to write your game for you.
Please man I tried hard I really want to make game boy ggames and stuff man. Just tell me the code just once
Last edited by npzman (2018-01-07 05:01:29)
Offline
You may get more/better responses from posting the code from your attempts rather than asking for people to write the code for you.
Offline
here is my code attempt on spriteplayer.c
if(KEY_PRESSED(J_START)) { void pause() { //here is a function sleep(1); // wait 1 second to be sure that the user has released the button gotoxy(7,16); //replace the cursor printf("PAUSE"); }
the code is easy for you to make why don't you make it. This isn't the place to get your code written ?
Last edited by npzman (2018-01-08 02:41:37)
Offline
npzman wrote:
This isn't the place to get your code written ?
No. It is the place to get help with your code and maybe small snippets so that you will be able to write it yourself (because then you'll have understood it.)
Now, that is not your whole file, is it?
On another note, you should REALLY look up and work through some C tutorials. Because then you'd immediately realize that that won't compile.
(Because you can only do stuff in functions. But the input check is outside the function!)
Offline
just tell me take $10
Offline
OK, just a thing, I made a code for you and you have not tested my code. There is two options: you're a dumbass or you have less than 10 years old. Just copy what I did to you in the f*cking code of your game and delete your other shit. The places where I wrote "..." are used to know where to put these lines of code ... So I specified the file where to put this, so now try my code and especially stop shitting on people with your flood. Danke
Offline