Forums

Topic: Petit Computer

Posts 8,001 to 8,020 of 9,621

Slayer

Here it is. I also designed a box and made intro text not interfering with the code, but here it is excluding the intro-
'Game prep
CLS
B=BTRIG()
PNLTYPE "OFF"
@MAINMENU
CLS
X=0:Y=1
@CURSOR
CLS
LOCATE 0,0:?"Apocalypse Rising Alpha 1.0"
LOCATE 1,1:?"New Game"
LOCATE 1,2:?"Load Game"
LOCATE X,Y:?">"
B=BUTTON(1)
IF (B AND 1) THEN Y=Y-1
IF (B AND 2) THEN Y=Y+1
IF Y>2 THEN Y=1
IF Y<1 THEN Y=2
IF B AND 16 THEN GOTO @NEWGAME
This isn't part of my code, but the Load Game feature won't be implemented in this first version. Just for clarification.
VSYNC 1
GOTO @CURSOR
'New game
CLS
@NEWGAME
@SURVIVESP
LOAD"SCU0:SURVIVE"
LOAD"SPU1:SHM19R"
SPSET 0,64,2,0,0,0
SPOFS 0,12,12
LOCATE 0,0:?"100"
That's where it didn't print the text.
'Controls
CLS
@CONTROLS
IF BTRIG()==1 GOTO @UP
IF BTRIG()==2 GOTO @DOWN
IF BTRIG()==4 GOTO @LEFT
IF BTRIG()==8 GOTO @RIGHT
GOTO @CONTROLS
@UP
SPREAD(0),X,Y
SPOFS 0,X,Y-13, 30
GOTO @CONTROLS
@DOWN
SPREAD(0),X,Y
SPOFS 0,X,Y+13, 30
GOTO @CONTROLS
@LEFT
SPREAD(0),X,Y
SPOFS 0,X-13,Y,30
SPANIM 0,4,15,0
GOTO @CONTROLS
@RIGHT
SPREAD(0),X,Y
SPOFS 0,X+13,Y,30
SPANIM 0,4,72,0
GOTO @CONTROLS
Well, that's it. Just 68 lines, not too lengthy (at least compared to everyone else's games, am I right?).
EDIT: Sorry for the double post, by the way.

Edited on by Slayer

I have nothing really to say about myself.

Discostew

0Games wrote:

LOCATE 0,0:?"100"
That's where it didn't print the text.
'Controls
CLS

There's your problem. You're clearing the screen right after you print, which bring me back to one of the first questions.

Discostew wrote:

Are you using CLS at any point after that line?

Edited on by Discostew

Discostew

3DS Friend Code: 4425-1477-0127 | Nintendo Network ID: Discostew

Slayer

Discostew wrote:

0Games wrote:

LOCATE 0,0:?"100"
That's where it didn't print the text.
'Controls
CLS

There's your problem. You're clearing the screen right after you print, which bring me back to one of the first questions.

Discostew wrote:

Are you using CLS at any point after that line?

OH, I see. I should've seen that a mere comment seperated the two, which wouldn't stop the program from erasing the text immediately.
Edit: I've fixed it now. 100 displays in the top corner of the screen, and once I have zombies from Hansausage I can direct the program to decrease health when a zombie touches the survivor and eventually program death. Thanks, Discostew. I wouldn't have seen that.

Edited on by Slayer

I have nothing really to say about myself.

Pixelrobin

@0Games a health bar would look better imo.

Everybody do a chirp. CHIRP.

3DS Friend Code: 3007-9228-5126

GraphicGenius

How do you check if a number is odd or even?

If Facebook, Myspace, Twitter, Instagram, and Snapchat were all destroyed, 90% of teens would go insane. If you're one of the 10% that would be laughing at them, copy & paste this into your signature and hope it happens. Wait was that just a joke?

3DS Friend Code: 1478-3545-5136 | Nintendo Network ID: GreatGamer123

LeviCelJir

Hey guys today Ima tell ya a project I am working on. TERRARIA DS! (WOOHOO)
Here's what I have so far:
Terrain generator, block building and breaking, kinda working saving, terraria music, and terraria block sprites. (making more today) I hope yall are excited for this project.
And Twin (like always) made this project possible so thanks twin!
That's it for now!

Hi I'm Levi and I like Bloopys :^)

iprice

Screenies or it didn't happen

I code, therefore I am.

LeviCelJir

iprice wrote:

Screenies or it didn't happen

Hahaha Some people don't have cameras that take high quality pictures. I could try though. But I would probably post it in a blog before I post it here. Plus my computer is getting sent in for repairs so it would be hard to make qrs

