The most terrible thing has happened... I accidentally deleted the most current un-compiled version of my program and my dumbass got rid of undelete. The last backup I did was like 2 months ago and is 1/4th the size so I'm not going to go back to that. I had been developing it really slowly like maybe a line every other day, so I didn't want to get rid of the "paused". Thankfully, I still had a compiled program that works pretty well and shows what I had been doing (besides a very small debug test with the walls) with no known bugs. I will be putting that in the cemetech archives/the github page and a screenshot here later today so you guys can look at things. I guess there is a silver lining to this because it will force me to start making a more efficient one in C or asm.

Updates:
- got rid of almost all fisheye (except when really far/close away)
- cool wall pattern to make it look even more 3D
- dual enemy sprite rendering (kinda weird because its in a very small space at the start)
- FPS: increased from 7-9 to 10-12 with enemies, increased from 11-13 to 12-14 at regular sized areas.

Controls:
- strafing: mode/del
- movement: top/bottom arrow keys
- rotation: left/right arrow keys
- shoot: 2nd
- reload: alpha (or 2nd when you are out of bullets)
- exit game: graph then enter

Note: shooting doesn't do anything besides the animation, it will not kill an enemy (that was what I was working on when I accidentally deleted it)
Dang that sucks man!

After experiencing similar disasters myself I recommend a regular backup routine.
It's alright, I wasn't developing it a lot but I will most definitely be taking a lot more countermeasures against this. Anyway, I put it in the archives and here is a screenshot:

I found an old backup on my Pc without any of the sprites or anything but it had the base code and I quickly added the optimizations (: I still plan on getting a laptop to do C but haven't gotten one yet so I'm just going to do some optimizations on the ICE version. I need some help with this part:

Code:
REMY+Sθ→REMY // Sθ is the sin(angle) I use θ for angle
REMX+Cθ→REMX // Cθ is the cos(angle) RÉMY and REMX are remainders (255 = 1 because it gets rid of a calculation for transitions.

If REMY≥765  // I keep the remainders at 255*2 so it never goes negative and weird things happen (I think negs do work with sub and add tho)
REMY-255→REMY // sin and cos go from -255 to 255
TESTY-1→TESTY // TESTY and TESTX are the x and y of the point where the ray tests to see if it should draw a wall
Else
If REMY≤255
REMY+255→REMY
TESTY+1→TESTY
End
End

If REMX≥765
REMX-255→REMX
TESTX-1→TESTX
Else
If REMX≤255
REMX+255→REMX
TESTX+1→TESTX
End
End


I feel like this should be really easy but I'm just brain farting because I want to be able to keep the negative number (multiplication and division messes negative numbers up) Also, this code is repeated around 300 times per frame so literally any optimizations will most likely increase the frame rate a ton. It would also be better if it is able to do more than one point movement (with the code above, if REMX is 10000 the test point will still only go up one) I plan on making it be able to skip points as an optimization.

Last note:
Without all of the extra sprite rendering of the gun and cool looking things, The lowest FPS I've seen is 18 Surprised
You can use TIPlanet's project builder.
It's very good for use on the go. (If you have a chromebook, for example, or if you can't set up the toolchain on Windows)
  
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 4 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