| Author |
Message |
|
Reo
Newbie

Joined: 28 Feb 2012 Posts: 12
|
Posted: 28 Feb 2012 02:23:04 am Post subject: [PRIZM & nspire] Work-in-progress RPG |
|
|
I'm working on a currently-nameless RPG for both the PRIZM and Nspire. Using the C pre-processor, I'm able to have platform-specific code so that any non-specific changes affect both versions.
I know that this community embraces the PRIZM more than the Nspire, but I usually test new features using the Nspire emulator because it's easier. The only real difference between the two versions is screen-layout and speed.
I hope to finish the project while maintaining compatibility for both calcs. I don't have many plans for the project; I'm adding most things directly after I think of them.
Here's a actual screenshot from the (painful) Casio Screen Reciever:
and two from the Nspire demonstrating scrolling:
  |
|
| Back to top |
|
|
comicIDIOT

Guru

Joined: 01 May 2006 Posts: 5107 Location: SFBA, California
|
Posted: 28 Feb 2012 02:57:51 am Post subject: |
|
|
Looks pretty cool! What UI element did you have to sacrifice on the Nspire? I see three boxes on the Prizm and two on the Nspire.
Any sort of story, features you plan to implement, or are already implemented that you can share with us? _________________
-Alex |
|
| Back to top |
|
|
Reo
Newbie

Joined: 28 Feb 2012 Posts: 12
|
Posted: 28 Feb 2012 03:10:50 am Post subject: |
|
|
| comicIDIOT wrote: | Looks pretty cool! What UI element did you have to sacrifice on the Nspire? I see three boxes on the Prizm and two on the Nspire.
|
I was able to relocate the HP and MP bars underneath the screen, with no actual loss of UI elements.
| comicIDIOT wrote: | Any sort of story, features you plan to implement, or are already implemented that you can share with us?
|
I have to start thinking about a plot. I plan to make the inventory usable by pressing the corresponding key on the keypad, mapped like so:
Code: 7|8|9
4|5|6
1|2|3
0|.|exp/(-)
Hopefully all the keys listed are accessible for that.
All I have now is walking, map-scrolling, and basic inventory display (not pictured). I still have so much to do before this becomes playable. |
|
| Back to top |
|
|
merthsoft
File Archiver

Joined: 09 May 2010 Posts: 2735
|
Posted: 28 Feb 2012 09:48:34 am Post subject: |
|
|
This is a really neat idea--I can't wait to see how far this gets. I like the thought of having basically identical games between the Prizm and nspire. _________________ Shaun |
|
| Back to top |
|
|
flyingfisch

Super-Expert

Joined: 02 Feb 2012 Posts: 895 Location: Akron, OH
|
Posted: 28 Feb 2012 09:50:34 am Post subject: |
|
|
| merthsoft wrote: | | This is a really neat idea--I can't wait to see how far this gets. I like the thought of having basically identical games between the Prizm and nspire. |
Ninja'd
I was going to say the same thing. Cross-platform programs FTW! _________________

 
 |
|
| Back to top |
|
|
Sarah

Advanced Member

Joined: 17 Sep 2011 Posts: 261
|
Posted: 28 Feb 2012 08:55:44 pm Post subject: |
|
|
If I stopped being lazy with stuff on my calculator, I'd get back to programming my RPG for Prizm...
But but LAAAZZZYYY _________________ I have a [Prizm]. |
|
| Back to top |
|
|
krazylegodrummer56

Power User

Joined: 20 Nov 2011 Posts: 404
|
Posted: 28 Feb 2012 09:00:18 pm Post subject: |
|
|
Can't wait for beta! looks kinda fun. _________________ Projects: Learn how to program in Prizm C
First C program!
Tic-Tac-Toe: Get it HERE!
 |
|
| Back to top |
|
|
comicIDIOT

Guru

Joined: 01 May 2006 Posts: 5107 Location: SFBA, California
|
Posted: 28 Feb 2012 10:13:00 pm Post subject: |
|
|
| Reo wrote: | | comicIDIOT wrote: | Looks pretty cool! What UI element did you have to sacrifice on the Nspire? I see three boxes on the Prizm and two on the Nspire.
|
I was able to relocate the HP and MP bars underneath the screen, with no actual loss of UI elements. |
Oh! I didn't even see it down there. I'm sure it'd be noticeable once it's colorized. _________________
-Alex |
|
| Back to top |
|
|
Reo
Newbie

