Work in Progress

Dungeon RougeLike what game will kind of look like

5

GAMELEGEND 2020-01-02 20:26 (Edited)


((NEW)) — I WILL BE ADDING A STORY AT THE BEGINNING MAYBE
((NEW)) — I WILL BE ADDING HANDFUL OF QUESTS AFTER I RELEASE THE MAIN PART OF THE GAME
((NEW)) — AFTER THAT MORE QUESTS WILL BE ADDED
((NEW)) — MAYBE I WILL RELEASE KIND OF LIKE A DEMO QUEST
((NEW)) — THIS GAME IS GOING FURTHER THAN I FIRST INTENDED IT TO BE
A LOT FURTHER


IF YOU HAVE ANY SUGGESTIONS OR YOU SEE A BUG I RECOMMEND EMAILING ME BECAUSE IT IS EASIER THAN GOING THOUGH THE COMMENTS AND SEEING WHAT IS SUGGESTIONS AND WHAT IS JUST A REGULAR COMMENT

BUT THERE IS A SMALL CHANGE OF FINDING A BUG BECAUSE I CHECK EVERTHING BUT YOU NEVER KNOW I MIGHT MISS SOMTHING

mylowresemail12@gmail.com

This is kind of what the game will look like weapon will be shown below you but i hae not figured out what i want them to look like

above the window will be the name of your character and below the window will show the name of the enemy leaving room for those long names and in the middle where the damage will show will be the animation for the crit attack

HELPED — was8bit — Timo

I will be working on this game non stop so there will be a lot getting done and i might add a save function

If you like those text based roguelikes with graphics then you will probably like this game right now i just have the window that will display what you character looks like and what the enemy looks like and the damage you did and the damage the enemy did and the the animations that show when you or the enemy gets a critical attack animation depends on what kind of weapon you have
SLASHING FOR SWORD
BURNING ARROW
LOOKS LIKE YOU TOOK SOMTHING HEAVY AND SLAMED IT INTO THE GROUN AN STUFF FLEW UP FOR CLUB
HAVE NOT FIGURED IT OUT FOR TUE SCYTHE
I Will ADD MOE WEAPONS IF I CAN THING OF THEM

RougeLike.nx | Open in app
2020-01-03 20:27
RougeLike.nx | Open in app
2020-01-03 15:35
RougeLike.nx | Open in app
2020-01-03 15:32
RougeLike.nx | Open in app
2020-01-02 20:26

G-9 2020-01-02 20:59

To random numbers, use RND(nb)

RND generates a number between 0 and nb .


Roger Davis 2020-01-03 02:06 (Edited)

GAMELEGEND, It might help US to help YOU, if we could see some graphics or level design, because without knowing how you want the gameplay to work, it's very difficult! Can you describe exactly how the gameplay is to be structured? Or show us a background image? 🤔 Preferably both! I know what the TYPE of game is that you're trying to make, but don't know how intricate you want it to be etc. 😊


was8bit 2020-01-03 08:20

Use R=RND(100)

10% chance... IF R<10 THEN
25% chance... IF R<25 THEN
50% chance... IF R<50 THEN


Timo 2020-01-03 17:08

Better use the TEXT command for texts on screen. That way you can show dynamic information like different names or numbers.


was8bit 2020-01-03 17:27

Page 4 of character set is reserved for the game font set... if you use all 4 pages for graphics, then you cannot use PRINT or TEXT.. leave page 4 blank to use the default font, or create your one font set on page 4

Assuming you only use pages 1,2,3, and leave character #0 empty as it is the empty space character, you have available

191 all 1x1 character graphics
47 all 2x2 character graphics
11 all 4x4 character graphics


GAMELEGEND 2020-01-03 17:28

Thanks timo i was going to use locate but then saw the comment and used text and saw that it was better


GAMELEGEND 2020-01-03 17:29

I was going to keep the font the same unless i came up with my on font that people can still read but looks better the the default font


Timo 2020-01-03 19:45

TEXT command is perfect to write to specific positions. PRINT is better if you want several lines of text, because it has an (invisible) cursor.


GAMELEGEND 2020-01-03 20:21

