Gameboy Development Forum

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.

Ads

#51 2017-04-12 03:24:00

Zalo
Member
From: Spain
Registered: 2016-07-26
Posts: 103
Website

Re: ZGB, a little engine for the Game Boy

DU0 wrote:

- How do I put more maps into my game? The tutorial just tells you how to modify the one that's already there.

Duplicate the map file and before doing anything go to Export To and change the filename and the Label. If you export it now it will create the .h and .c in the res/src folder. If you want to load this map use InitScroll in StateGame.c with this map instead of the one in the tutorial (called map)

DU0 wrote:

- That being done, how do I change scenes? Where do I declare them?

You don't change scenes, you change states. The easiest way to move from one map to another is to Reload the state Game using SetState and then loading a new map based on some global var

DU0 wrote:

- Not sure if that this has anything to do with the engine itself, but how do I make a save point?

I haven't donde that yet... I wouldn't worry too much about this until I had a game running

DU0 wrote:

- Finally, is it possible to make a ROM that'll have colors but still work fine on DMG? Or should I just compile two ROMs, one for each system?

I know it is posible, because there were commercial games that will run in both systems but right now color feature hasn't been added yet. I am currently merging the changes from Mills to get this working. Again, start with something easier, don't worry about colors yet

DU0 wrote:

Also, sorry if I'm spamming or something, but I'm just really excited with being able to do stuff on the Game Boy :3

I'm really excited to see it

Offline

 

#52 2017-04-12 13:06:22

l0k1
Member
Registered: 2014-10-23
Posts: 44

Re: ZGB, a little engine for the Game Boy

DU0 wrote:

- Finally, is it possible to make a ROM that'll have colors but still work fine on DMG? Or should I just compile two ROMs, one for each system?

On startup, the AF register (not sure how to access in C, sorry) contains $01 if it's a DMG or SGB, $FF if it's an MGB, and $11 if it's a GBC. Commercial GBC-only carts will check this and if it's not a GBC, a special splash screen will pop up basically saying "Please use this cart in a Game Boy Color".

As long as you don't use the extra VRAM/WRAM, the HDMA, and the double speed mode of the GBC, it should work on both. (Basically a DMG game with color info also).

Offline

 

#53 2017-04-12 19:25:13

Mills
Member
Registered: 2012-12-21
Posts: 132

Re: ZGB, a little engine for the Game Boy

DU0 wrote:

So, I've pretty much finished the tutorial (I skipped the music part because I'm still figuring that out). However, there are a couple of things that are still not clear to me:

- How do I put more maps into my game? The tutorial just tells you how to modify the one that's already there.

- That being done, how do I change scenes? Where do I declare them?

- Not sure if that this has anything to do with the engine itself, but how do I make a save point?

- Finally, is it possible to make a ROM that'll have colors but still work fine on DMG? Or should I just compile two ROMs, one for each system?


Also, sorry if I'm spamming or something, but I'm just really excited with being able to do stuff on the Game Boy :3

To use more maps and scenes, you have to create files for them using the templates, You have to copy the template files and change the names and the functions inside:

Code:

src\
    .
    .
    StateNewScene.c

Inside the new file you have to use a new name and include the NewScene.h:

Code:

    #include "StateNewScene.h"
    UINT8 bank_NEWSCENE 3
    
    
    void Start_NEWSCENE();
    void Update_NEWSCENE();

Then create the .h, again with its new names   

Code:

include\
        .
        .
        StateNewScene.h

Code:

    #include "main.h"

    DECLARE_STATE(NEWSCENE);

Also include "StateNewScene.h" in zgbmain.c and INIT_STATE(NEWSCENE);

And declare the newscene in zgbmain.h
   

Code:

        
    typedef enum {
        STATE_GAME,
        STATE_NEWSCENE,

        N_STATES
    } STATE;

Create the new maps etc...

Code:

resources\src\
            .
            .
            newMap.b3.c

If the compiler complains about undefined things, just be sure you included everything that particular scene needs.

Last edited by Mills (2017-04-12 19:28:39)

Offline

 

#54 2017-04-13 12:44:44

Mills
Member
Registered: 2012-12-21
Posts: 132

Re: ZGB, a little engine for the Game Boy

l0k1 wrote:

DU0 wrote:

- Finally, is it possible to make a ROM that'll have colors but still work fine on DMG? Or should I just compile two ROMs, one for each system?

