CEMETECH
Leading The Way To The Future
Login [Register]
Username:
Password:
Autologin:

Don't have an account? Register now to chat, post, use our tools, and much more.
Latest Headlines
Online Users
There are 102 users online: 1 member, 73 guests and 28 bots.
Members: None.
Bots: VoilaBot (2), Spinn3r (1), MSN/Bing (1), Magpie Crawler (3), Googlebot (20), MSN/Bing (1).
RSS & Social Media
SAX
You must log in to view the SAX chat widget
    » Goto page 1, 2, 3  Next
» View previous topic :: View next topic  
Author Message
m1ac4


Advanced Newbie


Joined: 16 Sep 2010
Posts: 43

Posted: 24 May 2012 12:36:15 pm    Post subject: [Prizm] Switched RPG

Presenting Switched RPG! Switched is a RPG based on the RPG that I wrote in Prizm-Basic. It currently features nothing more than 8-bit tilemaps, some masked sprite support, and a menu/dialog system but it promises to become something incredible (I hope). This version will be much better than the Prizm-Basic version because:
1) It is written in C, not Prizm-Basic.
2) Graphics are incredibly better (and more understandable).
3) I actually have enough memory to make a real storyline.

Screenshot time!


All of those exclamation marks are due the Manager software not liking some of my code, I guess.

You can download the demo here.
_________________
Switched RPG (SwtchRPG ported to C) has a demo now!


Last edited by m1ac4 on 27 Jun 2012 01:43:17 pm; edited 2 times in total
Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55764
Location: Earth, Sol, Milky Way

Posted: 24 May 2012 01:53:17 pm    Post subject:

Sounds like a great idea! I hope you'll show us some screenshots as soon as you have them, and of course let us know any and all C questions you may need assistance with.
_________________


Back to top
m1ac4


Advanced Newbie


Joined: 16 Sep 2010
Posts: 43

Posted: 24 May 2012 02:30:19 pm    Post subject:

First question:
Lets say that I had a tileset that looked something like this:

I want to use the CopySpriteNBit routine to draw tiles (for the compression). However, I don't think that routine will allow me to draw any individual tile as it is now. How would I go about modifying that routine so I could draw any one tile to the screen?
_________________
Switched RPG (SwtchRPG ported to C) has a demo now!
Back to top
Ashbad


... I think redheaded girls are kind of cool


Joined: 01 Dec 2010
Posts: 2418
Location: Stomp Stomp Stomp, The Idiot Convention

Posted: 24 May 2012 05:14:20 pm    Post subject:

m1ac4 wrote:
First question:
Lets say that I had a tileset that looked something like this:

I want to use the CopySpriteNBit routine to draw tiles (for the compression). However, I don't think that routine will allow me to draw any individual tile as it is now. How would I go about modifying that routine so I could draw any one tile to the screen?


Something simple like this should do the trick:


Code:
void CopySpriteFromSheet(color_t*sheet, int x, int y, int width, int height, int offset_x, int offset_y, int sheet_w) {
   color_t* VRAM = (color_t*)0xA8000000;
   for(int j=y; i<y+height; j++) {
      for(int i=x; i < x+width; i++) {
         *(j*LCD_WIDTH_PX+i+VRAM) = *((j-y+offset_y)*sheet_w+(i-x+offset_x)+sheet);
      }
   }
}


sheet would be a pointer to the tilesheet data, x/y are the drawing coordinates for where to draw the sprite to VRAM, width/height are the width/height of the tile, offset_x/offset_y are where the tile is located on the sprite sheet, and sheet_w is the width in pixels of the actual spritesheet itself.

EDIT: and I can't help myself but comment that your tiles aesthetically don't quite fit together well; some are blurry, and some like the ones with the bricks are more pixelly. I suggest you stick with one way or the other (preferrably the pixelly one, especially because the blurry ones will looks a bit more odd once the color palette drops from 8-8-8 to 5-6-5 for the Prizm)
_________________
-Ashbad
Back to top
m1ac4


Advanced Newbie


Joined: 16 Sep 2010
Posts: 43

Posted: 24 May 2012 09:56:46 pm    Post subject:

Thanks for the routine. However, I need to use an 8-bit tilesheet due to future size constraints. What I am looking for is a routine similar to yours that uses a 8-bit tilesheet. The problem is that I do not have the skills necessary to write such a routine.