I have a question numbers in the hundreds dont fit in the rectangle in the middle and miss dosent fit either i was going to put a window but then a rembered that uses cell postion too is there somthing i can do with out making the window bigger and without making another font if there is not i will just make another font


Roger Davis 2020-01-03 21:33

GAMELEGEND, Glad to see you are receiving help now! I would have helped you myself, but I'm still only a beginner on NX. 😊


GAMELEGEND 2020-01-03 22:08

I am also a beginner


Roger Davis 2020-01-03 23:59 (Edited)

: ) Good! Then we're learning things together! : )


GAMELEGEND 2020-01-04 02:32

How do i accses sprite from other save slots do i have to use one of those memory commands or somthing


Roger Davis 2020-01-04 03:44 (Edited)

GAMELEGEND, To display a particular SPRITE, use the command SPRITE, n
Where n is equal to a number between 0 and 63. At least that's my understanding of it! There's more syntax required to position the SPRITE however. But I think you're already okay with that from what I've seen. 😊


was8bit 2020-01-04 06:32

Technically, sprites simply reference Character images... sprites do NOT directly hold or store any images themselves...

Also, unless you need your character images to move smoothly at the pixel level, it is best to just use the character directly by placing them on a background will CELL X,Y,Charnum


Timo 2020-01-04 07:01

Gamelegend, I think you mean other files / ROM entries. In this case I would advice not to use them for sprites if you are a beginner. Try to fit all images into the default file.

Otherwise yes, you would have to deal with low-level memory management and copy characters to video RAM.


was8bit 2020-01-04 07:02 (Edited)

Ok, so I remixed your code...

i have added a SUB which lets you assign a different palette to each row of images

I have also rearranged your player images so they may be easily retrieved in a set of x,y loops

I have also added a layer adjustment to center the player image (all of layer 0 is now adjusted by 4 pixels on the x-direction)

I have also added a "secret" memory trick that upgrades the helmet image in a few seconds ;)

... study the code... post any questions :)

... once you understand the memory trick, i will show you how to store and use extra player clothes in the other SAVE SLOT (now that i understand your question)

RougeLike (remix).nx | Open in app
2020-01-04 07:02

GAMELEGEND 2020-01-04 07:10

Timo how do i do that memory management because i knowfor sure there is to much in this game to fit them all into the default file or is there somthing better i can do


was8bit 2020-01-04 07:23

Here you go ;) see if you can figure it out ;)


was8bit 2020-01-04 07:28

The only thing to remember is that the game can only use one character set as stored in active memory $8000 ... by careful handling you can copy characters from any character save file .... you are still limited to only be able to use at one time the 256 characters stored at $8000....


GAMELEGEND 2020-01-04 07:30

So i guessing that put players in other rom entries is not a good idea but it still works


GAMELEGEND 2020-01-04 07:31

Right


was8bit 2020-01-04 07:36

IF you are understanding what i was doing, then i recommend using your default character set to set up your main game screen, leaving place holders for the changeable areas (like i did with nakey man)... then simply upgrade your graphic place holders as needed...


GAMELEGEND 2020-01-04 09:14

Timo i have a question did you make lowres using what did you use to make lowres i guessing it was BASIC or visual basic
I have another question why are there two lowres’s why not just update the first one was that not possible
And my third question for anyone are those 3d games in lowres really 3d or do they just look like that


was8bit 2020-01-04 09:57 (Edited)

I can field that (Timo can correct if i am abit off)

1) C. Language .... https://github.com/timoinutilis/lowres-nx/blob/master/core/core.c

2) although original lowres and lowres NX are similar in language, they are fundamentally different graphically speaking... you cannot do in one what you do in another....

3) simulated 3D.... if you have 3D lens glasses (the clear lense, not red-green) i can post a real 3d for you sometime :)


Timo 2020-01-04 15:17

About 3: There are different definitions what "real" 3D is and there are different ways of implementing 3D effects. Do you have an example, which 3D program would you want to know more about?


GAMELEGEND 2020-01-04 17:12 (Edited)

I think this might be obvious but just in case it was not i am probably going to have a lot of questions because i want to learn all i can about lowres things that are not in the help thing i usually look at the code from the people how know what there doing at play around with it which usually breaks it but i think it is better to ask the person question because they can tell me what all that stuff means