Hi I'm Levi and I like Bloopys :^)

iprice

I doubt there's anyone that doesn't have access to a single digital camera nowadays. They are everywhere.

Photos (or vids) don't have to be high quality - all we want to see is actual work in progress.

I code, therefore I am.

Pixelrobin

GraphicGenius wrote:

How do you check if a number is odd or even?

IF number%2!=0 THEN (number is odd)

Everybody do a chirp. CHIRP.

3DS Friend Code: 3007-9228-5126

LeviCelJir

iprice wrote:

I doubt there's anyone that doesn't have access to a single digital camera nowadays. They are everywhere.

Photos (or vids) don't have to be high quality - all we want to see is actual work in progress.

If you want a picture I'll give you one. But Before I give a pic I gotta make some changes and make a wood house :3 So It may not be for a couple days.

Hi I'm Levi and I like Bloopys :^)

noxuss

Leviceljir wrote:

iprice wrote:

I doubt there's anyone that doesn't have access to a single digital camera nowadays. They are everywhere.

Photos (or vids) don't have to be high quality - all we want to see is actual work in progress.

If you want a picture I'll give you one. But Before I give a pic I gotta make some changes and make a wood house :3 So It may not be for a couple days.

I really want qrs for this

noxuss

noxuss

Hey 0games, if you get shooting working may I see how you did it?

noxuss

LeviCelJir

@TwinArmageddonz How do I edit the terrain generator you made? I want to change the trees and ground. Also why does It only save the blocks you break? I need that fixed...

Hi I'm Levi and I like Bloopys :^)

twinArmageddons

Leviceljir wrote:

@TwinArmageddonz How do I edit the terrain generator you made? I want to change the trees and ground. Also why does It only save the blocks you break? I need that fixed...

MAP(X,Y)=<block number>
the map saves every block on the map, you probably just messed something up with building

get in loser we're going titan hunting

3DS Friend Code: 2879-0639-8952 | Nintendo Network ID: merp_aottg

LeviCelJir

twinArmageddons wrote:

Leviceljir wrote:

@TwinArmageddonz How do I edit the terrain generator you made? I want to change the trees and ground. Also why does It only save the blocks you break? I need that fixed...

MAP(X,Y)=<block number>
the map saves every block on the map, you probably just messed something up with building

I try the buildings MAP thing but it says its a syntax error :/

Hi I'm Levi and I like Bloopys :^)

twinArmageddons

Leviceljir wrote:

twinArmageddons wrote:

Leviceljir wrote:

@TwinArmageddonz How do I edit the terrain generator you made? I want to change the trees and ground. Also why does It only save the blocks you break? I need that fixed...

MAP(X,Y)=<block number>
the map saves every block on the map, you probably just messed something up with building

I try the buildings MAP thing but it says its a syntax error :/

just copy the breaking code and replace the 6 with BLOCK

get in loser we're going titan hunting

3DS Friend Code: 2879-0639-8952 | Nintendo Network ID: merp_aottg

LeviCelJir

twinArmageddons wrote:

Leviceljir wrote:

twinArmageddons wrote:

Leviceljir wrote:

@TwinArmageddonz How do I edit the terrain generator you made? I want to change the trees and ground. Also why does It only save the blocks you break? I need that fixed...

MAP(X,Y)=<block number>
the map saves every block on the map, you probably just messed something up with building

I try the buildings MAP thing but it says its a syntax error :/

just copy the breaking code and replace the 6 with BLOCK

But then when you save it it like makes the blocks fall down a bit.

Edited on by LeviCelJir

Hi I'm Levi and I like Bloopys :^)

Slayer

Bluerobin2 wrote:

@0Games a health bar would look better imo.

I share that opinion, but I'm waiting for that because it's a lot more complicated. For now I'm sort of rushing this along and taking my time simultaneously.
@noxuss Still working on it, but when I finish, then definitely.
@Leviceljir Believe me, I tried. It's hard. And I even think you were the one on GameFAQs that requested that I make that game XD

Edited on by Slayer

I have nothing really to say about myself.

twinArmageddons

@0Games health bars aren't complicated at all!
GPAGE 1:GCLS:GFILL 0,20,HP,20,11:GPAGE 0
that's a really simple health bar in one line; you'll probably want to get more advanced health bars than this eventually though
@Leviceljir i can remake the prg i gave you with all the bug fixes and stuff if you want

get in loser we're going titan hunting

3DS Friend Code: 2879-0639-8952 | Nintendo Network ID: merp_aottg

Top

Please login or sign up to reply to this topic