On startup, the AF register (not sure how to access in C, sorry) contains $01 if it's a DMG or SGB, $FF if it's an MGB, and $11 if it's a GBC. Commercial GBC-only carts will check this and if it's not a GBC, a special splash screen will pop up basically saying "Please use this cart in a Game Boy Color".

As long as you don't use the extra VRAM/WRAM, the HDMA, and the double speed mode of the GBC, it should work on both. (Basically a DMG game with color info also).

The same game can work in DMG and CGB. But When adding color features to the ZGB, I realized it is better to compile two roms, one for CGB and other for DMG.

Even if they are the same game, the color functions may slow down a DMG. You can't add an "if" just for every function to enable color or not.

You read the cpu in c with this

Code:

if (_cpu == 0x01)    DMG
if (_cpu == 0x11)    CGB

Offline

 

#55 2017-04-20 03:16:13

npzman
Banned
From:
Registered: 2014-11-19
Posts: 197

Re: ZGB, a little engine for the Game Boy

I have now done all the chapters up to sounds chapter in the ZGB tutorial I am stuck with the sounds does anyone want to help me ? Finish

NOTE : I skipped the music chapter on ZGB github


Twitter : @Sfeedman please follow
Join : sfeed.club my website please join

Offline

 

#56 2017-05-04 03:27:49

Zalo
Member
From: Spain
Registered: 2016-07-26
Posts: 103
Website

Re: ZGB, a little engine for the Game Boy

Support for Game Boy Color is now available on ZGB. I have also updated the tutorials with all the recent changes
https://im2.ezgif.com/tmp/ezgif-2-a097450f82.gif


https://github.com/Zal0/ZGB#game-boy-color


Thanks a lot to Mills for all his work

Offline

 

#57 2017-05-04 04:26:45

npzman
Banned
From:
Registered: 2014-11-19
Posts: 197

Re: ZGB, a little engine for the Game Boy

@Zal0 can you help me with the sound and music chapter on ZGB original. Please unblock my twitter and you know why I got annoying that because you were right about me being young. I am a kid. and even kids has dreams to make a gameboy games.

and I also apologized to Tom Lukeywood "a cat" for my aggressive behaviour.

Last edited by npzman (2017-05-04 04:29:10)


Twitter : @Sfeedman please follow
Join : sfeed.club my website please join

Offline

 

#58 2017-05-06 04:27:06

Mills
Member
Registered: 2012-12-21
Posts: 132

Re: ZGB, a little engine for the Game Boy

Zalo wrote:

Support for Game Boy Color is now available on ZGB. I have also updated the tutorials with all the recent changes
https://im2.ezgif.com/tmp/ezgif-2-a097450f82.gif


https://github.com/Zal0/ZGB#game-boy-color


Thanks a lot to Mills for all his work

Very good tutorial for color, I like how you set the sprite palettes smile.

Offline

 

#59 2017-05-06 06:25:24

AntonioND
Member
Registered: 2014-06-17
Posts: 134
Website

Re: ZGB, a little engine for the Game Boy

Zalo wrote:

https://github.com/Zal0/ZGB#game-boy-color


Thanks a lot to Mills for all his work

"Note: It seems that by default BGB doesn't show colors properly, so ensure you have GBC LCD colors disabled inside Options->Graphics"

Don't do this. It's true that the colors that BGB displays aren't the ones that the RGB values say, but that's because the LCD of the GBC is quite bad and this option tries to emulate the real colors that you would see in a GBC. Sometimes, what looks great in your PC looks pretty bad in the real GBC because of this.

Offline

 

#60 2017-05-06 06:26:48

npzman
Banned
From:
Registered: 2014-11-19
Posts: 197

Re: ZGB, a little engine for the Game Boy

@AntonioND so do you do use ZGB can you help me

Last edited by npzman (2017-05-06 06:27:01)


Twitter : @Sfeedman please follow
Join : sfeed.club my website please join

Offline

 

#61 2017-05-06 07:00:57

AntonioND
Member
Registered: 2014-06-17
Posts: 134
Website

Re: ZGB, a little engine for the Game Boy

npzman wrote:

@AntonioND so do you do use ZGB can you help me

No, I don't use C in the GB, but I check what Zalo does with ZGB.

Offline

 

#62 2017-05-23 10:29:44

npzman
Banned
From:
Registered: 2014-11-19
Posts: 197