GAMELEGEND 2020-01-04 17:15 (Edited)

3d hallway simulation — was8bit it looks like 2d made to look like 3d but i i dont know if that is right
King maker 3 crowns — was8bit now this one looks like 3d becaise you are going around walls and corners i think this one is actually 3d


Timo 2020-01-04 17:36 (Edited)

It’s basically a 3D view of a 2D map. Usually this is not called real 3D because the “camera” cannot move freely with this system and walls and floors cannot have other shapes.


was8bit 2020-01-04 19:34

@gamelegend...

I appreciate the compliment :) but i have been spent years trying to emulate an existing game...

One of my old time favorits is this one... (i still have the originals)

https://m.youtube.com/watch?v=w9jcUTTm6RA

http://www.steverd.com/overintv/i-ad&dtr.jpg

The 3D effect is completely restricted and in no way real... my movement thru the halls is jerkier than the original, and i cut out all distant views and open rooms... this simplifies the arrangement of character cells to a very small set amount that takes minimal effort to change...

I am STILL not 100% satisfied with everything yet, but here and there i resolve a little something else, so i hope one day to get it all together into a game :)


was8bit 2020-01-04 19:42

Had you had the original lowres app, Timo made a real 3D maze driven by ray-tracing ... Timo probably still has the link to a good website that explains the math behind it, but pixel drawing for NX is not supported, can be done with tricks but probably not at the level to do a full graphic 3D... most likely could be done with in wire-frames, but this would limit its gaming potential...


GAMELEGEND 2020-01-05 20:02

How do i switch backgrounds


was8bit 2020-01-06 05:19

BG 1

Will set background 1 for all following commands like CELL CELL.C etc and is the lower or farther away level..

BG 0

Sets background 0 for all following commands, and is the top or closest level...


was8bit 2020-01-06 05:21 (Edited)

You may switch to either background as often as needed... in fact you need to be careful as calls to subs or labels may contain a background switch... its best to be organized so as to keep track what you want on each level and that your code keeps it that way


Timo 2020-01-06 06:37

BG command is for setting the current “layer”, but maybe you mean how to go to another screen of the game?


was8bit 2020-01-06 06:45

Ah... well if you design a different background save file, say file 7,use

BG SOURCE ROM(7)

Then

BG COPY 0,0,20,16 to 0,0

And background in file 7 will show up in the screen :)



To set it back to default file 3...

BG SOURCE ROM(3)


was8bit 2020-01-06 06:47

ROM(filenum) will point to the file number you want to use...

These are in the HELP file, but it tool me awhile to begin to feel comfortable using some of the commands :)


GAMELEGEND 2020-01-06 19:19

Does it have to be bg source rom(7) or is the or did you just type a random number


was8bit 2020-01-06 19:41 (Edited)

Just a random number... BUT take note of the default ROMS NX uses...

ROM 0 = secret default font (so you dont have to load a font, it auto loads the default font if you leave this rom empty)

ROM 1,2,3 used by PALETTES, CHARACTERS, BACKGROUND

ROM 15 used by MAIN SOUNDS

these are the default ones... so best not use these for something different..

This leaves ROM 4-14 open and free to use for anything :)

Be careful when loading and saving to different files, as if you make a mistake there is NO undo option!

... also, check out the memory map at the bottom of the HELP file, this shows where different things go as NX is running a game :)


GAMELEGEND 2020-01-06 21:51

Thank you timo and was8bit for helping i dont think i need your help anymore on this game but i might just incase i come up with somthing new maybe i dont know but i will atill have questions about lowres and i just thought pf a question are you thinking of updating lowres i dont know where i saw but it said that you would a a function one of those that make things easier like you did with the sprite n pal n size n instead of sprite.a but i may have been a dream or im going crazy i dont know


GAMELEGEND 2020-01-06 21:51

Thank you timo and was8bit for helping i dont think i need your help anymore on this game but i might just incase i come up with somthing new maybe i dont know but i will atill have questions about lowres and i just thought pf a question are you thinking of updating lowres i dont know where i saw but it said that you would a a function one of those that make things easier like you did with the sprite n pal n size n instead of sprite.a but i may have been a dream or im going crazy i dont know


