|
Member
(07-28-2012, 12:11 AM)
|
#304
I know it probably permanently damaged my eyesight, but there's something oddly satisfying about programming on the DS itself. I just spent like an hour in bed writing part of a game, using the built-in help to look up commands.
Little side note for anyone who didn't figure it out, if you want to get an input without printing a ? or a newline you should be able to do something like this: Code:
PRINT "Enter command: "; LINPUT SOMEVAR$ |
|
Member
(07-28-2012, 03:54 AM)
|
#305
Ok, here it is!
Quote:
As it says on the pic, the program draws new tiles just off screen when it needs to scroll in that direction. If you're moving to the right, it draws the next column to the right. If you're moving downward, it draws the next row downward. When drawing columns it actually draws one extra tile on the top and bottom so it takes care of the corner tile when moving diagonally. Took a lot of messing around but it's satisfying. I could add some more user-defined variables and make it very adaptable for any type of map array, usable in platformers etc. |
|
Member
(07-28-2012, 04:01 AM)
|
#306
It sounds like you're on the cutting edge of performance -- do you think it would be viable in platformers or RPGs, or only if they ran at 30 fps?
Also requiring 12 images for just the map engine kind of scares me to think what an actual game would be like. :P |
|
Junior Member
(07-28-2012, 07:00 AM)
|
#307
Here's an optimization tip that works especially well for wrapping values. I noticed a lot of code going like:
Code:
BGY=OLDY+Y IF BGY>31 THEN BGY=BGY-32 IF BGY<0 THEN BGY=BGY+32 Code:
BGY=OLDY+Y AND 31 |
|
(more a nerd than a geek)
(07-28-2012, 02:53 PM)
|
#308
So, I was curious about exactly how much storage space Petit Computer offered for user programs, so I did a few tests.
I generated the largest program I could fit into memory (a little over 5000 lines of 100 characters each) and, after saving, Petit Computer lists it as taking up 535012 bytes of storage space - or about 522KB each. I manage to store save 19 copies of that before getting an "Insufficient Memory" error. I was still able to store an additional 204824 byte file, but that was the hard limit. The total amount of stored user data was 10370052 bytes, or about 10127 KB, or about 9.8 MB. PetitComputer consumes 117 blocks of internal memory, and I believe that 1 MB is equal to 4 blocks of space. That means the total storage space for PetitComputer is just about 30MB, with roughly 1/3 of that space being dedicated to user file storage. |
|
Member
(07-28-2012, 03:03 PM)
|
#309
As for size...according to Petit Computer, the above program has a size of 28340, which means each QR code accounts for about 2361. Without the included graphic and color bank (1 of each), it's 19664, which would be about 8 QR codes. That's 365 lines of code, much of which is taken up by the map data. Without the map and music data, it's only 4216, 192 lines of code. The size decreased so much because the data lines are so long. So just the engine and some extra code to work with it is only about 2 QR codes. Map data in practice could be a lot smaller. A lot of NES games used a technique we call metatiles, where 1 "tile" is actually a set of 4 16x16 "tiles," which itself is a set of 4 8x8 tiles. For example, you start with tree top left/top right/lower left/lower right, but together that equals one 16x16 tree tile. DATA 7 'ID #7 = tree DATA 0,1,2,3 'define the 8x8 parts that make it up Then you go one step further, and make up tiles out of that tile and other tiles: Data 70 'ID #70 = forest tile Data 7,7,7,7 'define the 16x16 parts that make it up DATA 71 'ID #71 = forest with path on the right DATA 7,8,7,8 DATA 72 'ID #72 = forest with path on the left DATA 8,7,8,7 etc. etc. You get to the point where you could store a whole screen in 16 metatiles, and then compress that with better compression than RLE, and you can fit quite a bit more data. But of course you have to write routines that can interpret this stuff too. Probably would want to compress text as well for RPGs, which gets complex.
Last edited by UncleSporky; 07-28-2012 at 03:08 PM.
|
|
Member
(07-28-2012, 03:19 PM)
|
#311
DQ1 would be pretty big, but there are ways to get around the 9999 line limit. Someone at another forum found it but I don't know if I can link it because it deals with hacking and possibly piracy. Basically you can use EXEC to run another program and the current variables stay intact, so you can add a hook at the start of each program to pick up where you left off based on flag variables. You could run your text storage and decompression program to fetch the next NPC's dialog, etc. |
|
(more a nerd than a geek)
(07-28-2012, 03:25 PM)
|
#312
I'm a tad annoyed that APPEND can't be used within a program. I had some fun ideas for that... (Piracy? I thought DSiWare was still pretty much hack-proof...) |
|
Member
(07-28-2012, 03:48 PM)
|
#313
I guess I can just post his code, credit goes to DiscostewSM. Program named Test1:
Quote:
Quote:
|
|
Member
(07-28-2012, 08:03 PM)
|
#315
I made a text adventure engine (choose-your-own-adventure style, no typing). Hopefully it will be helpful to new programmers who want to make something fun to share with others. There a sample "adventure" included to help show off how it works. It's extensively commented to explain as much as I could about how to use it.
Quote:
|
|
Member
(07-28-2012, 10:27 PM)
|
#317
|
|
(more a nerd than a geek)
(07-29-2012, 02:06 AM)
|
#318
THIS looks neat: http://wiki.hosiken.jp/petc/?Toukou%2FIN%20THE%20ROOM
In The Room -- a locked room/puzzle adventure. Sadly, it's entirely in Japanese. |
|
Member
(07-29-2012, 02:10 AM)
|
#319
This also looks neat, Petit Slash, but it's also entirely in Japanese. Action RPG-ish thing like Hydlide and Ys. A guy at Something Awful posted it and is considering translating it.
Here's the upload site they got it from, lots of stuff there but not many ways to know what you're getting unless you know Japanese. |
|
(more a nerd than a geek)
(07-29-2012, 02:27 AM)
|
#320
I've been adding entries to the petitcomputer.wikia.com wiki for all the Japanese programs I've been trying out -- generally just a title, 1-2 sentence description, and a link to either the puchikon wiki page OR the download page from of of those archives. |
|
Member
(07-30-2012, 05:15 AM)
|
#324
I finished my first game! It's pretty simple but it was a fun first project and I learned a lot doing it. It plays kind of like Snake and the object is to pilot around a ship to collect falling people while avoiding stars. I might tweak it later but I think I'm done for now.
![]()
|
|
Member
(08-04-2012, 07:54 AM)
|
#325
Nintendolife posted an interview with the Smilebit guy--here's the question you all wanted an answer to:
Quote:
|
|
(more a nerd than a geek)
(08-04-2012, 12:49 PM)
|
#326
It appears someone was asking about the Hunt the Wumpus port I did, so I finally got around to QR-encoding it and putting it up on the wiki.
Before anyone gets excited, it's a really basic conversion. It's still all text and requires answers to be entered on the touch screen. If you examine the source, you'll notice a variety of labels with numeric names -- I've been experimenting with "automated conversions" of old BASIC programs, and this is one of the first few results. I still need to get it fully automated (for SIMPLE BASIC programs only), but it will save time with regards to deleting/renumbering. Hunt the Wumpus QR Code: http://petitcomputer.wikia.com/wiki/Hunt_the_Wumpus ![]() (Not sure if hotlinking from the wiki works -- we'll see) |
|
Member
(08-04-2012, 06:36 PM)
|
#327
|
|
Member
(08-05-2012, 04:35 AM)
|
#328
Looks like Smileboom is holding another gamedev competition? (Japanese)
http://smileboom.com/special/ptcm2/co_contest/ Can someone read this and report on whether it's limited to Japanese residents only? |
|
Member
(08-05-2012, 05:03 AM)
|
#329
According to that interview you linked to above, the CEO of SmileBoom really wants to see the competition go worldwide, so it sounds possible that it's more open. Maybe they'll post something about it on the official website for our region, though the timing seems kinda tight.
Quote:
Last edited by Wiggler; 08-05-2012 at 05:09 AM.
|
|
Member
(08-07-2012, 12:23 PM)
|
#330
Someone asked Kobayashi-san if the contest was open to NA participants on Twitter--I don't think he said "no", but I'm just going off Google Translate. Anyone wanna clarify?
https://twitter.com/notohoho/status/232783469120471041 |
|
Member
(08-07-2012, 02:49 PM)
|
#331
|
|
Member
(08-07-2012, 11:53 PM)
|
#333
^^Someone's actually watching my twitter updates! Who knew?!
|
|
Junior Member
(08-22-2012, 03:36 PM)
|
#335
The entire manual is now online: http://www.petitcomputer.com/manual/manual.pdf
|
|
Member
(08-23-2012, 06:44 AM)
|
#337
I've been working on and off on a fantasy text adventure. It's been a good learning experience so far.
edit: I've got a little blog I'm keeping on the wiki site about my experiences with Petit Computer: http://petitcomputer.wikia.com/wiki/...log:Wiggler222
Last edited by Wiggler; 08-28-2012 at 12:50 AM.
|
|
Junior Member
(11-17-2012, 06:48 PM)
|
#340
Here is the QR code for the demo. http://lazerlight.x10.mx/uploads/mm2ptc-demo-1/
Video: http://www.youtube.com/watch?v=LiX1dlvwwPg http://www.youtube.com/watch?v=-gUkSiGdrCM Website: http://www.lazerlight.x10.mx/ He also has a sound test on there that you can download. He has also been updating on this thread. http://www.gamefaqs.com/boards/66384...puter/64115506 |
|
Member
(11-17-2012, 06:50 PM)
|
#341
Nice, a programming language for 3DS/DSi... I hope it's a not a too old basic (I spend years with Basic 1.0, with no real function support (only GOSUB), I wouldn't like doing this again.
I'd rather program on computer rather than directly on DS, though.
|
|
Member
(11-17-2012, 07:04 PM)
|
#342
I just got a nostalgia rush - I stated programming with an old sharp pocket computer:
![]() It helped me learn how to improve in programming, basically how and why to use functions and how to save space (there was only 32kb). Created text adventures/RPGs with it and while it took like 30 minutes to get through the first game, my fifth game already had multiple dungeons and towns and I think it took my brother around 2-3 hours to get through it. I think I still have a map of it. It's good to see that software released on the 3DS. |
|
Member
(11-17-2012, 08:20 PM)
|
#343
Are there any ways to edit a program on a PC and convert into a QR code for downloading? I would guess so... |
|
Member
(11-17-2012, 08:29 PM)
|
#344
Hey, it's this topic again. I should probably work on my game again one of these days.
It has a few glitches, but otherwise works like a charm. |
|
Junior Member
(12-11-2012, 09:01 PM)
|
#346
Ever thought that WAV playback was impossible in Petit Computer? Think again! I uploaded a proof-of-concept here: http://www.omnimaga.org/index.php?to...4787#msg274787
|
|
Member
(01-22-2013, 02:10 AM)
|
#347
The Petit Computer guidebook has been officially translated and released on Android (iOS version is in the works):
https://play.google.com/store/apps/d...ibo.MB03190001 |
|
(more a nerd than a geek)
(01-22-2013, 06:06 AM)
|
#348
Hey folks... while I haven't logged in all that frequently, it appears that folks are still making use of the PetitComputer wikia...
http://petitcomputer.wikia.com Anyone interested in helping maintain it? I really don't have the time... |