My original game boxman for 84 PCSE and boxman for 83/84+ is a good start for this game I think but is not quite what I envisioned speed wise and graphics wise. I feel that it would be a lot more enjoyable and playable if it was faster.

So I am going to attempt to port it to 84PCE through C and the C libraries.
I know very little about c, mostly syntax. So this project will be completed over a series of baby steps to help refresh my memory and learn while making this game.

As suggested by unicorn, I'll be starting the game with 16x16 square rectangles as boxes and then once the mechanics work on the game I'll transition the rectangles to sprites which I'll post later when I have them.

the CE screen is 320*240 so 20 16 pixel squares should fit across the bottom of the screen and the columns will have 14 boxes with the top row blank so the boxman can fit up there to win the level.

Wish me luck, this is going to be an adventure especially with school and FRC and other projects like the ti 86 screen replacement. Spring break is coming up though Smile I hope this game turns out well and eventually ends up in the archives Very Happy
This sounds like fun! I look forward to seeing your progress with the C version Smile As always, we look forward to answering any questions you may have in the process.
I'll be looking forward to this! I saw your CSE version and settled to wait for DCE(because my only calc is a CE), but now this is here to make me smile. I think it'll be a good experience. Unicorn's first time even touching C was FloodIt, if you don't count his "Hello World" program. As I cannot code C, though I want to and have no time to sit and learn, I can't help you with such issues, but I can do absolutely anything sprite/art related. Very Happy
I hope this code looks ok because sc3 is erroring on it. I want to make sure it's my fault before I make a bug report on it.

There is nothing resembling the code for boxman yet, just variable setting and stuff.


Line 12 is missing a semi-colon at the end.
You're gonna want a semicolon in level = 1;

As Mateo said in IRC, You need gc_InitGraph; and gc_CloseGraph; Wink
Ah, I see now.

When I have no apparent errors (yes, checking missing semicolons Razz ) I always get these error messages:


Code:
CC: No file(s) "\bin\eZ80cc.c" found
boxman.c
boxman.src
\include\ce\asm\libheader.asm   (6) :   ERROR (403) ".launcher" is not a segment name
\include\ce\asm\libheader.asm   (51) :   ERROR (403) ".libs" is not a segment name
\include\ce\asm\libheader.asm   (51) :   ERROR (403) ".libs" is not a segment name
Linking...
WARNING (731) --> File "boxman.obj" is not found.

and what's even weirder is that one of them happens twice...
This is a learning process Smile
I believe I said this on SAX yesterday, but you need #include <ti84pce.h> right before you include the libraries. This is easily viewable in the example programs. Wink
Ohhhh!
there must have been something under it including the word don't because I read it as "you don't need...." wow, thanks mateo.
Ok! I now have a playable version of Boxman C on my calc. It features:

-- box fall acceleration
-- moving one box left or right with the touch of a left or right arrow (as opposed to shooting to the end of the screen lightning fast)
-- Only being able to move up one box at a time
-- no graphics glitches Very Happy
-- scoring based on how high you are on the screen

I still need to do

-- Sprite drawing instead of just rectangles (maybe mateo can give some insight to that Smile )
-- Detecting losing (being squashed)
-- Detecting winning the level (getting to the top)
-- Once won, start a harder level.
-- Add level counter on the top of the screen.


Here are some sprites (blue will be transparent color on the first two)
Awesome! Can we get a screenshot? If not, I can take one for you on CEmu Wink
I can send it to you unicorn. Do you want it via email? I don't have CEmu yet.
MateoConLechuga wrote:
I believe I said this on SAX yesterday, but you need #include <ti84pce.h> right before you include the libraries. This is easily viewable in the example programs. Wink


The library headers really ought to include their own dependencies. This is what include-guard #defines are for.
I know, I'm totally redoing everything. It's going to be even easier and better Smile

Edit: Wait, what? The library headers already do include their own dependencies. Smile
MateoConLechuga wrote:
I know, I'm totally redoing everything. It's going to be even easier and better Smile

Edit: Wait, what? The library headers already do include their own dependencies. Smile

Then why do you need to include <ti84pce.h>?
Botboy3000 wrote:
I can send it to you unicorn. Do you want it via email? I don't have CEmu yet.

Can you upload it to dropbox or something, then pm the link?
elfprince13 wrote:
MateoConLechuga wrote:
I know, I'm totally redoing everything. It's going to be even easier and better Smile

Edit: Wait, what? The library headers already do include their own dependencies. Smile

Then why do you need to include <ti84pce.h>?


That's because it *used to* introduce the segment definitions within the startup module. But that will no longer be the case.
Here you go!
Whoa! That is a lot faster than on hardware.

Thanks unicorn for doing that! Smile

I have found another problem:
It's always the same game.
Rand() must use uptime as a seed because it's always the same game. What can I do to avoid this?
Put this seed above your rand() command, but make sure it's not in a loop


Code:

srand(*(unsigned long*)0xF30044);
  
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 4
» 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