GAMELEGEND 2020-01-06 21:52

Thats wierd there are tow if them


was8bit 2020-01-06 22:00 (Edited)

Yea, sprites take 2 statements to set them up..

SPRITE Sprnum,X,Y,Charnum
SPRITE Sprnum SIZE num PAL num FLIP fx,fy PRIO num

(On the second statement just use the parts you need, in any order)

It is important to note that priority is abit advanced and used for layering with backgrounds only... while sprites layer with each other based on sprite number, sprite 0 on top to sprite 63 on the bottom (always, regardless of prio setting)


GAMELEGEND 2020-01-06 22:56

No not that i was talking about my comment showed up twice


was8bit 2020-01-06 23:45

Sometimes posts can do that... no worries :)


Timo 2020-01-07 06:58

Just click on Edit next to the comment and on the next page on Delete.


GAMELEGEND 2020-01-14 00:54

Is there a efficient way of printing one character at a time


was8bit 2020-01-14 02:24

TEXT X,Y,"A"
CELL X,Y,1


GAMELEGEND 2020-02-21 20:43

How do i make cooldowns for a skill


was8bit 2020-02-22 06:27

cooldowns?


GAMELEGEND 2020-02-22 13:25

Yeah you use the skill and then it as a cooldown time before you can use it again


GAMELEGEND 2020-02-22 13:35

How to i get the sprite 2 to go on top of sprite 1 but still have it show sprite 1 when the part of sprite 1 is not covered up but the sprite 2 any more is it possible

RPG.nx | Open in app
2020-02-22 13:35

Timo 2020-02-22 13:43

Sprites with lower numbers are always on top of the ones with higher numbers, so you have to use numbers accord


GAMELEGEND 2020-02-22 13:49

Perfect that exactly what i want ed thank you i might have some more questions


was8bit 2020-02-22 15:18

SKILLTIME

You can time it with the main DO LOOP cycle:
... upon use, SKILLTIME=1000
... each DO LOOP if SKILLTIME>0 THEN DEC SKILLTIME
... when player attempts to use skill IF SKILLTIME=0 THEN use skill set timer up again

i have used 1000, but you can test the game and adjust the amount to what feels right :)

This also allow for special events to make skill available sooner.. so if player touches or picks something up, reset SKILLTIME=0 to immediately allow skill


Also change this variable name for the specific skill, like SONICTIME or HIKICKTIME


GAMELEGEND 2020-02-22 16:05

I have another question this one it does not make any sense i have done the inkey things before but now they are just not working i am doing it the way you are supposed to and i went to the help section and copied and pasted the inkey code and it still does not work it think a key was pressed when it never was ans i have done this stuff before it never did that


Timo 2020-02-22 16:26

Can you post your code here?


was8bit 2020-02-22 18:11

Does this help?

https://lowresnx.inutilis.com/topic.php?id=1027


GAMELEGEND 2020-02-23 03:36

KEYBOARD ON

DO
I$=INKEY$
IF I$<>"A" THEN PRINT "F"
WAIT VBL
LOOP


GAMELEGEND 2020-02-23 03:37

This is the way i have always done it


was8bit 2020-02-23 05:36

It's working... check out my variation...

When you are not typing "A" it prints a period... the instant you type an "A", it prints the "A"...

Inkey Test.nx | Open in app
2020-02-23 05:36

was8bit 2020-02-23 05:45

Here is a better variation....

Inkey Test2.nx | Open in app
2020-02-23 05:45

was8bit 2020-02-23 05:47

The second version prints "." when you type nothing (or when you type a period) and the instantly type something it prints it....


GAMELEGEND 2020-02-23 05:50

But why does it orint something when i never typed something it did not dot that in the past


GAMELEGEND 2020-02-23 05:54

never mind i was sbeing stupid


GAMELEGEND 2020-02-23 05:55

I was using not equeal to


GAMELEGEND 2020-02-23 05:55

Duh


GAMELEGEND 2020-02-23 05:55

It happens to the best of us