Re: ZGB, a little engine for the Game Boy

Best places to learn C programming properly before trying to learn to develop on ZGB for gameboy ?

Since I know next to nothing with C basically, and with the ZGB template tutorial. I have only been coping the codes on the ZGB tutorial. I don't think I would learn C like that. I have also been doing the exact same thing with Tom Lukeywood's youtube video series on gb dev. I have just only been copying what he has been demostrating in the video tutorial.

I just want to truly learn C. Then take that knowledge to ZGB and gbdev to develop anything I can imagine on a gameboy ?


Twitter : @Sfeedman please follow
Join : sfeed.club my website please join

Offline

 

#63 2017-05-23 11:13:30

DonaldHays
Member
From: Seattle
Registered: 2016-08-01
Posts: 36
Website

Re: ZGB, a little engine for the Game Boy

npzman wrote:

Best places to learn C programming properly before trying to learn to develop on ZGB for gameboy ?

That is a healthy approach to take. C programming is its own entity, and it'll be easier to learn C in isolation than to learn it at the same time as programming the Game Boy. The Game Boy is a fairly simple machine—as compared to modern computers—but it's complex enough that approaching it without an understanding of computer programming in general is an imposing undertaking.

It's been many years since I learned C, but the resource I used, cprogramming.com, still exists. I know you like video tutorials, and these tutorials are text-heavy, but programming is text-heavy in general, so I recommend you make a serious effort to read, re-read, and understand the content of those tutorials.