Also, thanks for your observations on the inconsistencies of my tilesheet. I never noticed that before.
_________________
Switched RPG (SwtchRPG ported to C) has a demo now!
Back to top
m1ac4


Advanced Newbie


Joined: 16 Sep 2010
Posts: 43

Posted: 29 May 2012 04:47:16 pm    Post subject:

I got 256-color tilemaps working after a few hours of debugging and system crashes. I now turn to making a simple demo that will let people see what all of my tilesets look like on the screen itself.
I understand pointers a lot better now. Smile
_________________
Switched RPG (SwtchRPG ported to C) has a demo now!
Back to top
m1ac4


Advanced Newbie


Joined: 16 Sep 2010
Posts: 43

Posted: 31 May 2012 02:35:13 pm    Post subject:

I present to you the Tilemap Demo!
To use: just download, send to your calc, and run. The demo is in the "Graphics Testing" menu. Sorry about the main menu icons.

The demo is very simple. All you do is cycle through the maps with the arrow keys. There are 10 maps in total, two from each "region".
This is an excellent opportunity for all of you to provide feedback on my graphical designs. Ashbad already gave me some good feedback and the more I get, the better. I can already spot some areas that need improvement but I am only one person.

You can download the demo here. I am going to take a break from coding for a few hours. Then, I shall start implementing characters.
_________________
Switched RPG (SwtchRPG ported to C) has a demo now!
Back to top
Spenceboy98


Super-Expert


Joined: 06 Jan 2012
Posts: 825
Location: In the TARDIS

Posted: 31 May 2012 02:44:26 pm    Post subject:

I like it. What dimension are each tile?
Back to top
m1ac4


Advanced Newbie


Joined: 16 Sep 2010
Posts: 43

Posted: 31 May 2012 02:45:57 pm    Post subject:

24x24. Each map is then 16 tiles wide and 9 tiles high.
_________________
Switched RPG (SwtchRPG ported to C) has a demo now!
Back to top
m1ac4


Advanced Newbie


Joined: 16 Sep 2010
Posts: 43

Posted: 02 Jun 2012 10:32:05 pm    Post subject:

I got masked sprite drawing working for whole tilemaps now. This means that I can draw NPCs and other interesting things that require being masked now. Interestingly enough, I can draw any combination of maps and masked tiles together (this means that I could put desert villagers in a lava fortress for example).

I am going to make some "screenshots" of my maps to put in the first post now.
_________________
Switched RPG (SwtchRPG ported to C) has a demo now!
Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55764
Location: Earth, Sol, Milky Way

Posted: 02 Jun 2012 11:49:18 pm    Post subject:

m1ac4 wrote:
I got masked sprite drawing working for whole tilemaps now. This means that I can draw NPCs and other interesting things that require being masked now. Interestingly enough, I can draw any combination of maps and masked tiles together (this means that I could put desert villagers in a lava fortress for example).

I am going to make some "screenshots" of my maps to put in the first post now.
You'd better! Very Happy I can't wait to see them. If your tilemapper code can be easily pulled out without a ton of dependencies, I would love it if you shared it in the Useful Prizm Routines and/or in the relevant section of WikiPrizm.

Edit: Derp, the screenshots are already there. They look great!
_________________


Back to top
DJ_O


Retired TI-83+ coder


Joined: 18 Mar 2005
Posts: 1487
Location: Quebec (Canada)

Posted: 03 Jun 2012 03:44:21 pm    Post subject:

This looks pretty nice. Glad this was revived Very Happy
_________________
Retired 83+ coder, Omnimaga/TIMGUL founder. Now doing power metal music (formerly did electronica)

Follow me on Bandcamp|Facebook|Reverbnation|Youtube|Twitter
Back to top
m1ac4


Advanced Newbie


Joined: 16 Sep 2010
Posts: 43

Posted: 05 Jun 2012 12:48:37 pm    Post subject:

More progress!
I have added the main character and some NPCs (with some placeholder sprites for now). The main character can move around the map in a smooth fashion and will not move through buildings, rocks, and such. The player can also interact with NPCs and read signs.

I am actually starting to get closer to making a real game here. All I need to do to have a fully functional game now is:
1) Make a indoors "region"
2) Make shops
3) Make the battle system
4) Implement game saving
5) A whole lot of sprite making, including NPCs, battle imagery, and animated sprites for when the player moves
6) Make a system to keep track of every single event in an organized fashion

