I would like to make a game that has a "Main Menu" similar to that of "Star Wars: Force Unleashed" for the DS (just the graphics, not the storyline). You, the character, move around to different "stations" (probably rooms in your house), the background changing to whatever that room does. Then you can choose to upgrade things in your house (to get bonuses to weapon stats and stuff), and can leave to go on adventures. When on adventures, you can choose between various missions (which give rewards) or explore mode where you just wander a map and level up your character. Certain missions will be required, but some will be extras that are harder but give better rewards; some missions won't be available until you're higher level/have certain upgrades. And then some missions will be co-op missons that utilize Calcnet2.2 to have up to 3 people running around helping each other fight.

Anyways, I was wondering if anyone had some ideas to help me get started, or could give some tips as to where I should start (I expect this to take me months Razz ). Thanks.
This sounds like a lot of fun! Obviously in order to take advantage of the CALCnet 2.2 libraries, you would have to be writing this in ASM at this point; are you open to learning ASM, or were you envisioning a hybrid BASIC game? It sounds to me like you have a firm picture in your mind of how the game's main menu will look, so perhaps that would be a good place to start?
I was wondering if only the multiplayer aspect had to be in ASM; if not, I'd be willing to start learning ASM.

I can start on the menu, but I don't know how to efficiently create the background images I want (since they would change when you went through the menu), so I'll have to just go with basic text (no pun intended) and add graphics later.
Beta7 wrote:
I was wondering if only the multiplayer aspect had to be in ASM; if not, I'd be willing to start learning ASM.
At this point I have no way of ensuring that the OS won't kill the CALCnet2.2 interrupt during BASIC execution. I'll be doing some experiments on feasibility, but so far I'm not guaranteeing any future BASIC support for CALCnet.

Quote:
I can start on the menu, but I don't know how to efficiently create the background images I want (since they would change when you went through the menu), so I'll have to just go with basic text (no pun intended) and add graphics later.
That's fair; that sounds like a good place to start.
This is what I have so far for the main menu:


