|
Member
(07-13-2012, 11:53 PM)
|
#103
|
|
Member
(07-14-2012, 02:24 PM)
|
#104
Yeah, that's how you save things from within the program. I learned that from one of the FAQ pages at this Japanese wiki, which also has a lot of demo programs and such.
This is how they present it: HISCORE=100 MEM$=STR$(HISCORE) SAVE "MEM:HISC" LOAD "MEM:HISC", FALSE HISCORE=VAL(MEM$) PRINT HISCORE Also, the speech synthesizer is not in our version. There was some licensing issue with the technology, but it probably wouldn't be much use with english anyway. (Read this in a Japanese tweet) I'm thinking of working on a set of routines to display maps larger than 512x512 pixels (the size of the BG). From watching videos on youtube, it seems that nobody knows how to do this or bothers to do this. All you do is read from map data and draw a new column/row of tiles whenever the screen scrolls. It even loops at the edges so you can just keep scrolling in any direction, drawing new tiles wherever you scroll. I decided to use the Dragon Warrior 1 world map, and I'd rather not rewrite the whole map myself, so I googled some docs about how DW1 stores its data. Pretty simple actually, it's a format like "4 water tiles, followed by 6 grass tiles, followed by 2 mountain tiles" etc. So now I have that in hex and I have to convert it to something Petit Computer will be able to read (DATA &H41, &H3A, &HE8 etc.).
Last edited by UncleSporky; 07-15-2012 at 02:34 AM.
|
|
Member
(07-14-2012, 02:45 PM)
|
#107
In fact, Smileboom has been posting some free extra graphics on their site for people to use. It looks like they want people to make their own Advance Wars! http://smileboom.com/special/ptcm2/c..._present03.php ![]() ![]() http://smileboom.com/special/ptcm2/c..._present04.php ![]() ![]() ![]() ![]() QR codes at the site, including palettes.
Last edited by UncleSporky; 07-14-2012 at 02:51 PM.
|
|
(more a nerd than a geek)
(07-14-2012, 03:12 PM)
|
#109
I was curious about porting some text adventure interpreters, but you need data file support... |
|
Member
(07-14-2012, 03:32 PM)
|
#111
If you can make sense of this page, it shows how its file system works somewhat. MEM files are there alongside every other type of file. PRG can reach 9999 lines of code, so I bet MEM can grow pretty large as well. It's frustrating if the only way you can interact with them is through commands, but we'll see. Looks like the main menu lets you perform some operations on them too such as renaming. If you need to "seed" a file with data, it might be best to put it in DATA statements and write a quick program to read those and send them back out to a MEM file. But apparently loading from a file takes some time, so if you have room to use DATA statements for data that doesn't need to change, that's the best solution. |
|
(more a nerd than a geek)
(07-14-2012, 03:43 PM)
|
#112
I was hoping for easy "open PTC file, edit, load back on SD", but... |
|
Member
(07-14-2012, 03:56 PM)
|
#114
|
|
Member
(07-14-2012, 04:15 PM)
|
#117
4 banks of background tiles (2 are shown above) and 8 banks of sprites (4 are shown above). You can reference them at any time by number, it works out to 512 8x8 sprites and you just say "load sprite 512" and there it is. You can also swap out banks at any time, as many as can be stored on your SD card. You just load the filename and suddenly have a new tile set.
Last edited by UncleSporky; 07-14-2012 at 04:18 PM.
|
|
Member
(07-14-2012, 09:19 PM)
|
#122
couple questions,
1. is it possible to make an RPG with this? and if so, has anyone made an RPG with petitcom yet? 2. i've never used BASIC before but i am very interested in this. is there any free tutorial program on the web that introduces the basics of BASIC? |
|
Member
(07-14-2012, 09:22 PM)
|
#123
I believe you can re-create most games from the 80's with it.
|
|
(more a nerd than a geek)
(07-14-2012, 09:27 PM)
|
#124
Quote:
|
|
Member
(07-14-2012, 09:30 PM)
|
#125
At least one person has worked on an RPG for it, it's possible. Though if it's been your lifelong dream to make an RPG and you think this is the perfect opportunity to make one, it probably isn't. Making an RPG on this platform is going to be a lot more restrictive than on PC and will be played/seen by far fewer people. It might be easier to learn how to work with RPG Maker. It supports programming but is a lot more drag-and-drop and will ease you into some programming concepts better.
As for good free BASIC tutorials online...there are probably hundreds of them. I wouldn't know what to recommend to you other than to Google it. Any given version of BASIC is not going to be exactly the same as in this program, but learning any programming language will help you learn and use others too. |
|
Member
(07-14-2012, 09:36 PM)
|
#127
Petit Computer has built-in commands for accessing the DS 2D graphics hardware (tile background layers and sprites), so you don't need to bother with programming the drawing of individual pixels. You can easily load and move/rotate/scale a sprite around the screen.
|
|
(more a nerd than a geek)
(07-14-2012, 09:37 PM)
|
#128
Oh, I know -- I'm just saying I am unlikely to do that. I'm more likely to tinker with text mode, perhaps tossing some graphical imagery up as a tiny enhancement.
|
|
Member
(07-14-2012, 11:50 PM)
|
#131
Sprites could be used for animated elements on the screen, or heck, even further parts of the background. The biggest sprites can be 64x64, so you could make one full screen out of BG tiles and the screen next to it could be 12 massive sprites using the same palette as the BG. :) Really I don't know if there is a limit on graphics, just the size of your SD card, so you could possibly make a nice little adventure game for it. I'd be more worried about the best way to store the text, since programs can only be 9999 lines...though you can load other program files from within your program, but I don't know what that does. |
|
(more a nerd than a geek)
(07-15-2012, 05:10 PM)
|
#132
If this is true, it would place a fairly hard limit on loading "images". (I had the impression that "loading other programs" just means you can essentially RUN another BASIC program on the fly. This would get around program size limitations, although not storage ones.) |
|
Member
(07-15-2012, 10:55 PM)
|
#133
It's possible. I guess we'll find out in a few days.
DSi's internal memory is 256 megs which is still quite a bit for these types of simple programs. Or if you mean we only have access to DSi's RAM, that's only 16 megs...but I think we've got access to more than RAM. Some videos of Petit Computer games show brief loading screens, and the manual also warns of load times when you use save/load commands. If it was all in RAM, I'd expect loading to be faster. One bank of sprites from Smileboom's site is 5 QR codes. The maximum amount of data a QR code can hold is 3 kB, meaning each bank is 15 kB at most. This means you could fit 68 banks of custom graphics in 1 meg, enough for a lot of cool stuff even if we were only limited to DSi's RAM. An earlier version of the game in the above video is only 20 kB, according to its creator. Of course it uses default graphics. On another note, I found out something else too: MEM files are literally just one string of up to 255 characters in length. This just means we have to be a little smarter about saving data. You could store multiple numbers one after the other, separated by comma, for example. You can convert your numbers to hex in order to save a few characters (65535 = FFFF). If you don't need numbers over 255, you can convert them to characters and save up to 255 numbers from 0-255. This is probably what I'd do. Convert strength/constitution/dexterity/wisdom/intelligence/charisma to characters (which will look like $x#2|R or something), then reverse the process when loading. |
|
Member
(07-15-2012, 11:14 PM)
|
#135
I was just searching around youtube and seeing what people are making with this thing and wow, some amazing stuff out there.
This guy built a music synthesizer. There's like, almost 60 QR codes on his webpage. Here's a video demonstration, it looks awesome: http://www.youtube.com/watch?v=OUtNzLg1OeU |
|
Member
(07-15-2012, 11:23 PM)
|
#136
|
|
Member
(07-15-2012, 11:46 PM)
|
#138
|
|
Member
(07-16-2012, 01:04 AM)
|
#140
The limitations are the whole point of it, I think: roughly replicating the experience of writing BASIC programs in early home computers. It's not supposed to make SNES games, as example and part of the fun is figuring out how to get the most out of it despise the limitations, kinda like writing 64K demos, as example.
|
|
(more a nerd than a geek)
(07-16-2012, 01:16 AM)
|
#141
The graphic/drawing program on the official site carries a notation about drawing backgrounds for adventure games -- I'm curious about limitations for storage. (Yes, I have work-arounds in mind, if necessary...) |
|
Member
(07-16-2012, 11:20 AM)
|
#143
255 byte save files. :P A single string of that length with every character being 1 byte.
|
|
Member
(07-16-2012, 01:16 PM)
|
#144
|
|
Member
(07-16-2012, 02:20 PM)
|
#145
I think the only limit is storage space. You can name them anything you want up to 8 characters. |
|
Member
(07-16-2012, 02:25 PM)
|
#146
|
|
Junior Member
(07-16-2012, 08:05 PM)
|
#147
Round nearest can be done with FLOOR(X + 0.5) Not too hard at all. I doubt they would do that, because it would split their userbase completely (different screen resolutions, and who knows if the 2D graphics engine even works the same way as the DSi's) |
|
Member
(07-17-2012, 02:05 AM)
|
#148
I don't think Nintendo would want to allow a 3DS version. They already know people can do DS homebrew anyway, so they'd probably rather have people doing it this way where it's somewhat limited and they at least get a cut of the money, but there is no 3DS homebrew, and I'm sure they'd rather keep it that way.
|
|
Member
(07-17-2012, 02:20 AM)
|
#149
I guess over in Japan they have a book dedicated to programming in BASIC for Petit Computer. I wonder if we'll see an English equivalent anytime soon. That's certainly what it appears to be. I noticed this with other Petit programs that I've found as well. |