Is there anyone out there that would be interested in helping me make sprites? I have a lot of them to make and I would appreciate any help I could get. I'll provide details if anyone is interested.
_________________
Switched RPG (SwtchRPG ported to C) has a demo now!
Back to top
KermMartian


Site Admin


Joined: 14 Mar 2005
Posts: 55764
Location: Earth, Sol, Milky Way

Posted: 06 Jun 2012 11:23:23 am    Post subject:

I'm sure there are quite a few of us who would be happy to help with sprites. You can either continue asking in this topic, or make a separate Graphics topic requesting spriters. I know that I for one would be happy to contribute a handful of sprites.
_________________


Back to top
m1ac4


Advanced Newbie


Joined: 16 Sep 2010
Posts: 43

Posted: 06 Jun 2012 01:20:30 pm    Post subject:

I'll make a list and anything relevant in a graphics topic. Where would the best place to put such a topic be?

In other news, the player can now move between maps now. I am probably going to start working on save files after I get the graphics topic started.
_________________
Switched RPG (SwtchRPG ported to C) has a demo now!
Back to top
seana11


Super-Expert


Joined: 23 May 2011
Posts: 833
Location: Well, the sign says "You are here"...

Posted: 06 Jun 2012 05:48:02 pm    Post subject:

m1ac4 wrote:
I'll make a list and anything relevant in a graphics topic. Where would the best place to put such a topic be?


http://cemetech.net/forum/viewforum.php?f=39
_________________

Code:
-----BEGIN GEEK CODE BLOCK-----
GCS d- s+: a---@ C+++ UL++ P L+++ E- W++ N o? K? w--- O? M--
V- PS++(--) PE- Y+ PGP t 5? X(+) R tv-- b++(+++) DI+(++)
D(+) G e-(*)>++@ h! r!>+++ y?
------END GEEK CODE BLOCK------
decoded
Back to top
m1ac4


Advanced Newbie


Joined: 16 Sep 2010
Posts: 43

Posted: 07 Jun 2012 10:50:43 am    Post subject:

I want to start working with save files and save data but I am having trouble understanding how to do it because all of the information is scattered in several places. I want to be able to read information from a file to a struct and write it back. I'm still working on the structure of the save file so I don't know what size it will be yet. Would a struct be the best method of getting all of my data into one place and how should I go about reading and writing save data to a file?
_________________
Switched RPG (SwtchRPG ported to C) has a demo now!
Back to top
gbl08ma


Power User


Joined: 26 Nov 2011
Posts: 476
Location: Portugal

Posted: 07 Jun 2012 10:53:36 am    Post subject:

I think you'd better wait for libfxcg standard file I/O functions are implemented, after that, you'll be able to use fopen() and friends as you would do in any other C program.
_________________
My blog, where I write about random things... | tiny URL shortener
View JPEG images on your Prizm | Utilities for the Casio Prizm - clock, stopwatch, calendar/agenda, add-in manager and more!
Back to top
m1ac4


Advanced Newbie


Joined: 16 Sep 2010
Posts: 43

Posted: 07 Jun 2012 10:54:56 am    Post subject:

Ok. I have plenty of maps left to design and another tilesheet too so I can certainly keep myself occupied until then.
_________________
Switched RPG (SwtchRPG ported to C) has a demo now!
Back to top
AHelper


LONG LIVE COMICTECH


Joined: 30 Jan 2011
Posts: 1661
Location: Aufhelperstan, Utopian Republic

Posted: 07 Jun 2012 12:47:10 pm    Post subject:

Since you are now getting in to files and such, i will now warn you about endianness. If you forget about it, you can be in a world a pain.
_________________
°ᴥ° Get Lucky

<BrandonW> "You don't even want to know what TI Connect does when it's just detecting your calculator...It ACTUALLY ERASES THE SWAP SECTOR on every communication attempt...EVERY SINGLE ATTEMPT...Yes, TI Connect will kill your calculator..What do I have to do to get your attention?!....Such a bloated protocol."
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    » Goto page 1, 2, 3  Next
» View previous topic :: View next topic  
Page 1 of 3 » All times are GMT - 5 Hours

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© Copyright 2000-2013 Cemetech & Kerm Martian :: Page Execution Time: 0.036174 seconds.