Well… not so much interested in an actual IDE… but more in what tools/libraries/etc are missing from being able to have a collection of software that someone could use to create a complete commercial quality game… without needing to write tools themselves, or knowing every single detail of the hardware/memory map like the back of their hand.
This is going along the same lines as creating a community game, though I think that may be a little bit ambitious at the moment, because of what I’m looking to discuss in this thread.
I think we need a good base for building a game before just jumping in. I’d like to work that out here… gather useful snippets of code, work out a common library (Ha! I know π ), figure out what’s difficult to use (and why), what tools are needed to make our job easier, etc.
So… I’m gonna start listing stuff that I can think of… feel free to jump in and add comments, suggestions, and ideas.
Tools:
Audio Converter
-from what format?
-how to audio people make actual sounds before conversion to VB (programs, converters, etc)?
Graphics
-I’ve found Grit to be very powerful, but not very user friendly, so I always go back to VIDE, which has some limitations and annoyances. Is it possible for a VB version of WinGrit (or does it already exist)?
Compiler:
What’s the latest version, any problems, how to install, creating makefiles, etc?
Code NOT in .h files
-While maybe it doesn’t matter, it has always bothered me that we include .h files, which has the code in it, rather than just function prototypes, and compiling the library source files seperately.
Code/library:
Audio Player
-I’ve used timer interrupts, though does audio normally need to change more than 50 times/sec? Could we just update between game frames? Of course depends on some sort of converter output
Game Frame stuff
Descriptive macros for common stuff
-Display sync
-Controller reads – yes, while(!(vbReadPad()&(K_ANY))); works… but why not WAIT_PAD_ANY; or something?
-Framebuffer control
Optimized chunks of commonly used code (that may need to be fast)
-memory copies
-framebuffer draws
Calibrated time delay functions
-We need to kill vbWaitFrame() :P. If we regularly use game frames, we shouldn’t need them to throttle main loops, but a calibrated wait would be nice for things like wave playback (short durations), forcing a screen to be read for a few seconds (long durations), etc.
Objects
-I personally find objects to be a pain to manage… is it just me? Is there a way we can make these easy?
Text
-We have several functions, though they’re not great IMO… and I think the ASCII table uses too much char memory (with unneeded chars)
H-Bias, Affine
-We have some Affine code, but slow because floating point
-Is there any H-Bias lib code, or is it just so easy you do it manually?
Random Numbers
-make it simple so you can just do rand(), and is there a better random seed than CTA? Possibly user input, but that’s game specific.
-Probably should have a better PRN generator.
Link
-I’m not sure that there’s really any helper functions written for using the link. While it’s pretty easy to use, a simple set_master(), send(), receive(), COMCNT_stat(), etc would be nice.
Basically, I think it’d be great to write a very clean example using all kinds of stuff from a new library, and using new tools. Maybe we could teach the new VB devs on that, and us old farts could work on making the transition. I’ve personally been stuck to my old ways, writing dirty code, and being limited to old tools for too long… I’m ready to make the step.
So… any comments? What do you think is most important? IMO, easy audio is the most lacking, though code cleanliness is important to keep large projects from becoming unworkable.
I’m going to look around at some sample code/libraries and see if I can get some ideas, and maybe create what I’d call an “improved” library to post here for comment. Looking though the compo entries, DanB’s Hunter code looks nicely ordered, multiple c files, seperated library, makefile, etc. Nice job π .
DogP
I agree that this needs a lot of focus!
I think that an IDE would actually be very helpful. Seems like everyone uses Eclipse nowadays, so I would say we should make a customized version with gccvb fully integrated and release that as the “official” IDE. Then nobody even has to know about makefiles, or how to build gccvb, or anything like that. I don’t know how easy or hard it is to customize Eclipse, but I just know that it seems to be the popular kid on the block right now.
I think the ultimate goal should be to let someone who has never read anything about VB Programming to be able to compile and run a hello world program on their first try. No hassling with Cygwin or gathering files from everywhere, just download the IDE, install it, open the example program, hit compile, and run.
Yep… I agree that an IDE would be nice, though IMO there’s more important things… but if someone wants to take charge of it, I’m all for it! I’m okay with just using Notepad2 or some other text editor though.
And yeah… it does seem like Eclipse is the cool IDE these days… I’ve never dealt with it though, so hopefully someone with some experience could chime in about how difficult it would be to integrate it. Heh, this reminds me of Office Space when they’re talking about how they’re a bunch of nerds looking up Money Laundering in the dictionary π . We know Eclipse could be the answer, but don’t know anything about it π .
DogP
DogP wrote:
Well… not so much interested in an actual IDE… but more in what tools/libraries/etc are missing from being able to have a collection of software that someone could use to create a complete commercial quality game… without needing to write tools themselves, or knowing every single detail of the hardware/memory map like the back of their hand.This is going along the same lines as creating a community game, though I think that may be a little bit ambitious at the moment, because of what I’m looking to discuss in this thread.
I think we need a good base for building a game before just jumping in. I’d like to work that out here… gather useful snippets of code, work out a common library (Ha! I know π ), figure out what’s difficult to use (and why), what tools are needed to make our job easier, etc.
So… I’m gonna start listing stuff that I can think of… feel free to jump in and add comments, suggestions, and ideas.
Tools:
Audio Converter
-from what format?
-how to audio people make actual sounds before conversion to VB (programs, converters, etc)?
That depends on whether you’re talking about sound effects or music. For sound effects, I’d like something like SFXr that generates VSU code like your non-real-time emulator. Music should obviously be synthesized by the VSU, so you have to start with a “music language” of some kind. A member named “mic_” posted about adding VB support to his MML compiler. Then there’s DanB’s unreleased MIDI playing code. Also, I’ve chatted a bit with Kitaro (who helped get Bound High working) about music playing on the VB. I seem to recall him saying something about having VB code that can play music in a format similar to that used in Bound High (which I believe is also a version of MML).
Graphics
-I’ve found Grit to be very powerful, but not very user friendly, so I always go back to VIDE, which has some limitations and annoyances. Is it possible for a VB version of WinGrit (or does it already exist)?
I think the thing about Grit is just getting it set up in a makefile and designing your code/work-flow around naming the input image files and using the generated variable/constant names. It should be a mostly hands-off process, where you just dump images in a folder with your code and have them converted when you rebuild.
Compiler:
What’s the latest version, any problems, how to install, creating makefiles, etc?
This is also a very confusing topic to me. Parasyte started working on a shell script that downloads, patches, and builds everything. That’s a good way to go for the Linux camp. I think the best distribution for Windows would be a set of pre-compiled, native win32 (and win64?) binaries, linked against only the MS run-times, so it can be used with the Mingw versions of make, etc. from the Windows command-line, or integrated into things like Notepad2, etc. We should also look into the Eclipse thing mbuchman mentioned, of course.
I currently use a version built in cygwin, which means I have to use the bash shell provided with cygwin to run it, instead of having it integrated into my text-editor. It’s just a bit less convenient than I’d like.
Code NOT in .h files
-While maybe it doesn’t matter, it has always bothered me that we include .h files, which has the code in it, rather than just function prototypes, and compiling the library source files seperately.
I’ve got a working, albeit not comprehensive, version I split into .C and .H files. I’ve been slowly cleaning it up and adding to it. It might be a good base to work from.
Code/library:
Audio Player
-I’ve used timer interrupts, though does audio normally need to change more than 50 times/sec? Could we just update between game frames? Of course depends on some sort of converter outputGame Frame stuff
Descriptive macros for common stuff
-Display sync
-Controller reads – yes, while(!(vbReadPad()&(K_ANY))); works… but why not WAIT_PAD_ANY; or something?
-Framebuffer controlOptimized chunks of commonly used code (that may need to be fast)
-memory copies
-framebuffer drawsCalibrated time delay functions
-We need to kill vbWaitFrame() :P. If we regularly use game frames, we shouldn’t need them to throttle main loops, but a calibrated wait would be nice for things like wave playback (short durations), forcing a screen to be read for a few seconds (long durations), etc.
I’ve started work on a “virtual timer” library that allows a number of “events” to be triggered at different times by a free-running timer kernel based on the timer interrupt. It’s a simple idea: set the timer to some fixed rate (that won’t take too much CPU time for servicing the interrupts) and then decrement a number of counters, calling function pointers when they reach zero.
Objects
-I personally find objects to be a pain to manage… is it just me? Is there a way we can make these easy?
I doubt if there’s any “boiler-plate” solution that would work for every situation. We should just make it easy to understand how the subsystem works, and make efficient access functions, constants, etc. with which to access them.
Text
-We have several functions, though they’re not great IMO… and I think the ASCII table uses too much char memory (with unneeded chars)
One of the first things I thought of upon seeing Fwirt’s BGMap pixel routines was making a variable-width font renderer (with a compressed, i18n-compatible font format, of course ;-)).
H-Bias, Affine
-We have some Affine code, but slow because floating point
-Is there any H-Bias lib code, or is it just so easy you do it manually?Random Numbers
-make it simple so you can just do rand(), and is there a better random seed than CTA? Possibly user input, but that’s game specific.
-Probably should have a better PRN generator.
Using user input isn’t necessarily game-specific, as long as most games include some form of warning, IPD, and “activate auto-pause?” screens. If we standardize that code (while allowing custom imagery/text), we could incorporate a high-speed counter for random seeding.
Link
-I’m not sure that there’s really any helper functions written for using the link. While it’s pretty easy to use, a simple set_master(), send(), receive(), COMCNT_stat(), etc would be nice.
Definitely. Get to work on that π j/k.
Basically, I think it’d be great to write a very clean example using all kinds of stuff from a new library, and using new tools. Maybe we could teach the new VB devs on that, and us old farts could work on making the transition. I’ve personally been stuck to my old ways, writing dirty code, and being limited to old tools for too long… I’m ready to make the step.
Here, here! We really need to blow the dust and cobwebs out of the whole works. With processor speeds skyrocketing, and OOP taking over everything, new programmers need places to learn how to “code to the bare metal”; and what better place than our beloved red friend? π
So… any comments? What do you think is most important? IMO, easy audio is the most lacking, though code cleanliness is important to keep large projects from becoming unworkable.
I’m going to look around at some sample code/libraries and see if I can get some ideas, and maybe create what I’d call an “improved” library to post here for comment. Looking though the compo entries, DanB’s Hunter code looks nicely ordered, multiple c files, seperated library, makefile, etc. Nice job π .
DogP
I agree: audio is still very much a “black art” among most VB devs, and severely lacking in the existing homebrew library. I can somewhat grasp the basics of the VSU, but my complete lack of musical talent provides a rather large barrier to getting anything written. We need a way to let the “artistic” folks do their thing in a way that can be easily incorporated into a game.
That being said, you also have a point about a clean, easy to follow library/code-base to work from… And then there’s the compiler situation… Hmm, quite a lot to do before beginning the “uber homebrew project” π but I think we’re up to it! :thumpup:
That depends on whether you’re talking about sound effects or music. For sound effects, I’d like something like SFXr that generates VSU code like your non-real-time emulator. Music should obviously be synthesized by the VSU, so you have to start with a “music language” of some kind. A member named “mic_” posted about adding VB support to his MML compiler. Then there’s DanB’s unreleased MIDI playing code. Also, I’ve chatted a bit with Kitaro (who helped get Bound High working) about music playing on the VB. I seem to recall him saying something about having VB code that can play music in a format similar to that used in Bound High (which I believe is also a version of MML).
This is interesting for me because I like to include music in my Captain Sevilla, would be good that the midi player to be release . Tools that facilitate the creation of homebrew software are very helpful! thanks!
- This reply was modified 13 years, 11 months ago by rubengar.
That depends on whether you’re talking about sound effects or music. For sound effects, I’d like something like SFXr that generates VSU code like your non-real-time emulator. Music should obviously be synthesized by the VSU, so you have to start with a “music language” of some kind. A member named “mic_” posted about adding VB support to his MML compiler. Then there’s DanB’s unreleased MIDI playing code. Also, I’ve chatted a bit with Kitaro (who helped get Bound High working) about music playing on the VB. I seem to recall him saying something about having VB code that can play music in a format similar to that used in Bound High (which I believe is also a version of MML).
Thanks for the links… I hadn’t seen SFXr before… that’s pretty cool (interesting how it smartly randomly generates stuff that actually sounds good π ). Also, on the same page is musagi, which looks pretty nice for creating music as well.
So, you’re going with the assumption that it’s better to create VB music rather than convert it from something else? I do think that’s the case here… like my wav converter works fine for small amounts of speech, but that’d be horribly inefficient and bad sounding to do a whole music track and sound effects like that. And I’m not sure that FFT sequences are up to the task of converting music (that’s how I did the some music and the sound effects in Mario Kart).
And yeah… a MIDI player may be nice, though that’s what I did with most of the Mario Kart music, as well as the demo song in my first sound tester app. The problem is that MIDI instruments are much more capable than the VB waveforms, as well as having more channels, so they don’t always work out. And yep… I believe BH did use MML, which of course is great, except how do we generate MML? My skill level is in line with placing Smiley Faces, Marios, Cats, Dogs, etc on a Mario Paint screen π .
I think the thing about Grit is just getting it set up in a makefile and designing your code/work-flow around naming the input image files and using the generated variable/constant names. It should be a mostly hands-off process, where you just dump images in a folder with your code and have them converted when you rebuild.
Wait… you’re saying to convert files with Grit on the fly, rather than just using it as a tool to create graphics .h files? That’s an interesting thought, though I kinda like to have real-time control (like in VIDE I usually end up converting my files several times to get the brightness/contrast levels correct to make a good conversion, as well as visually seeing that I’m making efficient use of chars… which is why I’d like a nice GUI for tweaking).
This is also a very confusing topic to me. Parasyte started working on a shell script that downloads, patches, and builds everything. That’s a good way to go for the Linux camp. I think the best distribution for Windows would be a set of pre-compiled, native win32 (and win64?) binaries, linked against only the MS run-times, so it can be used with the Mingw versions of make, etc. from the Windows command-line, or integrated into things like Notepad2, etc. We should also look into the Eclipse thing mbuchman mentioned, of course.
I currently use a version built in cygwin, which means I have to use the bash shell provided with cygwin to run it, instead of having it integrated into my text-editor. It’s just a bit less convenient than I’d like.
I’m also using a cygwin build (somewhat old DT version)… it seems like there’s been talk of newer builds with various patches, but unfortunately I haven’t paid much attention. I agree, a precompiled downloadable zip would be nice. Maybe someone who’s running a newer patched version can chime in?
I’ve got a working, albeit not comprehensive, version I split into .C and .H files. I’ve been slowly cleaning it up and adding to it. It might be a good base to work from.
Yeah, if you’ve got a good base, please post it here, or you could email to me if you’d prefer.
I’ve started work on a “virtual timer” library that allows a number of “events” to be triggered at different times by a free-running timer kernel based on the timer interrupt. It’s a simple idea: set the timer to some fixed rate (that won’t take too much CPU time for servicing the interrupts) and then decrement a number of counters, calling function pointers when they reach zero.
Cool, yeah… that’s one thing I was thinking would be good for the timer… basically creating periodic functions, so one “function” doesn’t hog the only timer. I use those in RTOSes, though I’m not sure how many things need to be periodic on the VB. Sound is really the one that comes to mind, though I’m unsure that it needs more than 50Hz update (a 20ms note is pretty short). A lot of the periodic things really could (and probably should) be synced to the game frames. Like controller reads, graphics drawing, game timers, etc.
But yeah, that’d be nice to be able to basically “add” a periodic function… just tell it how many ticks and pass a pointer to the function to call.
I doubt if there’s any “boiler-plate” solution that would work for every situation. We should just make it easy to understand how the subsystem works, and make efficient access functions, constants, etc. with which to access them.
Yep… but I don’t think we’re there yet. BGMaps are VERY easy to deal with… OBJs aren’t, IMO. I think this could use a little work in the improved library.
One of the first things I thought of upon seeing Fwirt’s BGMap pixel routines was making a variable-width font renderer (with a compressed, i18n-compatible font format, of course ;-)).
ΒΏquΓ©? I’m just thinking something like what we have with bgmap_print() and itoa(), but with a smaller font table and more friendly usage (annoyances like negative numbers show up as really large numbers, then when you go back positive, it only overwrites the characters used, leaving a mess). I’ve made quick hacks to some of these functions for specific purposes, but something a little more standard would be nice.
Using user input isn’t necessarily game-specific, as long as most games include some form of warning, IPD, and “activate auto-pause?” screens. If we standardize that code (while allowing custom imagery/text), we could incorporate a high-speed counter for random seeding.
True, though assuming you press start to get through the warning screen, you have to verify that holding start doesn’t automatically skip that screen (basically check for not pressed, then pressed). And yeah, you’d want that counter as fast as possible, or to modify the seed several times during startup or throughout gameplay to give the best randomness.
Link
Definitely. Get to work on that π j/k.
Yep… that’s one of the first things on my list for putting into the library. I’ll probably be looking for input once I get working on it.
I agree: audio is still very much a “black art” among most VB devs, and severely lacking in the existing homebrew library. I can somewhat grasp the basics of the VSU, but my complete lack of musical talent provides a rather large barrier to getting anything written. We need a way to let the “artistic” folks do their thing in a way that can be easily incorporated into a game.
Yeah, musical talent is what usually holds me back too π . Like you said, if we had a way for musically talented people to make stuff (or remove the need for music talent π ), we’d be in good shape.
That being said, you also have a point about a clean, easy to follow library/code-base to work from… And then there’s the compiler situation… Hmm, quite a lot to do before beginning the “uber homebrew project” π but I think we’re up to it! :thumpup:
Yep… when it’s me coding for myself, I tend to just hack stuff together, but if we’re going to make a large collaborative project, we really need a well structured and clean base. I think audio handling and a better/common library are critical.
DogP
Wow, these are some really long posts… π― Guess I’ll just throw my 2 cents into the parts I found interesting.
Audio:
I think the code is out there, it just needs to be released. We need something that can convert from a format that’s easy to compose in, to something that’s easy to import into your project, such that it can be updated with timer calls. (Like… DanB’s midi converter? I know you said you would release the source 2 years ago when it debuted, DanB. It has to come out sooner or later. ;-)) I think music would work best with a timer interrupt call so that the music is completely unaffected by slowdown. You could use a frame interrupt to handle graphics. Which brings me to…
Graphics:
I’ve never used Grit, how does it work? It looked to me like a “dumb” tool that would just convert an image into something that can be used in VRAM. I’d like something that gives you full control over VRAM tiles. The problem with VIDE is that it’s really clunky when it comes to Chars. You can’t even move them around once you’ve placed them. If you look at the Mandelbrot explorer source folder, you can see that I was actually using the GIMP to lay out tiles, and then just using VIDE as a go-between. Another thing (sorry, I’m on a rant) is that VIDE “links” BGMaps to CharSets, and limits BGMaps to the Chars in that set, when a BGMap tile actually has access to all the tiles in Char RAM. I’d like to write a utility if I get the time.
Objects:
I actually prefer objects over BGMaps because of their versatility, but they are a bit of a pain to manage. If you want to “generalize” object management, you have to come up with some way of allocating objects, and then keeping track of them. This should be easy, but might have some nasty overhead. I have my own more hackish solutions to this problem…
Random Numbers:
I actually wrote my own random.h based on c’s standard rand. As far as seeding, I figure a predefined static seed is good enough, especially if the game’s progress depends on user input.
As a parting note, I would prefer it if whatever gets added to the pool is not tied down to an IDE. Personally, I develop in Vim and terminal, so having to use an IDE would be frustrating for me.
Fwirt, I am sorry to hear about your programming conditions π
But anyway, in my opinion, the whole reason to have an IDE is for those who do not want to take the time to set up everything themselves, or who are unable to, or whatever. In college, for example, they don’t focus on makefiles or compiler configurations, you just use an IDE and accept all that background stuff as “magic.” So compiling is essentially just clicking an icon, no thought goes into what actually happens when you click the icon, or what has been set up behind the scenes. Anyway, because of this, I am sure there are a handful of programmers out there who can actually write decent C but who have never done anything outside of an IDE before.
Anyway, nothing would require you to use the IDE, it would just be handy for a smooth , out-of-the-box experience.
DogP wrote:
And yep… I believe BH did use MML, which of course is great, except how do we generate MML? My skill level is in line with placing Smiley Faces, Marios, Cats, Dogs, etc on a Mario Paint screen π .
Heh, that’s me, too π But, there are open-source clones of Mario Paint, so, why not make one that saves MML? Actually, the Windows one I use (Mario Sequencer) saves a fairly simple file format that could be converted pretty readily, plus the sounds are all .WAV files in a folder, so they can be changed out to match the actual VB “instruments”. It would at least get programmers started with a way to make a prototype of what they want the music to sound like, which then gets handed off to an actual musician for polish.
I think the thing about Grit is just getting it set up in a makefile…
Wait… you’re saying to convert files with Grit on the fly, rather than just using it as a tool to create graphics .h files? That’s an interesting thought, though I kinda like to have real-time control (like in VIDE I usually end up converting my files several times to get the brightness/contrast levels correct to make a good conversion, as well as visually seeing that I’m making efficient use of chars… which is why I’d like a nice GUI for tweaking).
Yes, that’s actually what it was designed for, I think. It has a staggering array of command-line options, plus it can take configuration options from files, so it can do different things based on the folder the images are in. I understand what you mean by wanting to “tweak” the results, but that’s what I meant by getting a “work-flow” in place; one that starts with making images ready to be converted, using the right settings for Grit, etc.
I’ve got a working, albeit not comprehensive, version I split into .C and .H files. I’ve been slowly cleaning it up and adding to it. It might be a good base to work from.
Yeah, if you’ve got a good base, please post it here, or you could email to me if you’d prefer.
It’s attached. I’m still not a very good C programmer, so the two .h files is all I could come up with to solve some cryptic compiler errors. You can probably eliminate the hack, for which I would be grateful.
I’ve started work on a “virtual timer” library that allows a number of “events” to be triggered at different times by a free-running timer kernel based on the timer interrupt…
Cool, yeah… that’s one thing I was thinking would be good for the timer… basically creating periodic functions, so one “function” doesn’t hog the only timer. I use those in RTOSes, though I’m not sure how many things need to be periodic on the VB. Sound is really the one that comes to mind, though I’m unsure that it needs more than 50Hz update (a 20ms note is pretty short). A lot of the periodic things really could (and probably should) be synced to the game frames. Like controller reads, graphics drawing, game timers, etc.
But yeah, that’d be nice to be able to basically “add” a periodic function… just tell it how many ticks and pass a pointer to the function to call.
I agree about most things probably only needing to be synched to game frames, especially animation. I’m pretty sure music/audio could be, too. I started making the virtual timer thing as part of that chorded text input system I told you about. I need short duration (ie. a few ms) timers to allow for “human slowness” in pressing and releasing key combos. Although… now that I think about it, maybe just counting keypad reads/interrupts would be sufficient…
One of the first things I thought of upon seeing Fwirt’s BGMap pixel routines was making a variable-width font renderer (with a compressed, i18n-compatible font format, of course ;-)).
ΒΏquΓ©? I’m just thinking something like what we have with bgmap_print() and itoa(), but with a smaller font table and more friendly usage (annoyances like negative numbers show up as really large numbers, then when you go back positive, it only overwrites the characters used, leaving a mess). I’ve made quick hacks to some of these functions for specific purposes, but something a little more standard would be nice.
Oh, I didn’t know you weren’t using dasi’s port of that printf routine. It works great with bgmap_print type stuff. But, I wasn’t really talking about debugging. For that, I think we should work on a link-port option.
No, I was talking about text output in an actual game, such as an RPG, inventory adventure, etc. I would especially like to work on features like those found in the Paper Mario games, like “shaking” text for scared people, different sizes for yelling and whispering, etc.
Fwirt wrote:
Graphics:
I’ve never used Grit, how does it work? It looked to me like a “dumb” tool that would just convert an image into something that can be used in VRAM. I’d like something that gives you full control over VRAM tiles. The problem with VIDE is that it’s really clunky when it comes to Chars. You can’t even move them around once you’ve placed them. If you look at the Mandelbrot explorer source folder, you can see that I was actually using the GIMP to lay out tiles, and then just using VIDE as a go-between. Another thing (sorry, I’m on a rant) is that VIDE “links” BGMaps to CharSets, and limits BGMaps to the Chars in that set, when a BGMap tile actually has access to all the tiles in Char RAM. I’d like to write a utility if I get the time.
Grit is definitely not “dumb”. I don’t even fully grasp all the powers it has, yet. I do know that it can make multiple BGMaps using one common set of chars, and that it doesn’t artificially limit the number of chars in a BGMap. I really think it’s going to make the difference between us making something and this whole project falling apart. VIDE is great for what it is, but it’s just not suitable for a big project like DogP’s proposing.
Objects:
I actually prefer objects over BGMaps because of their versatility, but they are a bit of a pain to manage. If you want to “generalize” object management, you have to come up with some way of allocating objects, and then keeping track of them. This should be easy, but might have some nasty overhead. I have my own more hackish solutions to this problem…
Hackish or not, I would like to see what you’ve come up with; is it included in something you’ve already released? You’re right about the overhead possibly being a killer here, though. Too bad we can’t use that extra bit in each OBJ… unless it works fine and the IntSys doc is being overly cautious. @DanB: did you actually test the use of the extra bit in a BGMap cell? If that works, the one in the OBJs probably works, too, since the doc says the same thing about them being “indeterminate when read”.
As a parting note, I would prefer it if whatever gets added to the pool is not tied down to an IDE. Personally, I develop in Vim and terminal, so having to use an IDE would be frustrating for me.
I don’t think anyone’s talking about restricting development to within an IDE, just providing one to help people get started. I know that the FlashDevelop IDE definitely got me working in Flash/Flex much faster than if I had been forced to use an editor+command-line system… Auto-complete and function synopsis tool-tips, FTW!
Attachments:
Heh, that’s me, too π But, there are open-source clones of Mario Paint, so, why not make one that saves MML? Actually, the Windows one I use (Mario Sequencer) saves a fairly simple file format that could be converted pretty readily, plus the sounds are all .WAV files in a folder, so they can be changed out to match the actual VB “instruments”. It would at least get programmers started with a way to make a prototype of what they want the music to sound like, which then gets handed off to an actual musician for polish.
That’s a good point, though Mario Paint style doesn’t translate to VB particularly well… the “instruments” are more complex than the VB does, and everything is short duration notes. Musagi ( http://www.drpetter.se/project_musagi.html ) could possibly get us close to a working VB music generator, though the output isn’t musically pleasing on its own without knowing something about music… so it still doesn’t help me π .
I’ve got a working, albeit not comprehensive, version I split into .C and .H files. I’ve been slowly cleaning it up and adding to it. It might be a good base to work from.
Yeah, if you’ve got a good base, please post it here, or you could email to me if you’d prefer.
It’s attached. I’m still not a very good C programmer, so the two .h files is all I could come up with to solve some cryptic compiler errors. You can probably eliminate the hack, for which I would be grateful.
Thanks… I’ll check it out!
Oh, I didn’t know you weren’t using dasi’s port of that printf routine. It works great with bgmap_print type stuff. But, I wasn’t really talking about debugging. For that, I think we should work on a link-port option.
No, I was talking about text output in an actual game, such as an RPG, inventory adventure, etc. I would especially like to work on features like those found in the Paper Mario games, like “shaking” text for scared people, different sizes for yelling and whispering, etc.
Ah… that’s right… I need to try the pos_printf() or whatever that was. But I’m talking about both debugging output as well as normal in-game text. I like to use text functions for things like score, pause screens, dialog, etc. But for shaking text and stuff, couldn’t you just use a specific world for that text, printf to it, then move the world? Resizing text would be a little tougher, unless you used Affine, which would probably be overkill.
Objects:
I actually prefer objects over BGMaps because of their versatility, but they are a bit of a pain to manage. If you want to “generalize” object management, you have to come up with some way of allocating objects, and then keeping track of them. This should be easy, but might have some nasty overhead. I have my own more hackish solutions to this problem…
Yeah, I’ve done some OBJ management, and yes… there’s overhead allocating, managing, etc… but I mostly just find it to be annoying to deal with. My problem is that 8×8 is pretty small, so if you want enemies that are 32×32 or so, you end up having 4×4 objs, and for moving, you need to move 16 OBJs, and say the enemy turns around… rather than just flipping the chars, you need to flip as well as reorder the chars. This gets tedious, since some enemies could be 32×32, others could be 48×16, etc. A library that would allow operations on a “collection” of OBJs would be really nice IMO. Basically, if we had something that allowed BG-like control, but without the limitations of only 1 BG per world.
There’s also the specifics of using OBJs which tend to cause confusion… like the SPTx regs.
As a parting note, I would prefer it if whatever gets added to the pool is not tied down to an IDE. Personally, I develop in Vim and terminal, so having to use an IDE would be frustrating for me.
Yes, of course nothing would be tied to an IDE… but an IDE is nice to just jump in and get going without needing to deal with configuring stuff that’s not really related to what you’re trying to make.
blitter wrote:
GDB. ‘Nough said. π
Yeah… I’d like to get the USB link adapter set up to work with GDB… but I don’t know nearly enough about GDB to do this at the moment. Do you know the inner workings of GDB to help with this?
DogP
My suggestion for audio is to use WAV and MIDI, because for musicians they’re the easiest to work with, even if they are hard to convert.
But there’s another option: I’ve written a simple DOS-based tracker that supports (a maximum of) four channels and plays them to the PC speaker. The file format is very simple and the four channels conveniently map to the VB’s four wave channels, leaving the sweep channel for Atari 2600-like sound effects and the noise channel for percussion or whatever.
Also, I prefer not being forced to use a specific IDE; EDIT.COM mostly does everything I want anyway. But I think it’s time gccVB comes precompiled for Windows again.
DogP wrote:
Yeah… I’d like to get the USB link adapter set up to work with GDB… but I don’t know nearly enough about GDB to do this at the moment. Do you know the inner workings of GDB to help with this?
I wish I did– as it is I’ve had to blindly slog through the GCC code trying to fix a couple of bugs.
Back in college, I did some Game Boy Advance dev using the HAM engine and SDK. The IDE we used integrated with GDB over a TCP/IP link to a local Debugging version of the VisualBoyAdvance emulator. USB link to hardware would be cool but I was thinking more along the lines of the setup I just described. Work done to get a v810 version of GDB working would also be beneficial to both the VB and the PC-FX homebrew communities. Ideally I would hope this could lead to (pie in the sky idea here) getting the Mednafen team interested in supporting a similar setup going between your GDB client of choice and Mednafen– I believe Mednafen borrows some code from VBA anyway (not sure what parts, so it may be irrelevant).
HorvatM wrote:
My suggestion for audio is to use WAV and MIDI, because for musicians they’re the easiest to work with, even if they are hard to convert.But there’s another option: I’ve written a simple DOS-based tracker that supports (a maximum of) four channels and plays them to the PC speaker. The file format is very simple and the four channels conveniently map to the VB’s four wave channels, leaving the sweep channel for Atari 2600-like sound effects and the noise channel for percussion or whatever.
Well… it’s not necessarily the file format, but more the limitations of the hardware to reproduce the sounds available on WAV and MIDI. It’s hard to tell someone to make you a WAV or MIDI for a video game, then convert it and have it sound completely different. I really think a WYHIWYG composer would be nice, so they know exactly how it’d sound on the VB. Of course that also makes the job easier for putting it on the VB.
Your DOS-based tracker sounds interesting… do you have a link?
blitter wrote:
Back in college, I did some Game Boy Advance dev using the HAM engine and SDK. The IDE we used integrated with GDB over a TCP/IP link to a local Debugging version of the VisualBoyAdvance emulator. USB link to hardware would be cool but I was thinking more along the lines of the setup I just described. Work done to get a v810 version of GDB working would also be beneficial to both the VB and the PC-FX homebrew communities. Ideally I would hope this could lead to (pie in the sky idea here) getting the Mednafen team interested in supporting a similar setup going between your GDB client of choice and Mednafen– I believe Mednafen borrows some code from VBA anyway (not sure what parts, so it may be irrelevant).
Yeah, GDB would be nice in an emulator as well… I know Reality Boy has quite a few debugging features, but nothing that links back to the source code, like GDB would. I’m sure there’d be some inaccuracies, but maybe it’d help improve emulation, as well as help debug code.
One major downside to debugging on hardware is that the V810 only has one hardware breakpoint available, and since the cart is typically ROM (flash included, though technically rewritable), it’s hard to do software breakpoints. It would be possible to rewrite the flash at run-time with a special breakpoint routine, though more difficult than if running from RAM like a lot of systems that do software breakpoints. Of course special code could be written to look for breakpoints when entering a function or something, but that’s kinda hackish.
DogP
BTW, I see there’s a precompiled GCC 2.95 for download here: http://www.planetvb.com/modules/tech/index.php?sec=utils&pid=gccvb … is this what most people are using?
How about the others that are using GCC 4.x? I see some references here: http://www.planetvb.com/modules/newbb/viewtopic.php?topic_id=4125&forum=2 and http://www.planetvb.com/modules/newbb/viewtopic.php?topic_id=3883&forum=2 .
Is there any disadvantage to using GCC 4.x, with all the patches? Is it possible to make a precompiled version of GCC 4.x that can just be downloaded, rather than needing to be built? I’d like to get working on the library, but I really need to set up the environment for whatever GCC version we should call the “standard”… and IMO if there’s nothing wrong with GCC 4.x, I think we might as well jump to that.
Thanks,
DogP
DogP wrote:
Your DOS-based tracker sounds interesting… do you have a link?
DogP wrote:
BTW, I see there’s a precompiled GCC 2.95 for download here: http://www.planetvb.com/modules/tech/index.php?sec=utils&pid=gccvb … is this what most people are using?How about the others that are using GCC 4.x? I see some references here: http://www.planetvb.com/modules/newbb/viewtopic.php?topic_id=4125&forum=2 and http://www.planetvb.com/modules/newbb/viewtopic.php?topic_id=3883&forum=2 .
Is there any disadvantage to using GCC 4.x, with all the patches? Is it possible to make a precompiled version of GCC 4.x that can just be downloaded, rather than needing to be built? I’d like to get working on the library, but I really need to set up the environment for whatever GCC version we should call the “standard”… and IMO if there’s nothing wrong with GCC 4.x, I think we might as well jump to that.
Thanks,
DogP
I started with that precompiled 2.95.2 version for Windows many moons ago but have since rolled my own versions of both 2.95.2 and 4.4.2. I prefer 4.x since 2.95.2 no longer builds in newer versions of GCC– I couldn’t get it to build in anything >= 3.0. Plus, I do iPhone dev professionally so my primary environment is Mac OS X π GCC 4.x obviously sports a lot of newer features (the .incbin directive, dead code elimination…) and I haven’t run into anything yet that makes me want to go back to 2.95.2. (There is apparently an issue with PC-relative calls, but I haven’t encountered it in optimized builds) I think it would make the most sense to work on fixing up the GCC 4.x patches going forward rather than focus our energies on an older version already several generations behind.
If you’re interested, here are the versions I’ve been using most recently– I’ve applied Mednafen’s/dasi’s latest patches as well as a couple of my own:
GCC 2.95.2 sources: http://blitter.net/etc/vb/gccvb-2.95.2_src-20101124.tar.gz
GCC 2.95.2 Mac OS X/PPC binaries: http://blitter.net/etc/vb/gccvb-2.95.2_macosx-20101124.tar.gz
GCC 4.4.2 sources: http://blitter.net/etc/vb/gccvb-4.4.2_src-20101123.tar.gz
GCC 4.4.2 Mac OS X/PPC binaries: http://blitter.net/etc/vb/gccvb-4.4.2_macosx-20101123.tar.gz
I haven’t built these for Windows yet but I did adapt the make_v810.sh script so in theory it should build fine in an environment like Cygwin or MSYS/MinGW. YMMV as always… π
Thanks… I’ll see if I can build 4.4.2 for Windows w/ the patches. I agree about moving forward… as long as there’s no good reason to stay with the old compiler, we might as well enter the new millenium ;).
DogP
I’m trying to build blitter’s 4.4.2 patched version, but it keeps segfaulting while building binutils… any ideas? Here’s the crash output:
./libtool: line 1128: 8016 Segmentation fault (core dumped) gcc -DHAVE_CON FIG_H -I. -I../../binutils-2.20/bfd -I. -I../../binutils-2.20/bfd -I../../binuti ls-2.20/bfd/../include -DBINDIR=\"/opt/gccvb/bin\" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -Wno-error -MT archive.lo -MD -MP -MF .deps/archive .Tpo -c ../../binutils-2.20/bfd/archive.c -o archive.o
I tried it with my old cygwin, and just made a new cygwin with latest gcc and other packages… both did the same thing. I’m following David Tucker’s original instructions as far as which packages are required and stuff… then I just do ./make_v810.sh .
Thanks,
DogP
What version of GCC? (I used 3.3) Are you building for a 64-bit or 32-bit host? (I built for 32)
I first tried with 3.4.4, and second with 4.3.4… both on a 32-bit system. I’ll see if I can build your 2.95 version w/ my environment (I never had a problem w/ DT’s build).
DogP