Also, that site has an incredibly active forum (as I write this, there are 500 people actively using that forum right now, as compared to this forum's 350 registered members total.) This forum is a good resource for asking questions about programming the Game Boy specifically, but as you've noticed it's not the busiest place, and it can take a while for replies to happen, so for questions about general C programming I think you'll have better luck on that site's forum.

Offline

 

#64 2017-05-24 08:27:01

npzman
Banned
From:
Registered: 2014-11-19
Posts: 197

Re: ZGB, a little engine for the Game Boy

Does ZGB support HUDs (Heads up display) similar to Mega Man and transparent pause menus? Is it all possible on ZGB


Twitter : @Sfeedman please follow
Join : sfeed.club my website please join

Offline

 

#65 2017-05-24 18:43:19

Alexander the bat
Member
Registered: 2017-03-19
Posts: 31

Re: ZGB, a little engine for the Game Boy

to build Color wat needs to be done? I have to do the terminal way sadly as I don't know the build file and how it's made to build roms on Mac OS X's file system and how it's rendered.

I guess I may have to put headache on hold until the Method used for Dr Mario's engine unless I render it out with my own engine.

What's the version I need to download from Releases - 1.1?

Last edited by Alexander the bat (2017-05-24 18:51:13)

Offline

 

#66 2017-05-25 02:53:38

Zalo
Member
From: Spain
Registered: 2016-07-26
Posts: 103
Website

Re: ZGB, a little engine for the Game Boy

npzman wrote:

Does ZGB support HUDs (Heads up display) similar to Mega Man and transparent pause menus? Is it all possible on ZGB

You can do in two different ways
- Using the Window
- Getting sprites from the sprites stack and placing them manually on screen coordinates (these cannot be inserted into the Sprite Manager since they need to be on screen coordinates not in world coordinates)


Alexander the bat wrote:

to build Color wat needs to be done? I have to do the terminal way sadly as I don't know the build file and how it's made to build roms on Mac OS X's file system and how it's rendered.

I guess I may have to put headache on hold until the Method used for Dr Mario's engine unless I render it out with my own engine.

What's the version I need to download from Releases - 1.1?

Here is the tutorial for Game Boy Color builds. At this right moment I am not giving support for other OS than Windows. MacOs was hard to build since the last gbdk version is different than the one in windows and it has lots of different issues.

Offline

 

#67 2017-05-25 06:24:10

npzman
Banned
From:
Registered: 2014-11-19
Posts: 197

Re: ZGB, a little engine for the Game Boy

@zal0 http://gbdev.gg8.se/forums/viewtopic.php?id=446

please help me with the debug issue ?

Thanks and thanks for the answer


Twitter : @Sfeedman please follow
Join : sfeed.club my website please join

Offline

 

#68 2017-09-11 21:07:35

npzman
Banned
From:
Registered: 2014-11-19
Posts: 197

Re: ZGB, a little engine for the Game Boy

https://www.youtube.com/watch?v=KHaRJcfxYCQ watch ZGB tutorial please why the hell it got 3 dislike. I am going to make part two soon. I am feeling less motivated since no one trying to respond to it. What you are all doing to me isn't nice


Twitter : @Sfeedman please follow
Join : sfeed.club my website please join

Offline

 

#69 2017-09-12 20:22:06

ISSOtm
Member
From: Somewhere in Echo RAM
Registered: 2017-04-18
Posts: 160
Website

Re: ZGB, a little engine for the Game Boy

Let's start with the really positive side of your video : you did some montage. Das gud. Das gud.

Now, let me get the hacksaw before starting the review...


...Okay. Done.

Let's start with the silly things :
http://puu.sh/xy0uL/bb6a2e60ed.jpg Awesome desktop bruh
http://puu.sh/xy0wb/4939439f46.jpg IE is retarded AND a resource hog AND it sucks, I recommend you use something else. wink wink Firefox (you even got it installed, what the fuck)
Why tf CUT-pasting to the env vars ? Just doesn't make sense.

These minor things just add to the confusion of the rest of the video. It's just frustrating.
But that's not what makes this actually bad.

Now, the BIGGEST problem is easily the recording. It's incredibly laggy ; I don't know if your recorder sucks or your PC can't bear it, but it's frustrating to watch (and my eyes hurt)
The other BIGGEST problem is extremely simple yet it spans the entire video : nothing happens. I think you should have cut the parts where you download the files.
The whole video is slow : you're always switching directories instead of having several windows open NON-FULLSCREEN ; you never use browser tabs and thus always "go back" (which is especially LONG in the part where "back" only once takes you back to a redirect. PROTIP : right-clicking the button or holding it should spawn a menu allowing you to go further back in history...) ; you NEVER use any keyboard shortcuts (COME ON, DON'T TELL ME YOU DON'T KNOW Ctrl+X, Ctrl+C or Ctrl+V ???).

Then there's the closing : Ever wanted to make your own Game Boy games well now you can with this easy to learn Tutorial series." The sentence feels heavy and dull. Instead, use "Ever wanted to make your own Game Boy games? Well now you can with this easy to learn tutorial series!". Feels more alive, both because stronger punctuation ("!" vs. ".") and shorter sentences instead of a long one.

All in all this video is SLOW and a bit irritating. Then there's another problem : your prompt to watch it isn't a prompt, it's an order. You're forcing us to watch something that isn't enjoyable. OBVIOUSLY you're going to get dislikes !
If you had nicely asked "Could you please give me reviews about this tutorial ? I want to make a part 2 soon." we'd have been nicer, for sure.


Then, you're never going to read this but I'm still typing it because I vainly hope you do. If you do, put "peanut butter" first in your reply, that'll work as a proof. But that "ordering around" is what you ALWAYS do here. It's very unnerving. Furthermore, you always harass people for an answer, even when they don't want to do so - even when they TELL YOU EXPLICITLY they don't want to ! - which is utterly unnerving (because you're completely ignoring the fact that THEY ARE A SENTIENT PERSON with feelings, certainly not vague things that must answer you very kindly).

Last thing :

"What you are all doing to me isn't nice"

Of course it's not. Maybe you're wondering why - I sincerely doubt it, I bet you think we're just a bunch of suckers/meanies/whatever. Thing is : you're the annoying little kid here. You expect us to be polite, tender, kind, comprehensive with everything you do.
That's what parents do. Not strangers on the Internet.
Face it : if you want to obtain something from us, be it the address of rSTAT or BGB's source code, you have to be communicative and polite, because you can always be turned down or simply ignored.

Side note : that's part of learning how to live. I'm trying to help you be a better person. You can always ignore me, though. Your choice.


tl;dr because you're going to skip everything else :
- Your video has a lot of problems that makes it bad
- You're not politely asking to watch
- You act like we have to be nice and all to you
- We don't have to
- You're annoying everybody because we don't answer you immediately
- We have priorities and lives besides connecting here so you may not get answers when you want to
- Thus everybody ignores you because answering you doesn't do anything
- You don't even thank anyone who helped you !


The French Lord Of Laziness.
Legend of Zelda and Undertale fan, I also tend to break Pokémon R/B/Y a little too much.

Twitter | Me on GCL | Discord : ISSOtm#9015 | Skype : isso.tm (I don't login anymore)

Offline

 

#70 2017-09-12 20:32:19

npzman
Banned
From:
Registered: 2014-11-19
Posts: 197

Re: ZGB, a little engine for the Game Boy

I think I said this before but I will say it again. the screen recorder was recording in HD and the best frame. Adobe Premiere elements 7 had rendering issues so for part 2 I will change the video editing software . Most of the time I didn't use keyboard short cuts. I also need ideas for part 2


P.S zal0 is ignoring me even after I sent him a hundred emails


Twitter : @Sfeedman please follow
Join : sfeed.club my website please join

Offline

 

#71 2017-09-13 08:04:35

ISSOtm
Member
From: Somewhere in Echo RAM
Registered: 2017-04-18
Posts: 160
Website

Re: ZGB, a little engine for the Game Boy

Thing is, first, you completely ignored my post. I know it because there are two words missing from your post.
I don't really feel like paying attention to you anymore because you don't pay any attention to the efforts I put into helping you.

You didn't say the screen recorder was doing its best and the editing software had issues. Also, you published a crappy video, you have no excuses. You could have re-recorded.
Also if you send a hundred emails and get no answer, ask yourself why.

PS : I completely agree with Zal0 on this point. There's no point in talking with you. I'm not blocking you because you didn't spam me yet - but do it and I will not hesitate to block the heck out of you.


The French Lord Of Laziness.
Legend of Zelda and Undertale fan, I also tend to break Pokémon R/B/Y a little too much.

Twitter | Me on GCL | Discord : ISSOtm#9015 | Skype : isso.tm (I don't login anymore)

Offline

 

#72 2017-09-13 10:54:30

Zalo
Member
From: Spain
Registered: 2016-07-26
Posts: 103
Website

Re: ZGB, a little engine for the Game Boy

npzman wrote:

P.S zal0 is ignoring me even after I sent him a hundred emails

Hi big_smile

Offline

 

#73 2017-09-14 10:17:59

npzman
Banned
From:
Registered: 2014-11-19
Posts: 197

Re: ZGB, a little engine for the Game Boy

Zalo wrote:

npzman wrote:

P.S zal0 is ignoring me even after I sent him a hundred emails

Hi big_smile

answer me emails

and check out part 2 here https://www.youtube.com/watch?v=jhM7t-Ehevs


EDIT link fixed and updated

Last edited by npzman (2017-09-14 20:47:04)


Twitter : @Sfeedman please follow
Join : sfeed.club my website please join

Offline

 

#74 2017-09-14 19:21:42

ISSOtm
Member
From: Somewhere in Echo RAM
Registered: 2017-04-18
Posts: 160
Website

Re: ZGB, a little engine for the Game Boy

Checked out.

My reaction ?
https://www.youtube.com/yts/img/meh7-vflGevej7.png
Duss videoh nawt aveilableeeeeeh



(lol for not knowing how to properly copy-paste a URL)

Last edited by ISSOtm (2017-09-14 19:21:57)


The French Lord Of Laziness.
Legend of Zelda and Undertale fan, I also tend to break Pokémon R/B/Y a little too much.

Twitter | Me on GCL | Discord : ISSOtm#9015 | Skype : isso.tm (I don't login anymore)

Offline

 

#75 2017-09-17 18:46:59

Mills
Member
Registered: 2012-12-21
Posts: 132

Re: ZGB, a little engine for the Game Boy

ISSOtm wrote:

Checked out.

My reaction ?
https://www.youtube.com/yts/img/meh7-vflGevej7.png
Duss videoh nawt aveilableeeeeeh


(lol for not knowing how to properly copy-paste a URL)

I'm doing a video tutorial for a MS-DOS engine, but no talking, just info on cute text. If the MS-DOS tutorial works, I might do one with zalo's cute engine.

npzman wrote:

https://www.youtube.com/watch?v=KHaRJcfxYCQ watch ZGB tutorial please why the hell it got 3 dislike. I am going to make part two soon. I am feeling less motivated since no one trying to respond to it. What you are all doing to me isn't nice

npzman your videos would look better without that anoying... thing... I think you made something to the frames per second of your source video.

If you want to make a good video and your pc is not very fsat, you should record just part of the desktop, and make code small to fit in a little box, then the size of the text will be bigger and it will be easier to read on youtube.

Last edited by Mills (2017-09-17 18:55:04)

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson