Ok from now on this post is where I will be posting everything to do with game updates, features, and info-

•I have currently been working on adding many new features for version 2.0. As of now I have sucessfully added:
*a whole new way of building and destroying(much like that of Terria's)
*greyscale
*the world is now flat from the start, but can be customized
I am also working on a day and night along with a living backround of mountains and clouds.
edit* Picraft 2 v 2.0 has been submitted for review and will most likely be available shortly. I would advise you to update the game immediately if you own it, as this version greatly improves the gameplay. The full list of new features can be found in the description of the game for 2.0 once its released. hope you enjoy, any feedback is great and inspires me to work harder:)
Note: Most updates will not be released in this short amount of time.
Runer112: show me a code if you know one that would animate sprites as I need a visual to understand this as I need to see what this would look like in a program to fully understand what your trying to tell me(if you get what I'm saying)
Here's just a generic way to animate a sprite.
Code:
Packed data, one letter, one byte, : is just a visual separator

L:F:S1:S2:...:Sn

L - Number of sprites
F - Current frame
S1..Sn - Pointers to sprites.

To just render, advance to the sprite pointer using F, then render.
To advance the frame, increment F, then if F > L, set F to 0.


Again, this is generic. I don't know anything about the workings of Axe.

Code:
.AA
[]->°Sprites
[0000001818000000].sprite of a 1 (dice face style)
[0060600000060600].sprite of a 2 (dice face style)
[0060601818060600].sprite of a 3 (dice face style)
[0066660000666600].sprite of a 4 (dice face style)

While 1
 Pause 50
End!If getKey(0)
.this loop just waits for the user to release all keys

ClrDraw
0->A
While 1
 Pt-Off(0,,A++^4*8+°Sprites)
 .basically, A++ is to get to the next sprite, ^4 is to only loop through the 4 frames we have, and not get to the 16th sprite, so we get back to 0 when we hit 4, *8 is because one sprite takes 8 byte and +°Sprites is because sprites are pointed by °Sprites
 DispGraph
 Pause 500
EndIf getKey(0)

ClrHome

Of course, if you want more frames, change the ^4 by ^number and change the sprites Wink
I'm not sure what I'm supposed to be entering in the code sry but can you remove anything unnecessary as I entered it and I must be adding/ leaving out something, just edit the post to only code no extra writting thx!
Lol, you can write everything since everything behind a dot is a comment, the compiler doesn't read it Wink
But if you want clean code, here it is:


Code:
.AA
[]->°Sprites
[0000001818000000]
[0060600000060600]
[0060601818060600]
[0066660000666600]

While 1
 Pause 50
End!If getKey(0)

ClrDraw
0->A
While 1
 Pt-Off(0,,A++^4*8+°Sprites)
 DispGraph
 Pause 500
EndIf getKey(0)

ClrHome
One more Q, how would I implement this into my game so that the animation is activated at the location of the pointer if the player hits a certain button?( pointer is referring to greyscale block shadow that the player can freely move around in order to choose where they want to build(if you don't understand download the game and you will see what I'm talking about))
I think that code answers the question, but I don't think it should be implemented as is in your code. Just understand how it works then adapt it to your code Smile


Code:
.AA
[]->°Sprites
.white frames
[0000001818000000]
[0060600000060600]
[0060601818060600]
[0066660000666600]
.black frames
[FFFFFFE7E7FFFFFF]
[FF9F9FFFFFF9F9FF]
[FF9F9FE7E7F9F9FF]
[FF9999FFFF9999FF]

[]->°Map
[010101010101010101010101]
[010000000000000000000001]
[010001000100010001000101]
[010000000000000000000001]
[010000000000000000000001]
[010100010001000100010001]
[010000000000000000000001]
[010101010101010101010101]

Copy(°Map,L1,96)
.copies the map to a saferam
.area to be able to edit it
.without writeback issues

0->A->B
.initiates the coordinates of
.the cursor where the animation
.will be activated
->F
.also initiate the frame variable
While 1
 .first move the cursor if
 .arrow keys are pressed
 A+getKey(1)-getKey(4)^8->A
 B+getKey(3)-getKey(2)+12^12->B
 F+1^4->F
 .can be optimized to F+1 and 3->F
 .since the modulo is 4 but anyways
 .now we draw the whole map
 0->Y
 For(8)
  ~1->X
  For(12)
   Pt-Off(X++*8,Y*8,{Y*12+X+L1}*4*8+°Sprites)
  End
  Y++
 End
 .now we draw the animated sprite
 Pt-Off(B*8,A*8,{A*12+B+L1}*4+F*8+°Sprites)
 DispGraph
 Pause 500
EndIf getKey(15)



As always, all lines beginning with a dot are comments, you can put them in your code or remove them, that won't change anything to the result.

Note that the only reason why the program is slow is the "Pause 500" at the end, remove that and it will be so fast you won't even understand how the sprite is animated.

Also, I noticed a weird thing: why did you put in the description of your file that your game needs the Axe Parser to run ? Once compiled, there is no need for the compiler to run the executable (except if you compile in Fusion mode, but you compiled as an app so you are not concerned).
Sry but I don't know how to tilemap yet. Anyhow I did manage to add it into my code, one last q how would I change ptoff(0,,A++^4*8+Sprites to where you can place the animated sprite anywhere you want(ex: Pt-off(X,Y,_____. I already tried doing Pt-off(X,Y,0,,A+^4*8+Sprites) but it gave me an argument number error. Is there a way to place it at any given location or is that not possible?
Piguy-3.14 wrote:
Sry but I don't know how to tilemap yet.

Then how do you draw the map at the beginning of the game ? Also, even if you don't know how to do it, my code includes a tilemapper so you can just see how it works basically.

Piguy-3.14 wrote:
I already tried doing Pt-off(X,Y,0,,A+^4*8+Sprites) but it gave me an argument number error. Is there a way to place it at any given location or is that not possible?
Well as the error says, you have too much arguments. And as you say, the arguments are (X,Y,PTR), while you did here (X,Y,?,?,PTR). So just try doing this
Pt-off(X,Y,A++^4*8+°Sprites)
Hey Cemetech, just telling you that a new version of Picraft is available(2.1 alpha) though only on ticalc for now. The reason is because this is just a bug fix, meaning that no major features have been added. If you have the game don't feel like this is an urgent bug fix that must be downloaded, all it does is fix you not being able to place the crafting table; that's it:) Also I just got a ti-89 titanium and am having a bit of trouble downloading games for it(1/10 games I try actually work) if you have any idea why this is please say so, as I really want to play doom!!!
Hayleia wrote:
Piguy-3.14 wrote:
Sry but I don't know how to tilemap yet.