GAMELEGEND 2020-02-23 06:11

I could not find anything in the help section how do i use one subprogram twice ate the same time


GAMELEGEND 2020-02-23 06:11

KEYBOARD ON

SPRITE 1 SIZE 0 PAL 1
SPRITE 2 SIZE 0 PAL 2
SPRITE 3 SIZE 0 PAL 1

DO
SPRITE 2,50,50,1
SPRITE 3,70,50,2
I$ = INKEY$
IF I$ = "1" THEN CALL COOLDOWN(50,50,45)
IF I$ = "2" THEN CALL COOLDOWN(70,50,20)
LOOP

SUB COOLDOWN(X,Y,TIME)
FOR I = 17 TO 28
SPRITE 1,X,Y,I
WAIT TIME
NEXT I
END SUB


#1:MAIN PALETTES
053F2F00003F302A003F2A30003F3C00
003F2A15003F2A15003F2A15003F2A15

#2:MAIN CHARACTERS
00000000000000000000000000000000
FFC1E181858F87FF0040603018000000
FF818181818181FF0018187E7E181800
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
007E7E7E7E7E7E00007E7E7E7E7E7E00
00767E7E7E7E7E0000767E7E7E7E7E00
007072767E7E7E00007072767E7E7E00
007070707E7E7E00007070707E7E7E00
00707070787C7E0000707070787C7E00
00707070787878000070707078787800
00707070707070000070707070707000
00707070706040000070707070604000
00707070700000000070707070000000
00707030100000000070703010000000
00101010100000000010101010000000


was8bit 2020-02-23 06:54

Your timing is not set up correctly... you MUST keep your main DO LOOP running... and use WAIT VBL... this ensures your DO LOOP runs at a time of 1/60 of a second per loop, or 60 loops (game frames) per second...

what you have is NO wait in your main DO LOOP, and your sub locks out all other code until the loop inside the sub is done...

What you NEED is much more complicated...

FIRST, run what i have attached and verify it is doing what you wanted..

THEN, you can look at the code... what i have have done is....

1) set up a frame index for each one
2) set up a timing index for each one
3) set up a timeout (duration amount) that controls the timing index
4) set up a BEGIN and END for frame control

Cooldown Fixed.nx | Open in app
2020-02-23 06:54

was8bit 2020-02-23 06:58

Also, you need seperate animation sprites for each one, i have renumbered them, so animation sprite 1 is for icon 11 and animation sprite 2 is for icon 12... this allows for expansion so animation sprites 1,2,3,4,5... match up with icon sprites 11,12,13,14,15... they go together so it doesnt get too confusing...


GAMELEGEND 2020-02-23 14:49

i understand everything except what is this expansion thing you are talking about


was8bit 2020-02-23 18:22 (Edited)

Oh, i meant the sprite numbers... you originally had only one sprite for the cooldown animation and you needed 2, you NEED your cooldown animation sprite #'s to be SMALLER than your skill sprite #'s so they show on top ...

I like a little organization of sprite #'s so as not to get confused and to allow for expansion, or what i mean, so you can add more without changing the math used to organize your sprite #'s

So, for any skill#, cooldownSprite#=skill# and skillSprite#=skill#+10

So, skill 1, its sprite# is 11 and its cooldown animation sprite# is 1
If you wanted up to 5 skills, skill 5 sprite# would be 15 and its cooldown animation sprite # would be 5

Using a math "formula" for numbering your sprites also allows the possibility to use a loop to process them if you want... although currently with just 2 skills not really needed

FOR I=1 TO 5
rem skillnum=I
rem skill spritenum=I+10
rem animation spritenum=I
rem code to process things
NEXT I

If you ever only wanted 2 skills, this whole concept isn't neccessary.... however i have "hacked" in a few odd #'s, wrote a program, then later decided to add more sprites,,hacked in odd random sprite #'s.... things started messing up because I started getting my sprite numbers confused and wrong... :/

.... a little organization up front ALWAYS helps in the end ;)


was8bit 2020-02-23 18:27

Also, In the event your skills "upgrade" and require a new icon to represent the upgrade, you would KNOW that the Sprite# would be skill#+10 so upgrading the skill icon for skill 5 would change the image for sprite 15....


