Vincent,
I have been trying to use the equation of an ellipse to create a rotating cube. Everything looks great but the left and right side should move out as it rotates. The equation is (x-h)^2/a^2 +(y-k)^2/b^2 = 1 where a>b. Solving for y in petit language you get: y=SQR(POW(B,2) - POW(B,2)*POW(I-H,2)/POW(A,2))+K. In petit, this equation in a For loop can throw alot of error messages if not set up correctly. My For loop range is not correct but it worked. H and K can be set to zero and handled outside of the equation.
Eveyone. I think I am ready for my next 'text' game. I am thinking of calling it "Greedy". It is basicly a "Pac"ish maze game. Your man picks up "$" symbles while avoiding blue men (cops).
Only...I have no ideal about movement...exactly how to move charaters. Anyone know a good demo on movement inputs, and how to prevent a charater from moveing off the screen?
Wow I have not been on in awhile...... my question will sound very noobish but there goes. I have a battle not unlike ones like pokemon, but I am having trouble with the random damage. When the first atk is unleashed, everything is fine. But then after that, two things occur. 1:After a certain number, the Hp wont go down anymore. 2: the Hp starts increasing. If you need to see some code, I would gladly offer it. Thank you.
I don't have a 3DS so what do I put here? -Damolii
I'm trying to make a character keep moving when I hold a button down. I'm using the BTRIG command, but I have to press it over and over again to keep moving. So how would I loop the movement over and over?
@mystman12 Use button
Code:
if button()==[number code here] then...
in between the button () things, you can specify what sort of button press you want. By default button(), It is zero but you can do things like button(2).
Here is what the numbers mean if I can remember correctly
0=If the button is pressed (or held down) at all
1=Returns true as soon as the button is pressed
2=Returns true if the button is pressed then released
3=Returns true if the button is released.
In your case, you want button(0) or button(). Hope I did not confuse you too much. @damolii lets see that code.
@Sterica, That would pretty much be a retextured version of pacman. Why not just try to port pacman?
A) Pac-Man is copyrighted, "Greedy" is not. I'm shure BandaiNamco is really protected about their copyright, especially considering what an icon Pac-Man is.
B) It has nothing to do with eating. It is more akin to "Lupen the 3rd" than that.
And again, I really doubt namco would really care about you making a pacman clone, even if they somehow do notice you (which is pretty unlikely) they would probably just say "eh" and move on.
Then again, it's your game and you are free to do anything you want with it.
actually, Temple Raid started as a port of pac-man but I realized that if I make up my own gameplay, I have a lot more freedom. In fact the program is still called 'pacman' on my 3ds not 'tempraid'. 'tempraid' is like a backup.
Since I won't be able to work on Village for a while, I figured that I'd post another demo on the off chance that anybody actually wants to try it out. I mean, I don't expect anyone to actually want to try out a 38 QR code unfinished game, but I want to put this here anyway: http://db.tt/53xhb7Fw
Here's what you can do so far:
-Enter your name and village name
-Generate a new village with your house and a shop (along with trees/flowers/weeds)
-Walk/Run around your village (hold B to run)
-Pick/move flowers and pull weeds
-Pick fruit off trees
-Trees regrow fruit in 2 days
-Weeds grow every day
-Sell anything at the shop
-Buy anything at the shop
-Shovel is a working item: dig holes, plant fruit/new tree seeds. Trees take 4 days to grow. Use the shovel to obtain otherwise unobtainable weeds.
-Other colors of trees sell their pickings for 10X regular fruit selling price
-Place statues/benches/lamposts/rocks around town. When the hammer works, you can use the hammer to reclaim these items.
@bluerobin2 here is my codes without the sprite parts of it.. this is going to be long cuz I am lazy
ACLS
HP=100
HPE=100 @START
WAIT 100
ACLS
SYSBEEP=FALSE
"MOST OF THIS IS SPRITE FUNCTIONS SO I WILL NOT BOTHER" @FIRE
SPPAGE 0
SPSET 6,41,0,0,0,0
SPOFS 6,0,50
SPOFS 6,200,45,45
GOTO @ETURN @ETURN
WAIT 20
HP=100
HPE=100
"HERE'S THE PROBLEM
IF SPHITSP(6,7) THEN HPE=HPE-10-RND(5)-RND(5)
IF SPHITSP(6,7) THEN HP=HP-10-RND(5)-RND(5):GOTO @START
GOTO @ETURN
On the first atk, it works fine, but after that it starts gaining Hp. Thanks for looking into my question. and bluerobin2, do you remember when you said you found a way to make circular movements. Tell me more....
Btw, to everyone, does anyone need music in their game. I have recently made a minecraft music demo, and if anyone would like some music in their game, I would be happy to help.
Since I won't be able to work on Village for a while, I figured that I'd post another demo on the off chance that anybody actually wants to try it out. I mean, I don't expect anyone to actually want to try out a 38 QR code unfinished game, but I want to put this here anyway: http://db.tt/53xhb7Fw
Here's what you can do so far:
-Enter your name and village name
-Generate a new village with your house and a shop (along with trees/flowers/weeds)
-Walk/Run around your village (hold B to run)
-Pick/move flowers and pull weeds
-Pick fruit off trees
-Trees regrow fruit in 2 days
-Weeds grow every day
-Sell anything at the shop
-Buy anything at the shop
-Shovel is a working item: dig holes, plant fruit/new tree seeds. Trees take 4 days to grow. Use the shovel to obtain otherwise unobtainable weeds.
-Other colors of trees sell their pickings for 10X regular fruit selling price
-Place statues/benches/lamposts/rocks around town. When the hammer works, you can use the hammer to reclaim these items.
@bluerobin2 here is my codes without the sprite parts of it.. this is going to be long cuz I am lazy
ACLS
HP=100
HPE=100 @START
WAIT 100
ACLS
SYSBEEP=FALSE
"MOST OF THIS IS SPRITE FUNCTIONS SO I WILL NOT BOTHER" @FIRE
SPPAGE 0
SPSET 6,41,0,0,0,0
SPOFS 6,0,50
SPOFS 6,200,45,45
GOTO @ETURN @ETURN
WAIT 20
HP=100
HPE=100
"HERE'S THE PROBLEM
IF SPHITSP(6,7) THEN HPE=HPE-10-RND(5)-RND(5)
IF SPHITSP(6,7) THEN HP=HP-10-RND(5)-RND(5):GOTO @START
GOTO @ETURN
On the first atk, it works fine, but after that it starts gaining Hp. Thanks for looking into my question. and bluerobin2, do you remember when you said you found a way to make circular movements. Tell me more....
Btw, to everyone, does anyone need music in their game. I have recently made a minecraft music demo, and if anyone would like some music in their game, I would be happy to help.
I need some help. I have been able to make a character that is fully animated and walks around the screen, but now I need to know how to load the map data. I want to create a simple maze for the player to walk around, so what is the best way to do that? Should the data have numbers representing the corresponding tiles? One problem is that all my tiles are 2x2, not just one square, and BGPUT only allows one, so how would I load the 2x2 tiles? I thought about loading the map like this:
FOR TILEX(The X location for the tile) =0 TO 30(Or whatever the limit will be)
FOR TILEY(The Y location or the tile)=0 TO 30(Or whatever the limit will be)
'Data for corresponding tile will be loaded and placed here
NEXT
NEXT
(I saw code like this somewhere else. I think it was GAME2, but I'm not sure)
Is that a good code?
mystman12
Try a two dimensional array to store data. Use your nested for loop to load and display your tiles. I have a tutorial on https://www.nintendolife.com/forums/dsiware/petit_computer_tut... but it is a little different in that the background moves. You should separate the BGPUT from the READ nested loops. Replace the zeros in the data with the sprite numbers.
DIM ARRAY(8,4)
RESTORE @MAPDATA
FOR Y=0 TO 3
FOR X=0 TO 7
READ ARRAY(X,Y)
BGPUT 0,X,Y,ARAY(X,Y),8,0,0
NEXT X
NEXT Y
END @MAPDATA
DATA 0,0,0,0,0,0,0,0
DATA 0,0,0,0,0,0,0,0
...4 times
@TexMurphy Very helpful, thanks! Quick question though, what exactly are the X and Y values in the array for? Are they used to pinpoint the correct data number, or something else?
Forums
Topic: Petit Computer
Posts 2,521 to 2,540 of 9,620
Please login or sign up to reply to this topic