Joined: 28 Feb 2012 Posts: 12
|
Posted: 03 Mar 2012 10:01:07 pm Post subject: |
|
|
I haven't updated here in a while
Since the last version, I've added:
*Better graphics
*Equipment, money, and XP slots to the HUD
*HP/MP bar drawing
*Line-of-sight for map display
 |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55760 Location: Earth, Sol, Milky Way
|
Posted: 04 Mar 2012 10:46:24 pm Post subject: |
|
|
Oooh, this is looking great so far! I love that you're doing this as cross-platform between the Prizm and the Nspire; I think that's a first. Please feel free to post the code chunk we've been discussing on IRC if you want a second pair of eyes. _________________
 |
|
| Back to top |
|
|
Reo
Newbie

Joined: 28 Feb 2012 Posts: 12
|
Posted: 04 Mar 2012 10:51:48 pm Post subject: |
|
|
I'm trying to implement better field-of-view code. This is what I have:
Code:
void FieldOfView() {
ClearLightmap(); //lightmap[13][13] to all zeroes
float x,y; //Holds the sine and cosine of the angle
int i;
for(i=0;i<360;i++) {
x=cosf((float)i*0.01745f); //Convert x and y to radians
y=sinf((float)i*0.01745f); //and find the sin/cos
int j;
float ox, oy; //Center of the player's tile
ox = (float)playerx+0.5f;
oy = (float)playery+0.5f;
for(j=0;j<13;j++) {
lightmap[(int)(oy)-viewy][(int)(ox)-viewx]=1;//Set the tile to visible.
if(map[(int)oy][(int)ox]==1) {return;} //End of the line
ox+=x; //Crashes here
oy+=y;
if ((int)ox >= mapxlength || (int)ox < 0) break;
if ((int)oy >= mapylength || (int)oy < 0) break;
};
};
}
This updates a binary lightmap that I use in another to draw blackness where the player can't see. It's crashing and I don't want it to. |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55760 Location: Earth, Sol, Milky Way
|
|
| Back to top |
|
|
Reo
Newbie

Joined: 28 Feb 2012 Posts: 12
|
Posted: 05 Mar 2012 09:22:06 pm Post subject: |
|
|
| KermMartian wrote: | How can you be sure that the crash isn't one of your two array accesses going out-of-bounds?
Code: lightmap[(int)(oy)-viewy][(int)(ox)-viewx]=1;//Set the tile to visible.
if(map[(int)oy][(int)ox]==1) {return;} //End of the line
|
I don't know if that's the case. I've commented out both lines and it still crashed during the first loop. It may happen later, but it shouldn't happen now if it worked correctly in the first place. |
|
| Back to top |
|
|
Reo
Newbie

Joined: 28 Feb 2012 Posts: 12
|
Posted: 05 Apr 2012 09:26:30 pm Post subject: Update 4/5/12 |
|
|
I broke Prizm compatibility for a while (because it's a pain to make two sets of platform-specific changes if I must), but today I've brought it back.
I've added
*A function to draw strings using a font I made.
*Changed the item screen into a tabbed area with items and stats and (maybe) a map. The first two actually work.
*Cleaned up the code a bit, also started implementing objects (npcs, chests, etc.) |
|
| Back to top |
|
|
Spenceboy98

Super-Expert

Joined: 06 Jan 2012 Posts: 824 Location: In the TARDIS
|
Posted: 05 Apr 2012 09:41:25 pm Post subject: |
|
|
Looks great. Keep up the good work.  _________________ DERSH IMPERSHIBER! |
|
| Back to top |
|
|
zeldaking
Power User

Joined: 31 Jul 2011 Posts: 470 Location: Utah
|
Posted: 05 Apr 2012 10:37:47 pm Post subject: |
|
|
| Spenceboy98 wrote: | Looks great. Keep up the good work.  |
Ditto, this is looking extremely nice. I really look forwards to playing it. |
|
| Back to top |
|
|
krazylegodrummer56

Power User

Joined: 20 Nov 2011 Posts: 404
|
Posted: 28 Jun 2012 10:54:06 pm Post subject: |
|
|
Any progress on this lately? _________________ Projects: Learn how to program in Prizm C
First C program!
Tic-Tac-Toe: Get it HERE!
 |
|
| Back to top |
|
|
|