GAMELEGEND 2020-02-24 17:16

Is there a way to make sure people do not go into the code and give them selves what ever they want


Timo 2020-02-24 17:18 (Edited)

No, all code is always available. I like it this way so you can see how things are made. No plans to change it. If people really want to cheat, just let them :)


GAMELEGEND 2020-02-24 17:20

That was a really quick response do you get like notification when someone put something in to the comments


GAMELEGEND 2020-02-24 17:21

One more queston there are no booleans are there i just have to use 1s and 0s right


Timo 2020-02-24 19:48

No special notifications, sometimes I just reload the page quite often ;)
Correct, there aren’t booleans here, but numbers work the same. To be 100% correct you could use -1 (negative) for true in BASIC, but most times 1 (positive) works as well.
-1 in binary has all bits set.


was8bit 2020-02-24 20:00

It is considered a polite courtesy to ask permision to use someone else code and then give them credit for their code (or graphics or song)... there are a few instances where i have done that...

Or, one may "remix" someones program (with asked permision would be nice) where you made changes or variations to the original, being sure to mention whose work you remixed...

Most folk here are reasonably polite and respectful with other people's work ...

Everything you make for your NX game is mostly going to stay here... NX resources are specifically designed to be used by NX, and will not port to other systems easily...


GAMELEGEND 2020-02-24 22:48

Just to let you know in advance i might have question(s) about my SKILLREADY array but i think i am figuring it out


GAMELEGEND 2020-02-24 22:55

I have a question about lowres is it like basic just with extra keywords or are there other differences


GAMELEGEND 2020-02-24 23:25

Because you made lowres i have a question one day i was going to create a program like lowres to make old retro games came up with this idea a long time ago what language do you suggest i write the program in


GAMELEGEND 2020-02-24 23:25 (Edited)

Or does it not matter what language i use


was8bit 2020-02-24 23:51

LowresNX has basic logic, but also has NX specific commands...

For writting lowres games, stick the lowres code :)


GAMELEGEND 2020-02-25 00:03

I did jot think there were programs like lowres were you make retro games until i found lowres


GAMELEGEND 2020-02-25 00:20

I was thinking about making it 16 bit games


GAMELEGEND 2020-02-25 00:36

Okay i need some help i got close to figuring it out but i have not figured the whole thing out i have the ELSE IF SKILLREADY(1) = 0 THEN
PRINT “SKILL 1 NOT READY”
skillready(1) turns from a 1 to a 0 and the skill does not activate when skillready(1) = 0 it is doing what it is supposed to do kindof the only thing it is not doing is it is not printing SKILL 1 NOT READY and if you are wondering why it is else if and not else is because i am going to be doing stuff with mana thankyou in adavance if you can figure it out


GAMELEGEND 2020-02-25 00:38

And i also took out the else if and made it its own if statement i did not think that was going to do anything but i have tried lots of other things so i said oh what the heck and it still did not work


GAMELEGEND 2020-02-25 00:39 (Edited)

And it and when i change skillready(1) back into a 1 it still prints skill 1 not ready the part where it changes it back is not in the code because i could not figure out where i am supposed to put it i have tried all the places that might of made sense

KEYBOARD ON


SPRITE 1 SIZE 0 PAL 1
SPRITE 2 SIZE 0 PAL 1
SPRITE 3 SIZE 0 PAL 1
SPRITE 4 SIZE 0 PAL 1
SPRITE 5 SIZE 0 PAL 1
SPRITE 11 SIZE 0 PAL 1
SPRITE 12 SIZE 0 PAL 2
SPRITE 13 SIZE 0 PAL 2
SPRITE 14 SIZE 0 PAL 3
SPRITE 15 SIZE 0 PAL 4

DIM GLOBAL IFRAME(5),ITIME(5),DTIME(5),XTIME(5),YTIME(5),SKILLREADY(5)

A = 1
FOR I = 45 TO 105 STEP 15
XTIME(A) = I
INC A
NEXT I

FOR I = 1 TO 5
YTIME(I) = 110
NEXT I

FOR I = 1 TO 5
SKILLREADY(I) = 1
NEXT I

