Original Post

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

29 Replies

Might want to try removing the “CFLAGS=-Wno-error” from the binutils phase in the GCC 4.4.2 build script,… I think I left that in there from the Mac build– it’s necessary there for some reason.

blitter wrote:
Might want to try removing the “CFLAGS=-Wno-error” from the binutils phase in the GCC 4.4.2 build script,… I think I left that in there from the Mac build– it’s necessary there for some reason.

Thanks… that seemed to fix that problem. I think I got it built, though I haven’t compiled anything with it yet. There were a couple other things I had to do as well. One difference is that it now needs libiconv installed. The other was a strange error in LDFLAGS during build, where it’d complain that LDFLAGS changed while being built, though they were actually the same, just somehow there was an extra space in the string. I ended up manually removing the space in config.cache (in gmp IIRC). There’s probably a better way to do it, but I didn’t feel like digging too much.

Thanks,
DogP

DogP wrote:

blitter wrote:
Might want to try removing the “CFLAGS=-Wno-error” from the binutils phase in the GCC 4.4.2 build script,… I think I left that in there from the Mac build– it’s necessary there for some reason.

Thanks… that seemed to fix that problem. I think I got it built, though I haven’t compiled anything with it yet. There were a couple other things I had to do as well. One difference is that it now needs libiconv installed. The other was a strange error in LDFLAGS during build, where it’d complain that LDFLAGS changed while being built, though they were actually the same, just somehow there was an extra space in the string. I ended up manually removing the space in config.cache (in gmp IIRC). There’s probably a better way to do it, but I didn’t feel like digging too much.

Thanks,
DogP

I just built 4.4.2 last night under the version of MSYS/MinGW distributed by the RubyInstaller folks as the “Development Kit” (I needed it for a Ruby thing, and it’s a bit easier to set up than the stock MSYS).

I didn’t have to remove -Wno-error or install libiconv (unless it comes with the devkit; but I’m pretty sure I saw one of the “configure” scripts not finding it, so I dunno). The only problem I had was the LDFLAGS one, and I fixed it by editing the Makefile.in to include $(strip …) around some of the “LDFLAGS=…” lines. I think I know how to fix the problem “correctly”, so I might submit a “patch for the patch” so to speak, someday. The main thing, IMO, is to get a new, state-of-the-art, VB devkit in the hands of the developers, so we can all start that community project on the same page.

BTW, as a test, I successfully built one of my VB projects by only modifying the makefile to point to the new location of the binaries (v810-*). I haven’t compared the machine code output with that produced by the cygwin-hosted 2.95 version I had been using (which was built by dasi, IIRC), but the ROM ran identically in mednafen.

Cool… that’s great to hear. Is this able to be “packaged up” and distributed, or does it need to be built? I haven’t gotten a chance to mess with it in quite a while, but I don’t think my build worked… or I didn’t have my build scripts and stuff set up properly.

It’d be really nice to be able to just download a package, plunk it somewhere, add the correct environment variables, then go (maybe even have an installer do it for you). An example or two would be nice as well, to make sure the build works, and for a base to start from.

DogP

DogP wrote:
Cool… that’s great to hear. Is this able to be “packaged up” and distributed, or does it need to be built? I haven’t gotten a chance to mess with it in quite a while, but I don’t think my build worked… or I didn’t have my build scripts and stuff set up properly.

Yeah, there are a number of folders (“bin,” “lib,” etc.) that can all be put in a containing folder, just like the original windows version with the batch files. Although, I think it would be a good idea to include “make” (or another build system), since batch files just don’t cut it. An alternative would be to include a custom IDE, or a “plugin” for, e.g. Visual Studio.

I was chatting with dasi and blitter in IRC, and there seem to be some problems with the included linker script and crt0, so it still needs a bit of work for full functionality, but the main hurdle is behind us.

It’d be really nice to be able to just download a package, plunk it somewhere, add the correct environment variables, then go (maybe even have an installer do it for you). An example or two would be nice as well, to make sure the build works, and for a base to start from.

DogP

I’ve long wanted to learn how to make NSIS installers; this might be my chance πŸ˜€ Now accepting submissions/votes for examples to include πŸ˜‰

DogP wrote:
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.

I’ve got a question on this one. I’m trying to make a simple tetris game to get started. I made a source file and a corresponding C file for managing the board state. You know has player gone over the top, space occupied that stuff. Tetris.C has my main function in there with some test screen code in it, nothing fancy. Just to get started.

Here’s my makefile:

#The name of the file which contains main, without the file suffix
TARGET=Tetris

.PHONY: all clean

all: $(TARGET).vb

clean:
	rm $(TARGET).vb Board.o $(TARGET).o

$(TARGET).vb: $(TARGET).o

$(TARGET).o:
	v810-gcc -Wall -nodefaultlibs -mv810 -xc -o Board.o Board.C
	v810-gcc -Wall -nodefaultlibs -mv810 -xc -o $(TARGET).o $(TARGET).C
	v810-objcopy -S -O binary $(TARGET).o $(TARGET).vb

Here’s what I get out of the compiler.

v810-gcc -Wall -mv810 -xc -o Board.o Board.C
/usr/local/v810/lib/crt0.o: In function `loop_intclear':
/usr/local/v810/lib/crt0.o(.text+0x190): undefined reference to `main'
/usr/local/v810/lib/crt0.o(.text+0x194): undefined reference to `main'
collect2: ld returned 1 exit status
make: *** [Tetris.o] Error 1

Are these errors in concert with the current state of the GCC NVC 2.95 Precompiled or is it just me. Btw I put the updated crt0.o in the specified directory.

fobbio wrote:
Here’s what I get out of the compiler.

v810-gcc -Wall -mv810 -xc -o Board.o Board.C
/usr/local/v810/lib/crt0.o: In function `loop_intclear':
/usr/local/v810/lib/crt0.o(.text+0x190): undefined reference to `main'
/usr/local/v810/lib/crt0.o(.text+0x194): undefined reference to `main'
collect2: ld returned 1 exit status
make: *** [Tetris.o] Error 1

Are these errors in concert with the current state of the GCC NVC 2.95 Precompiled or is it just me. Btw I put the updated crt0.o in the specified directory.

Hard to say who’s at fault without seeing “Tetris.c”. Maybe you should just zip up your whole project and attach it.

BTW, when working with “unixish” software like gcc, it’s best to stick with file names/paths with no spaces and consisting only of lowercase letters and underscores. Just something to keep in mind…

Also, this line:

v810-objcopy -S -O binary $(TARGET).o $(TARGET).vb

Belongs under the “$(TARGET).vb: $(TARGET).o” rule (But I don’t think that’s causing your current problem).

Sorry for the delay, I moved up to my X61 tablet. The screen on this one is a bit brighter.

I moved over to lower case.

fobbio, I’ve replaced the makefile and changed a couple of other things. It should now compile successfully.

  • This reply was modified 12 years, 9 months ago by dasi.
  • This reply was modified 12 years, 9 months ago by dasi.
  • This reply was modified 12 years, 9 months ago by dasi.
Attachments:

 

Write a reply

You must be logged in to reply to this topic.