Then how do you draw the map at the beginning of the game ? Also, even if you don't know how to do it, my code includes a tilemapper so you can just see how it works basically.


Probably in a similar way as some people did in the past or like I did before I knew about tilemapping. Some people just used pics which contained a drawing of the current area, so some BASIC games only had 10 rooms (taking a total of 7670 bytes of RAM together), while some other people just hard-coded collision detection, resulting in plenty of If/Then/Else blocks for each obstacle on the map. Else, maybe english isn't his native language and he actually knows what tilemapping is, but knows it under a totally different name.
Piguy-3.14 wrote:
Also I just got a ti-89 titanium and am having a bit of trouble downloading games for it(1/10 games I try actually work) if you have any idea why this is please say so, as I really want to play doom!!!

perhaps the problem is that some of the games were written in assembly for the ti-89. There are some compatibility errors when that is the case but I think someone made a patch that could fix your problem on Ticalc.org.
Please help!!! I accidentally deleted my game today and I wasn't concerned until when I tried to download it to my calc again it didn't give me it!!! I even redownload end it off of Cemetech; but it still wouldn't give me the game(it sent but never showed up on the calc) can someone try to download it onto their calculator to see if the file I uploaded isn't working because I need to be able to continue coding my game, but can't if the game got deleted; please help I am really worried!!!
If the source code is included with the download, have you tried opening it in SourceCoder? Does the game run in jsTIfied?
Nope no code
It took about two hours to get everything right, but I believe that I've successfully decompiled the Picraft 2.1 application back into Axe source code. The executable code produced by compiling the source code I reverse engineered exactly matches the application in the Cemetech archives. The source code may be a little different, as it lacks comments or any code spacing you may have used and I simply gave sprites increasing numbered names. You may want to re-adjust these to your liking. Otherwise, you should be able to resume right where you left off with version 2.1.

Would you prefer that I post the source code in the thread publicly or send it to you privately?
Not much going on in the means of development; still waiting to here back from my helper on tilemapping and when it will be complete. Tilemapping will be a big and notable feature in 3.0 alpha, but there will most likely be more to go with it. I really am afraid to do anymore coding until I add tilemapping, as I will most likely have to redo it.
Edit* I know this is kinda random but my helper most likely won't be able to work on tilemapping my game for a while, and I would like to be able to code. Does anyone have a suggestion for another game I could start while I wait for my helper to begin working with me(he/she is currently working on someone else's game.) if you would like to see a game on the ti-83/84 series please say so, as I am in the need of a challenge to occupy my brain while I wait. Thanks!

Edit* I have a question for anyone who might know; what is a bitmap in Axe Parser? And can you use them instead of tilemapps, as they sound very similar, yet I cannot find a good description of them. If anyone knows how to use these or if they would be of any help please say so!!!
Bitmaps are simply arbitrarily-sized images. Axe supports them with sizes up to 256x256. However, they won't be of much help for your game, because it should rely on a tilemap-based renderer. Not only does tilemap-based rendering lend itself very well to the platform, but the the world itself is a 2D array of blocks so it's more or less a must.

Also, may I suggest a more traditional version numbering scheme? It's ultimately your project so you can choose what you want, but incrementing the major version number so often seems a little strange and might confuse/mislead others. If I were at this stage in a project, I would probably call it at most at version 0.1, not 3.0. Smile
Thanks Runer112, I number the game version similar to that of Minecraft Pocket edition and its a little to late to change it now I guess. Also are bitmaps basically sprites then? They sound a lot like sprites to me anyway. If they are could I use them to change the size of a block in my game? Etc. have a block 16*16 instead of eight by eight. If this is true could you demonstrate how they could be used in a code? Thanks Runer112 again for all your help; I really do appreciate it.
  
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 2 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