SPRITE 11,45,110,1
SPRITE 12,60,110,2
SPRITE 13,75,110,3
SPRITE 14,90,110,4
SPRITE 15,105,110,5

DO
I$ = INKEY$
IF I$="1" THEN
IF SKILLREADY(1) = 1 THEN
CALL STARTCOOLDOWN(1,25)
SKILLREADY(1) = 0
ELSE IF SKILLREADY(1) = 0 THEN
PRINT "SKILL 1 NOT READY"
END IF
END IF
IF I$="2" THEN
CALL STARTCOOLDOWN(2,25)
END IF
IF I$="3" THEN
CALL STARTCOOLDOWN(3,25)
END IF
IF I$="4" THEN
CALL STARTCOOLDOWN(4,25)
END IF
IF I$="5" THEN
CALL STARTCOOLDOWN(5,25)
END IF

CALL COOLDOWN(1)
CALL COOLDOWN(2)
CALL COOLDOWN(3)
CALL COOLDOWN(4)
CALL COOLDOWN(5)

WAIT VBL
LOOP

SUB COOLDOWN(I)
IF IFRAME(I)>0 THEN
SPRITE I,XTIME(I),YTIME(I),IFRAME(I)+16
INC ITIME(I)
IF ITIME(I)>=DTIME(I) THEN
ITIME(I)=0
INC IFRAME(I)
IF IFRAME(I)=12 THEN
IFRAME(I)=0
SPRITE I,XTIME(I),YTIME(I),0
END IF
END IF
END IF
END SUB

SUB STARTCOOLDOWN(I,D)
IF IFRAME(I)=0 THEN
IFRAME(I)=1
ITIME(I)=0
DTIME(I)=D
END IF
END SUB




#1:MAIN PALETTES
053F2F00003F302A003F2A24003F3903
003F0C14003F2A15003F2A15003F2A15

#2:MAIN CHARACTERS
00000000000000000000000000000000
FFC1E181858F87FF0040603018000000
FFC1E1E5E7E5E1FF0040606078606000
FFF1F1D1D1FDFFFF00500070707C7E00
FF818181BD8181FF0000003C5A3C0000
FF99BDA5BDA5BDFF00003C3C243C3C00
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
007E7E7E7E7E7E00007E7E7E7E7E7E00
00767E7E7E7E7E0000767E7E7E7E7E00
007072767E7E7E00007072767E7E7E00
007070707E7E7E00007070707E7E7E00
00707070787C7E0000707070787C7E00
00707070787878000070707078787800
00707070707070000070707070707000
00707070706040000070707070604000
00707070700000000070707070000000
00707030100000000070703010000000
00101010100000000010101010000000


GAMELEGEND 2020-02-25 00:59 (Edited)

I have even tried to put the SKILLREADY(I) = 1 in places that dont make any sense just to see what whould happen


was8bit 2020-02-25 02:04

I apologize, i didn't clarify an important point... i often use "tricks" of using certain values of certain variables to mean certain things...

In this case...

IF IFRAME(I)=0 THEN

Is a "trick" that when a skill is ready to use, IFRAME=0, as IFRAME controls what timer image to display, and IFRAME=0 means no timer image shown

When the skill is used, the cooldown timer images begin to show, starting with frame 1, or IFRAME=1... there are 11 total frames, so when IFRAME=12 this signals that the cooldown is over, so...

IF IFRAME(I)=12 THEN
IFRAME(I)=0
SPRITE I,XTIME(I),YTIME(I),0
END IF

Which resets IFRAME=0 as well as resets the image for the timing sprite to blank (char#0)

Check out the attached program, i have added texts with status info :)

Cooldown5.nx | Open in app
2020-02-25 02:04

GAMELEGEND 2020-02-25 02:56 (Edited)

I thought the i frame was JUST for the 11 frames in the timer animation


GAMELEGEND 2020-02-25 02:57

That makes sense


GAMELEGEND 2020-02-25 02:59

Thats pretty smart using those “tricks.


GAMELEGEND 2020-02-25 02:59

Thats pretty smart using those “tricks.


GAMELEGEND 2020-02-25 03:01 (Edited)