Code:
:ClrDraw
:1→Z
:Line(25,63,25,53
:Line(25,53,65,53
:Line(65,53,65,62
:Line(65,62,25,62
:Repeat Y     //and yes, I'm using Y so it auto-DelVar's when I ClrDraw
:If Z=1:Text(1,28,"New Game   (3 spaces)
:If Z=2:Text(1,28,"Load Game (1 space)
:If Z=3:Text(1,28,"(10 spaces) Quit (10 spaces)
:DelVar X
:Repeat X=25 or X=34 or X=105
:getKey→X
:If X=25:Z-1→Z
:If X=34:Z+1→Z
:If Z=4:1→Z
:If Z=0:3→Z
:End
:If X=105 and ((Z=2 and {L1}(1)=1) or (Z=1) or (Z=3)):1→Y
:End
:If Z=3:ClrDraw
:If Z=3:Return
:"If Z=2:Then
:"Load Data here
:"If Z=1:Then
:"New Data here
:
:"Start actual game


It works, but is there anything I should fix so it's more efficient?
not that I see, but that doesn't mean there isn't anything. Could someone with more experience double-check?
It's been a LONG time and I don't have a calc handy to check, but I don't think you need a newline after your Delvar.

e.g.

:DelVar XRepeat x=25 or X=34 or X=105
foamy3 is completely correct. DelVar has a weird quirk that means you can save a newline or colon afterwards. Also, in this line:
Code:

:If X=105 and ((Z=2 and {L1}(1)=1) or (Z=1) or (Z=3)):1→Y

You can save a parenthesis and a few bytes with:

Code:
If X=105 and ((Z=2 and {L1}(1)=1) or 1=abs(2-Z
Next, a combination:
Code:
:If X=25:Z-1→Z
:If X=34:Z+1→Z
to
Code:
Z-(X=25)+(X=34→Z
Finally, this line:
Code:
:If Z=0:3→Z
can be shrunk by one byte by using
Code:
:If not(Z:3→Z


Overall, some very nice code, Beta7! You're coming along nicely.
*Edit* Stupid me forgot to make both "5(A-1)" statements into "6(A-1)" statements (only first one was changed). That's now working, nothing is erasing, and I'm working on other sprites.

However, I was told that I should use xLib/real(), so I'm currently looking into that and trying to learn it (tifreak, as usual, has a good tutorial on his site). Does using xLib make the display process quicker?
Beta7 wrote:
*Edit* Stupid me forgot to make both "5(A-1)" statements into "6(A-1)" statements (only first one was changed). That's now working, nothing is erasing, and I'm working on other sprites.

However, I was told that I should use xLib/real(), so I'm currently looking into that and trying to learn it (tifreak, as usual, has a good tutorial on his site). Does using xLib make the display process quicker?
It sure makes the sprite display process a lot quicker, and if you're displaying a lot of sprites in a map-type-arrangement, using the tilemap features makes it even faster! Of course, you should be using the xLIB functions, but be using Doors CS to support the xLIB functions. No need to put xLIB on your calculator.
Since this program has to be in ASM to use CN2.2 (which it will Wink ), I've decided to put I on hold while I try to "Learn ASM in 28 days".

Once I learn a bit of ASM, I'll use this thread for a small, CN2.2-only game (that I hope I can keep a secret Very Happy ), and once I'm done with that (and know enough ASM to make a good game), I'll come back to this.
Sounds like a plan. I hope you'll ask us all about your ASM questions, though, because it can be a bit difficult for beginners to wrap their heads around (not impossible at all, though! It's simpler than it looks). One caveat is that I often suggest mastering BASIC before starting ASM to prevent frustration, but you're welcome to try it for a bit and back out for a bit if you feel it's over your head. Smile
I've decided to switch it up - I'll make my "secret project" be ASM (since that will be CN2.2 multiplayer-only game), and will keep making this game in BASIC. I'll put learning ASM in the background and mainly focus on learning more of BASIC and getting this game built up.

I'm switching because ASM makes no sense as of right now, and I feel like I'm stagnating in my learning (which I don't want to do).
You should make the theme World of Warcraft. That'd be sick to have CalcNet for! Man, all the years of Warcraft, incarnated in Calculator form... Call it WORLD OF CALC-CRAFT.
Or You could make the theme some sort of multi-player turn based strategy. Like Age of Empires for the DS. A few tiles are all you need. Really simple to make a tile based 2d game.
Or you could make a Pokemon. You could call it Calcymon! (Just Joking) 50 card database is more than enough. That was the one thing lacking in the Wizards game for the MirageOS. You could play it, but only with its AI, which wasn't very challenging.
Just some ideas I've had on what to do with CalcNet. (You know, in those crazy dreams you have after an hour of IRC on Cemetech... Razz)
Quote:
Just some ideas I've had on what to do with CalcNet. (You know, in those crazy dreams you have after an hour of IRC on Cemetech... Razz)


Yes, I know exactly what you're talking about. Smile

I already have an idea for my "secret project" (which is the only one that's guaranteed to have CN2.2 multiplayer (sorry Kerm Sad )). This game may or may not be able to include CN2.2 multiplayer (we'll see once I get most of it done and I have the knowledge of ASM to try the multiplayer side), but I want it to be mission-based, where in-between missions you can come back to your house and upgrade weapons from various stations/rooms (that you upgrade by finding materials out on quests).

Now to start mastering real(1) and real(2) (they keep giving me a hard time Confused ) and setting up the "basic" gist of the game.
Assembly is SO hard to code in. I understand all the code, but I can never remember what command is gonna screw me. (i.e. mess with all my registers.) So I push and pop like a mad man, and make a big mess of things, that comes back to bite me. (i.e. won't compile, or worse...) And on top of that, you have to do everything with the registers. You can't just name a variable and forget about it till you need it. You have to make sure you know what ADDRESS in memory it is, and call the address. In C, you just "goto" or "int", but ASM is a lot tougher than that. And the acronyms are a killer. (I mean, really jdnz (or whatever))So I'll port and do basic things in ASM, but I'd never take on an ASM game project to save my life. I'd kill myself before I'd finish! Good luck on your basic game! Have fun above all else.
djnz* Decrement and Jump if Not Zero. I assume by "Command ... is going to screw me over" you mean the bcalls. Other real commands (no offence) don't mess with the registers unless you tell them to. Regarding the variables statement:
Code:
Ship_X:
.db 00
Ship_Y:
.db 00
There! Now you have two variables you can use, with very descriptive names. You can add stuff to them through a variety of methods.
Code:
ld hl,Ship_X
inc (hl)

Code:
ld a,(Ship_X)
add 100
ld (Ship_X),a
I can certainly sympathize with the notion that ASM is difficult and that it seems like a huge undertaking to write a semi-large game, but it certainly has it's perks. For instance, I understand bitmath because of learning ASM, along with knowing the "how it works" part of most code written in other languages. Meh, I'm done.

Beta, without reading your post, did you ask any questions that I could help with?
You know Player, I've never done that with ASM before. You might have just threw me over the fathom of ASM programming. And yes, I mean bcalls, which you use ALL THE TIME. They totally mess with everything and you lose your values to the pit!
adept wrote:
You know Player, I've never done that with ASM before. You might have just threw me over the fathom of ASM programming. And yes, I mean bcalls, which you use ALL THE TIME. They totally mess with everything and you lose your values to the pit!


But they're extremely useful Smile
They are functions that clean up your code if you use them right. But if they use the A register, then your A will be a different value. So you have to PUSH the A before, then POP the A after the call. But usually they use more than one register, and I never can remember all the registers it messes up, so then I get errors and problems and failed compiles.
  
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
Page 1 of 3
» All times are UTC - 5 Hours
 
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

 

Advertisement