This question is for all those who helped because you helped me with the game do you want to be put into the very short credits at the beginning of the game and is there some kind of logo you people have that i can also put in the credits if i have enough room in the character designer


was8bit 2020-02-25 03:20

You could put that "was8bit helped with the cooldown codes" it was your vision, i just helped abit ;)

I have great confidence in your game vision :D I can do codes, but it takes creativity I
lack to create cools games... my best games are either pure accident or mimicking existing games ...


GAMELEGEND 2020-02-25 03:37

Those skill things were for a different game with i come up with ideas for this game for some reason making the some type of game gives me ideas for the game before it


was8bit 2020-02-25 04:04

I know whatcha mean... i get ideas from my stuff and from everyone else :)


GAMELEGEND 2020-02-26 03:09 (Edited)

I have a question for timo there is the ADD keyword but there is nothing for subtracting is that becuase there is already a SUB keyword or some other reason


Timo 2020-02-26 06:47

You can ADD negative numbers to subtract. SUB is something different (subprograms).


was8bit 2020-02-26 07:02

The "add" amound can be decimal also...(albeit with tiny little issues) ... try this code...

I=0
IADD=-0.1
DO
ADD I,IADD,0 TO 2.5
PRINT I
WAIT 15
LOOP


was8bit 2020-02-26 07:03

Also if you just want to increase or decrease by 1 you can try INC DEC commands :)


GAMELEGEND 2020-02-26 12:36

I have no idea why i did nit think about the negative numbers


GAMELEGEND 2020-02-27 23:00

I need a bit of help


GAMELEGEND 2020-02-27 23:29 (Edited)

CURRENTMANA is suppose to get subtracted by MANAUASAGE(some number) but
CURRENTMANA get subtracted even when the skill is on cooldown i cant figure out were to put the code for the subtraction and put it in the place that is used so you cant use the skill when it was on cooldown but it did not work

RPG(NAME ?).nx | Open in app
2020-02-27 23:32

was8bit 2020-02-28 04:52 (Edited)

Not sure i understand, but i fixed your code as you left a DO LOOP in the SUB Which got your program stuck there... you really should stick to one main DO LOOP and if you use others remember that your program can get stuck there...

Also, remember

IF IFRAME(I) = 0 means if skill I is ready to use
IF IFRAME(I)<>0 means that skill I is on cooldown....

RPG(NAME ?)2.nx | Open in app
2020-02-28 04:52

GAMELEGEND 2020-02-28 14:16 (Edited)

i will remember that

so was the only problem was me having two do loops being used at the same time or were there other problems


GAMELEGEND 2020-02-28 14:19 (Edited)

have you used two do loops and make it work or did it get stuck


was8bit 2020-02-28 16:38 (Edited)

It will the way you used them... Your first DO LOOP called a sub... the sub had a DO LOOP... i don't recommend you use a DO LOOP in the sub, as you had it, the program would NEVER exit the sub...

I HAVE used more than 1 DO LOOP but it is rare.. usually I use one main DO LOOP with one WAIT VBL which helps provide code that runs at a speed of 1/60 a second for smooth animation :)


GAMELEGEND 2020-02-28 17:03

I have no idea why i kept the do loop in the skillcall sun


was8bit 2020-02-28 18:05 (Edited)

Anytime my code is behaving odd and i cannot figure out why, one trick is to add SOUND 0,40,15 SOUND 1,50,15 SOUND 2,60,15 SOUND 3,70,15 or variations of such in different places so i can HEAR where my program is going and how often...

Also, can add TRACE variablename, then run the program, hit the upper right corner, and select DEBUG MODE, and it will let see your variable value in real time (assuming code reaches the TRACE command)

I have been having trouble with my LUCK CHANCE FATE game, getting it to recognize a winning board... since there are thousands of possible winning boards, it isnt easy, and it was getting stuck in a WHILE WEND loop, and i have like a ton of things going on in that loop but didnt know which stuff was messing up... my SOUND trick helped me figure out WHERE and i eventually tinkered with the code until it worked :)

The code still doesnt cover ALL winning combinations yet, but at least what i have doesnt mess up anymore ;)


Log in to reply.