Collaboration

NX Coding Events

5

SP4CEBAR 2021-06-02 08:47

Wouldn't it be cool if we organized some coding events
Like a gamejam or to make a program as a group:
So one could start writing a program for like 10 minutes (or something like 30 lines)
And then someone else could work 10 more minutes on that program
And then someone else works on that program for 10 more minutes
And so on


G-9 2021-06-02 10:49

Very nice idea but 10minutes is… why not 1 hour :3 ?


was8bit 2021-06-02 14:10

Well, i kinda have a "loose" version of that via remixing.... in orginal lowres, remixing was rather popular.. not done so much here for some reason....


crosoft312 2021-06-02 17:22

That's a great idea! I think it should last an hour or a day, so everyone has time to see it. We could also have a voting system, if you want.


SP4CEBAR 2021-06-02 20:50

it could also be an hour, by keeping the time shorter we won't be spending a lot of time and effort into it, and then it's more like adding little features


SP4CEBAR 2021-06-02 20:51 (Edited)

Another option would be to have be 50 lines of code each turn


SP4CEBAR 2021-06-02 21:11 (Edited)

Does anyone have an idea for some cool games we could make?


crosoft312 2021-06-02 21:48 (Edited)

Well if we only have an hour, we should probably go with simple games: pong, invaders, breakout, text adventures, etc...

Also you could tell everyone to make a specific game, and we could vote on who implemented the best version.

What do you think?


G-9 2021-06-03 10:29

strawpoll.me
Best choice
Or we could make a website with some php
I found an interesting free web host that put a very tiny ad, its freewha.com.
I tried it, it’s the best one :3


SP4CEBAR 2021-06-03 10:40

@crosoft312 you mean like a gamejam


SP4CEBAR 2021-06-03 10:43

@G-9 That's awesome!
I've tried a few free hosting sites without ads before, and they either didn't work very well or they were like a demo version of a paid hosting plan


CubicleHead 2021-06-03 13:09

This sounds cool (☆_☆)


Timo 2021-06-03 15:16

You could host a jam on itch.io


G-9 2021-06-03 15:47

Yes,but itch.io is too professional and stuff :)


G-9 2021-06-03 15:48

Or we could just make a new topic type : Challenge
Then it I’ll be ok


Timo 2021-06-03 16:37

You could use the "Collaboration" topic for it.


SP4CEBAR 2021-06-03 18:35 (Edited)

It started as an idea, that's why I chose "discussion" first, I changed it now


was8bit 2021-06-04 04:04 (Edited)

I like the title :)


G-9 2021-06-04 13:00 (Edited)

So what would be the coding event subject :3 ?

I’m so hyped 🤩


SP4CEBAR 2021-06-04 18:49 (Edited)

We could make a platformer (or another type of game)


SP4CEBAR 2021-06-04 18:50 (Edited)

Who wants to take the first turn?


Dan 2021-06-05 07:53

I'm going to post something in about a hour.


Dan 2021-06-05 10:55 (Edited)

Here it is.
A cell based platformer.

What is working: Player movement left, right, falling down and cell collision.

Sprites and bg tiles are only drawn to test the collision.

Things to decide:

What should the game do or be.

Things to add (suggestion):

A game-name !
sound music
bg-graphics
Sprite graphics
Intro screen
main screen
options menue
end-screen
hi-score screen ?
Levels/level maps

and of course the missing code for the enemies/traps/npcs/Player jumping or
climbing?!.

Hmm, if more ppl are working on the same code, then there is a chance that two or more ppl are doing the same thing.
Like drawing the main chars, or drawing the backgrounds etc...

How can this be avoided ? Or should it ?

I think, the best way to proceed, is to look at the code, see what you can do
and post about what you want to do.

Then when you're done, post your code so that other can continue.

What do you think ??!

P.S. for the next one who is doing the program: please remove Dan from the "Music by" rem - section.

P.P.S the main char is jumping over 1 gap of cells, to avoid this, the x size can be set to 7. (he will eventually fall down, but the placing has to be perfect)

P.P.P.S: the line

IF ACTORS(ACT,ACT_CPU)=0 THEN CALL MAINSPRITE(X, Y, ACTORS(ACT,ACT_DIR), ACTORS(ACT,ACT_ANIM), ACTORS(ACT,ACT_FLIP))

Should be changed into:

IF ACT=1 THEN CALL MAINSPRITE(X, Y, ACTORS(ACT,ACT_DIR), ACTORS(ACT,ACT_ANIM), ACTORS(ACT,ACT_FLIP))

Platformer.nx | Open in app
2021-06-05 10:55

CubicleHead 2021-06-05 16:51

That's cool! It seems a little complex to me but idk much about nx


SP4CEBAR 2021-06-05 18:58

Awesome!


Dan 2021-06-06 06:15 (Edited)

Well, the complexity is only because i wanted to add flexibility.

I'm using an array instead of variables. (and that makes it look complicated, but it, actually, isn't)

I thought, if a player has gravity in this game, then if a monster is moving and can fall off the edge of a platform, just like the player does, then the code could be reused.

The code is from this post (see my answer there):
https://lowresnx.inutilis.com/topic.php?id=1921
but expanded for the player to have gravity. if player is falling then it does not move left or right.

The code for the monsters, or maybe if you want to add a second player should be easy to do.

p.s.
By the thought of a second played, i have had an idea to test it and the attached program is the result.
Notice that i have made only minor modification, and now 10 chars are controllable.

(NX-Lemmings anyone ?) :)


G-9 2021-06-06 07:24

:3


G-9 2021-06-06 11:21 (Edited)

So subject is platforrmer..
I think I have an idea


G-9 2021-06-06 11:59 (Edited)

I have made something unexpected, but very fun and also I’ve made my platform engine very quickly !!

Note it’s not finished, I’m just gonna take a break B)

Test.nx | Open in app
2021-06-06 11:59

CubicleHead 2021-06-06 13:07

@G-9 very cool! But unless you REM out CELL(48+SCROLL.X(0))/8,(Y/8),1 the collision in front doesn't work right


CubicleHead 2021-06-06 13:09

@Dan thx for explaining it to me :) I have a very hard time understanding arrays in lowres for some reason :(


Timo 2021-06-06 13:54

CubicleHead, did you read my tutorial? It also explains arrays.

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


G-9 2021-06-06 14:13 (Edited)

@CubicleHead I know, it’s just for fun purposes :3

Edit : polished a bit… mobile gamers should recognise a bit the game
Edit : my game is running pretty good rn it looks like it’s almost finished (but it isn’t because I will have to reproduce the whole gravity system for blocks and more)
Edit : omg almost playable

Test.nx | Open in app
2021-06-06 14:47
Test.nx | Open in app
2021-06-06 14:30
Test.nx | Open in app
2021-06-06 14:21

G-9 2021-06-06 14:32

Hi @Dan, I can help you for gfx and menu/his core screen sprite animation game over screen :3


G-9 2021-06-06 15:36 (Edited)

Time’s up !!
I’m gonna let this here and update it to post it in programs.
I enjoyed so much coding this in 1 hour !!

Block Run.nx | Open in app
2021-06-06 15:36

Dan 2021-06-06 16:13 (Edited)

Quote: @Dan thx for explaining it to me :) I have a very hard time understanding arrays

yeah, np, arrays are difficult to grasp at first. It was the same here, when i begun with the programming.

But, the more you work with them, the more understanding you will get.
They can simplify programming things a lot.

Let me tell you that Lowres Arrays, because they are based on basic language, are very easy.
I have tried to make an array in lua. (pico 8). well 1 dimensional is np.
But two ... ouch ... ;)


CubicleHead 2021-06-06 18:46

@Timo oh thx for showing me that. I've seen that that post was there but I thought I knew enough basic, I didn't realize it talks about arrays :D


CubicleHead 2021-06-06 18:56

I read the tutorial and it makes SO much more sense now! Thx


SP4CEBAR 2021-06-10 11:53

I'll take my turn now, I think I'm going to add items, which the player can pick up and use


SP4CEBAR 2021-06-10 13:44

Here it is

Platformer.nx | Open in app
2021-06-10 13:44

SP4CEBAR 2021-06-10 14:00 (Edited)

It I took 1 hour and 50 min for me to finish it, because I had a bug that was hard to find, and I spent like 30 minutes writing comments...
Maybe the one-hour limit wasn't too great of an idea...

I've added 6 items, a sword, armor, a shield, a power-up, a jetpack, and a player-clone thing. The sword has a swing animation character, but I didn't have enough time to write item-usage code
There are twelve item sprites, sprites 10 to 15 are items that are in the map which the user can pick-up, 16-21 are items that are equipped by the player. I had to separate them to keep SPRITE HIT from detecting an equipped item as an item to pick-up
The items that are picked up by the player are currently under the player sprite, although they should be on top of it. So the player-sprite number (which is 1) should be replaced with a higher sprite number (22 or more). I also added a table array that defines the offsets for each of the equipped item sprites, I didn't define those offsets yet.

I've added laser characters that could be placed inside the map, code will detect them and turn them on or off depending on a timer or a button that could be pressed by a player. The lasers can be animated by repeatedly flipping them vertically, I didn't have enough time to write the code for the lasers.


Dan 2021-06-10 17:32

This week was a bit too busy for me.
I guess i'll go back to coding sat/sunday.


SP4CEBAR 2021-06-10 19:56

Okay, good luck


SP4CEBAR 2021-06-10 20:05 (Edited)

Should we change the one hour limit to two hours or a day or something like that?
I don't want it to be a hard deadline, so we could do a two day limit, but with an advice to keep the amount of work low enough to fit in two hours or less.
10 minutes is also fine: any contribution is helpful!


G-9 2021-06-11 14:47

Is it a game jam or program in group ??


SP4CEBAR 2021-06-11 15:04

It's a program in group


G-9 2021-06-11 16:43

Ohhh rip my game … ;(


SP4CEBAR 2021-06-11 19:49 (Edited)

It's impressive that you made that within an hour


SP4CEBAR 2021-06-11 20:21

Oops, I somehow assumed everyone chose the second idea


SP4CEBAR 2021-06-11 20:31 (Edited)

I think when the 10 minutes were mentioned I assumed you were talking about the second idea
I'm sorry for not being too clear in my first explanation
Should we still do a gamejam?


SP4CEBAR 2021-06-11 22:00 (Edited)

I just finished the item system I added previously

Platformer.nx | Open in app
2021-06-11 22:00

SP4CEBAR 2021-06-11 22:15

I didn't yet write the code to use the items (like swing the sword, or duplicate the character)


SP4CEBAR 2021-06-11 22:35 (Edited)

I changed the sprite number of the main character from 1 to 30


Dan 2021-06-12 15:01 (Edited)

For me the group coding sounds nice.

It is a bit different than solo-coding, which a coding jam, in its essence, is.

I guess a 1 1/2 hours should be enough. But we are not in a hurry.

10 minutes are too short. I mean: you still need to think into the previous coder programming style.
To see why did he do or why .. to understand it, then you need a bit of time to get an idea for improvement. And for debugging.
(somehow, when i want to release a game,tool or sourcecode, there is a LastMinute Bug. Something overlooked which i noticed either just before releasing it, or a minute after ;) ).


We still can start a gamejam (some day), but, in my opinion, we have to agree on few things.

Like:

1) what type of Jam should it be.

Duration: - 1 hour, 5 hours, 1 day or few days ?
Jam Type: Tool, game, demo ?

Pedefined assets or not ? Reusing old code allowed or not ?

And most important of all is: Participants.

To determine how many ppl want to participate is important (i think).
A GameJam with only 1 entry is somewhat ...

For a 1 hour timed jam, the starting time should be right. If you say it should start at 5pm, then it is fine.

But ...

I'm living in Germany, if you live in GB, then your 5pm is my 6pm ...
The problem: In 1h scenario: I would submit my sourcecode when you start doing yours.

Then when all is set, someone, who will be the GameJam judge, should announce, 10 minutes before the gamejam time, the conditions of the jam.

Then the winning conditions should be considered. (to let ppl vote for the best, or should the judge decide, who won)


Dan 2021-06-12 20:48 (Edited)

This was an exercise in patience :)

I tried to rewrite the platformer code, until i finally gave up and took someone else's code (credits: see remarks)

Currently the jumping/falling down/moving is well tuned.

The array-complexity was removed and replaced by a single-variable based movement.

I have added level support (note, changing levels needs to be tested, it is not implemented atm).

Levels can be drawn in code.

Sidenote: This mod, including rewriting, playtesting and dinner took about 3+ hours ...

Small Update Bugfix: The level data contains all 15 lines.
P.s. do not let the main char go offscreen, currently it will bug-out by falling down and accelerating forever.


SP4CEBAR 2021-06-12 21:52

Thanks for your hard work


G-9 2021-06-13 06:50 (Edited)

Whoa nice !! I think it could be my turn now :3

EDIT: What would be the thing to do to finish level ?


Dan 2021-06-13 07:34

Good question. Currently there is only item picking up going on.

Here are few ideas:

We could, eventually, add spawning coins, which the player needs to pick up ?

Like there is a coin, when picked up will disappear, and after a short time (like 5 seconds) another coin may spawn at a random (maybe different place) ?

The spawning points can be either random or predefined - like 6~10 places (which would make it easier to skip the already spawned place)

We could make it so, that after certain amount of time, the exit opens up, and the player needs to reach it ?

As the main char is picking up items and wearing it, maybe we could add an enemy, which would need that type of armor or weapon, to be passed by ?


G-9 2021-06-13 10:46 (Edited)

Here we go :3 I used this : https://lowresnx.inutilis.com/topic.php?id=1957

Change log in program :3


G-9 2021-06-13 10:47

58 replies 😂


SP4CEBAR 2021-06-13 12:04

Nice


SP4CEBAR 2021-06-13 12:23

I found a bug: after falling the player can get a little bit stuck inside a platform
This only seems to happen with the platform in the middle


Dan 2021-06-13 16:34

Ok new version:

Changes:

Items now spawn within the map and not on the tiles.
Gravity (falling speed is limited.)
Didn't expand the map to 16 cells, the last row is reserved for Score/lives or any other display.

Player can't go offscreen now.

Quote:
"
I found a bug: after falling the player can get a little bit stuck inside a platform
This only seems to happen with the platform in the middle
"

This is probably due to the floating point numbers.
Adjusting the gravity/jumping speed can help.
But maybe it is fixed now. More testing is needed.


G-9 2021-06-13 16:53

I’ve got a crazy idea : random maps ?
sus


G-9 2021-06-13 17:34 (Edited)

Helo again :3
I did some updates, adding two labels:
Reset:
Died:
Reset resets the game, Died resets the game but not the level.
Placed arrays initialisation atop,
Added a new element, « x », that are spikes .
Added a little animation for the sword .
Added score and lives

Damn it starts to look like a real game !!

ÉDIT fixed error
Known issues : stuck in the ground, item spawning atop spikes, that made them unreachable


Dan 2021-06-13 17:34

Random maps ? Like random tiles on the map ?
Maybe if we find a way to avoid dead ends.

Anyway, i have got an idea to make map-shuffle. It's just an idea, in case we need more maps and variety ...

The idea is to split the map in 4 square pieces.
Draw a part of the level on each piece.
Draw for each part about 5 maps.

Stick random pieces as one whole map.

Tadaa.

Well, lets see later, depending on the token number ;)


G-9 2021-06-13 17:41

Why not ? Let’s try first to polish our code and finish game core.
Then we will see ;)
Also, we should think for a game name !


SP4CEBAR 2021-06-14 09:26 (Edited)

We could make the items part of the map: before I made them to use sprites, even though they don't move, this is a bit inefficient.
Also, I think items are pretty much part of a map: for example the player may need to cross a parcours to be able to reach some special items
Also, we could add keys


SP4CEBAR 2021-06-14 12:44 (Edited)

After three hours of work, here's a new version


SP4CEBAR 2021-06-14 12:45 (Edited)

The items are now inside the map-data, and I've added lasers, which are also inside the map-data, so you can design maps with lasers and items in them


SP4CEBAR 2021-06-14 13:00

I fixed a potential bug: I used char 15 as an empty char for the lasers


G-9 2021-06-14 15:21 (Edited)

What is the difference between COL1 and COL2 @Dan ?
Very cool @spaceb4r


SP4CEBAR 2021-06-14 15:55 (Edited)

@G-9 thanks
This piece of code (from the game) may answer your question:
CALL MAP(ACT_X+ACT_DX,ACT_Y+ACT_DY,COL1)
CALL MAP(ACT_X+ACT_DX+ACT_SX,ACT_Y+ACT_DY,COL2)
CALL MAP(ACT_X+ACT_DX,ACT_Y+ACT_DY+ACT_SY,COL3)
CALL MAP(ACT_X+ACT_DX+ACT_SX,ACT_Y+ACT_DY+ACT_SY,COL4)

So, for Col1 the sub "map" receives
X=ACT_X+ACT_DX
Y=ACT_Y+ACT_DY
And it returns Col1

for Col2 the sub "map" receives
X=ACT_X+ACT_DX+ACT_SX
Y=ACT_Y+ACT_DY
And it returns Col2

for Col2 the sub "map" receives
X=ACT_X+ACT_DX
Y=ACT_Y+ACT_DY+ACT_SY
And it returns Col3

And for Col2 the sub "map" receives
X=ACT_X+ACT_DX+ACT_SX
Y=ACT_Y+ACT_DY+ACT_SY
And it returns Col4

SX and SY are the player size and they are both 7
And ACT_X+ACT_DX and ACT_Y+ACT_DY is the pixel the player wants to go to
Each of the four collision variables are the corners of the square hitbox of the player


Dan 2021-06-14 16:21 (Edited)

simple answer: the col1,2,3 and 4 are holding the collision checks for the 4 corner of the main sprite.

SPACEBAR:
It looks great !


Dan 2021-06-14 16:45 (Edited)

I made only a small addition:

Player positioning is in the map data as well, using @ char.

Edit: Just noticed that the explanation for the @ char is in the "not implemented yet" section.


SP4CEBAR 2021-06-14 18:15

@Dan thanks


SP4CEBAR 2021-06-14 18:21 (Edited)

Since the lasers refresh their random state every second, the player can avoid them
Currently the lasers do nothing (I forgot to make them lethal to the player)

Also, we could easily add jetpack sounds (noise)


G-9 2021-06-15 05:47

@Spacebar The death goto that I’ve made works, but you still need to decrease lives and check if lives are not 0. If they are, goto reset :3
Sounds: same for weapons , but consider not using a music file for that. Gosub should be okay


G-9 2021-06-15 05:47

@Spacebar The death goto that I’ve made works, but you still need to decrease lives and check if lives are not 0. If they are, goto reset :3
Sounds: same for weapons , but consider not using a music file for that. Gosub should be okay


G-9 2021-06-15 05:48

Whoa duplicated message


SP4CEBAR 2021-06-15 10:30 (Edited)

I added jetpack sounds, made the lasers lethal, fixed the swampy-ground bug, and enhanced the sword animation


SP4CEBAR 2021-06-15 10:55 (Edited)

I fixed the sword:
- I forgot to add flip to the animation when the character flips
- I've used button tap and a timer system to make the attack duration last 4 frames


SP4CEBAR 2021-06-15 11:04

There are still two bugs:
- The sword animation doesn't work when the player is wearing armor or a jetpack
- when flying up with the jetpack, you can go one pixel trough the ceiling, which I did so that you can still fit trough 1-block spaces, but in the case of the jetpack, it makes you unable to move


G-9 2021-06-15 14:29

I spent most of my hour understanding your brand new system :3
I added a lil sound for sword 🗡
Updated level 2 to use lasers and no random items


SP4CEBAR 2021-06-15 15:48

Nice


SP4CEBAR 2021-06-15 15:52 (Edited)

I think we need something that'll work as a gate towards the next level
We could do a corridor at the end, or a door, or one or more locked door(s) with keys, or we could do a portal that may need to be activated


SP4CEBAR 2021-06-15 15:54

I think level 1 is too hard for a first level
I placed the four lasers for testing, so that I could see all four types, but we could (re)move some of them now


SP4CEBAR 2021-06-15 16:03 (Edited)

I noted a problem with level 2, but it can easily be fixed by replacing the line
DIM GLOBAL LASERS(3,2)
with
DIM GLOBAL LASERS(7,2)


SP4CEBAR 2021-06-15 16:08 (Edited)

I may have an idea for a name: "Stickman Trials"
Does that sound good?


G-9 2021-06-15 17:04

Why stickman lol
Also what are trials

The game name must includes « Dungeon » !! :3


SP4CEBAR 2021-06-15 17:23 (Edited)

The character looks like a stickman
A trial is something that's hard, in this case it's something where the skill of the player is put to test


Dan 2021-06-16 14:33

How about: Stickman's Dungeon Challenges ?


G-9 2021-06-16 15:00

Ye very nice 👍
But still a question ; what will make the player go to the next level ???


Dan 2021-06-16 15:51

New version:
Added Pause menue to the Game. (haven't checked if the lasers are affected by the delay ...)
There you can turn on/off sound and music. Use MUS and SND variables for this.
(music is already turned off, but sound need to have this check
if snd=1 then play ... etc)

Changed the player size to 6.5 (down from 7) now it looks like the player does not get stuck anymore.

Added the Levelpal variable to the levels, now the palette of the main (#) tile can be changed.

I have increased the Laser count to 4, as the level 2 crashed with an error.



As for the level ending, i think we should add a coin, which will spawn randomly at the map.
Maybe predefine the spawning places, and when player has got 5~10 coins, then the next level can be loaded. ?!


Dan 2021-06-16 16:07 (Edited)

Hmm, Maybe we should let the coins and items spawn randomly.

Like where the items are placed, there can be either a coin or one of the gear.

Maybe: spawn coins first, and when the 2nd coin is picked up, one of the free spaces can have either a coin or gear item.

Then a shield would make immune against the lasers, if picked up.
Clothing would save once, and when it is used, it would be add to the respawn list.
Jetpack does not need an explanation.

And for the sword, we either implement a tile, which needs to be broken with the sword so that the exit can be reached

or maybe add some kind of monster/roboter/ball thingy which the sword would destroy ?


SP4CEBAR 2021-06-16 19:17 (Edited)

Sounds great
I like the functions for the items
But when the items are distributed randomly, the difficulty of a level may unpredictable: for some levels (if we decided to make such) it may be necessary to have, for example, a shield to block a certain laser
If the shield were to spawn at the end of the level, such a level might become unbeatable
Other levels, might become really easy if the player would get a shield right away

But if certain items are necessary to beat a level, we could make the player spawn with them


SP4CEBAR 2021-06-16 19:20 (Edited)

We could use the sword for both attacking enemies, and destroying blocks (we could add a destructible wooden platform or something similar)
And we could add a destructible generator thingy which would power the lasers


SP4CEBAR 2021-06-16 19:21

I think we need to do a boss fight on the last level


Dan 2021-06-18 17:54 (Edited)

In my second-last post, i have uploaded a wrong version of the code.

The addition are now in this sourcecode:

@ = Player
$ = Diamond
+ = Door (can't be opened yet)

If no @ char is on the map, the player will automatically spawn at the first
empty place on a map (going from top left to bottom right)

I have drawn some slimy monster for testing (not in game yet ...), and a door.

(Edit, and of course, now all 7 palette slots are filled with colors)


G-9 2021-06-18 19:30

The slime you made hurted my eyes ;’D
I edited it, and changed palette #3 to match 4,5,6 and 7.
Very sorry, but I have issues with my iPhone’s iCloud accounts, and I’m not rly familiar with PC coding with LowRes NX…
Hope we will make a kinda nice and featured game.
I also hope that we will make another !


Dan 2021-06-18 19:48 (Edited)

That new sprite looks better.


~~~ Quote ~~~
I also hope that we will make another !
~~~~~~~~~~~~

Sure, lets do one first, then do another (i guess we can continue on the one you have posted earlier).


Dan 2021-06-18 22:03 (Edited)

New version:

"+" is now a destructible tile.

Added the sword functionality:

Approach a destructible tile from left/right and press the (A) button to remove it.
Hold Up or Down and press the (A) button to remove the top/bottom tiles.

Added a sounds function.
Please add sound effects to it and use call sounds(nr).
Now the pause menue can turn the sounds on and off as well.

The Pause menue has now a play-testing option, turn it on to disable collisions with laser/Spikes.
This will make the game easier to debug/test.


G-9 2021-06-19 10:52

Nice ! I added some modifications :
- Don’t place money with laser.
- Removed the variable at top
- Dow when you dig down, you die (I mean when your y is greater than 112
- Removed Herobrine


G-9 2021-06-19 10:53

It should be easy to add extra lifes on the map.
Also I plan on updating the second level and adding the level 3 and 4 :3


Dan 2021-06-19 11:23

For me, the maps are still WIP. As long as we have things to add, the map may (and probably will) change.

Right, forgot to remove that variable after testing.

What is herobrine ?


SP4CEBAR 2021-06-19 12:44 (Edited)

This looks Awesome


G-9 2021-06-19 13:16 (Edited)

« What is herobrine »
It’s a Minecraft myth, where a creepy entity named Herobrine comes and destroy everything including you.
In all the Minecraft update releases notes until 1.11, there was a mention of Herobrine in it, even if it wasn’t supposed to exist.

It was very funny, but no Herobrine eastereggs in 1,17 ;(


Dan 2021-06-19 14:18

Thanks ^^


SP4CEBAR 2021-06-19 15:36

I just fixed the sword animation and added more sounds


Dan 2021-06-19 21:08 (Edited)

Hi, i have made following changes to the game:

Shortened the code for Sword Handling. (Edit #3: There is, now, little to no room for optimization !)
Destructible blocks leave, occasionally, a Gem.
The Shield now blocks the Lasers, the Armor blocks the Spikes.
The Map should redraw properly after the Pause-menu is closed.

Edit #5
I guess i found that Herobrine.

When a laser is turned off, the cells, if there was an item or destructible block, will leave a hidden block which can't be passed/jumped through, but the laser is drawn over it.


SP4CEBAR 2021-06-20 08:18

Nice


SP4CEBAR 2021-06-20 08:20 (Edited)

Should we make the armor and shield temporary, like the armor could save the player once, and the shield could burn up if it was in contact with a laser long enough
If something breaks, the player would be invincible for something like two seconds


SP4CEBAR 2021-06-20 08:21

The game is already over 4000 tokens!


SP4CEBAR 2021-06-20 08:24 (Edited)

Quote:

When a laser is turned off, the cells, if there was an item or destructible block, will leave a hidden block which can't be passed/jumped through, but the laser is drawn over it.

Is that a bug?


Dan 2021-06-20 09:16 (Edited)

Edit: Yesterday i've encountered a bug, when a block was removed, around that left-hand side laser place, a hidden block was in it's place.

...

Placing objects in a lasers way can be beneficial for the game logic.
Like if a level does not have the shield on the map, then the player, if he gets that object too early would make the game a bit difficult.

Because he could pass the blocked laser to get a sword on the other part of the map, then go back up, unhindered by the laser.

So he could choose to pick it up last.


Quote:
~~~
Should we make the armor and shield temporary,
~~~

Let's see what the level-ending conditions should be.

We could, for example, hide a key in one of the destructible blocks.

Or the key would be (look at the current level 1) at the left side of the spikes.

To get to the key, the armor has to be durable.

...

any ideas ?

Quote:
The game is already over 4000 tokens!

Let's wait until It's OVER 9000 !!!
J/K


Dan 2021-06-20 11:59 (Edited)

New version:

Fixed the bug with the hidden tile.

Drawn a Purple diamond and a Key.

Added Key and Door to the Map handling. (only to the level 1, atm)
Pick up the key and hit (with the sword) the door to change levels.

(level changing is not fully tested)

The Purple diamond is not added to the map, it spawns, rarely, instead of the yellow diamond at the destructible tile.

Changed the score of the objects to 10, the purple diamond gives 50. Exiting the level gives 100 points.


G-9 2021-06-20 12:41

The game starts to be very fun :3, but why not just auto-teleport to next level, or at least put the door on the ground lol.
Level update is very requested


Dan 2021-06-20 13:06 (Edited)

I've play-tested the door for the jetpack.

Maybe someone wants to get all the points from the level before proceeding further, therefore i decided not to make an auto-teleporting.

But, i'm not the only one who is programming this.


G-9 2021-06-20 14:23 (Edited)

Well the auto teleport isn’t a problem, but it makes the game illogical , because of the sword animation. We could remove it when player is near the door ? Or even a win animation, with a mini game to win lives ?
Also, i don’t know how do the lasers work, but sometimes the game is impossible. We should do a fixed-timer thing for the levels…


Dan 2021-06-20 15:16 (Edited)

TBH, idk how the lasers work as well.

Maybe it would be easier if the lasers would rotate, like 1 active at a time, then next.
Or maybe switch between horizontal lasers and vertical ?


G-9 2021-06-20 16:43

Switch between vertical and horizontal would be easier, as the code can’t know in which order firing lasers…
The duration of lasers could be 2 or 3 seconds


Dan 2021-06-20 17:32

New version:

The door now needs to be touched, with a key, to go to the next level.
The door image is now moved to position 90.

The destructible tile has now 3 image variations.
Added heart as !
Added a very rare spawn for heart instead of purple diamond (at the destructible tiles)

Heart gives a life.

Changed scoring a bit.
Changed levels handling. After the max-level, it goes back to 1st.

Changed and compressed the score displaying text.
Added icons to display wearables, key and lives.

(Added a font to the 4th page)


G-9 2021-06-20 19:59 (Edited)

Very nice !
Potential problem : in my opinion, items (such as heart, shields and anything) shouldn’t block lasers.
Solutions : make the laser drawing code redraw the items when they are deleted
- place the heart somewhere else .
I liked much the second level !
I did some updates also:
Added a sound when you win
Changed some gfx
Volume now goes lower when opening menu
Fixed some bugs (I don’t remember bugs)

Now you can play Mario Kart DS online 60 FPS by doing the secret combinaison ; left left up up a a b b down right down right b b pause
You also win Vbucks, emeralds and diamonds, dollars, euro, and bobux and also the bacc editor studio
No fake


SP4CEBAR 2021-06-20 20:16 (Edited)

Awesome!

The lasers work like this:
The "LASERS" array stores the x and y position and the state (on/off) of the lasers
All the laser controls are inside the "UPDATE_LASERS()" subprogram

This is the first bit of code in the subprogram: it turns each laser on or off by generating a random bool, it does this every 60 frames (LASER_REFRESH_TIME is a constant variable with a value of 60) lasercount is the amount of lasers that were counted while loading the map

IF TIMER MOD LASER_REFRESH_TIME = 0 THEN
FOR I=0 TO LASERCOUNT
LASERS(I,2)=INT(RND*2)
NEXT I
END IF

I don't mind if this way of turning them on and off gets changed, right after I made the lasers lethal, I found this random way they are turned on and off very annoying
I think we can keep the outer if statement, because whatever way of refreshing the lasers we are going to use, they don't have to be refreshed each loop


SP4CEBAR 2021-06-20 20:18 (Edited)

The next bit of code in the subprogram casts a ray for the laser and refreshes the laser animation
I chose to make the lasers get blocked by items, if I didn't do that, the item cells would get overwritten by the lasers (because they are on the same display layer as the lasers)


SP4CEBAR 2021-06-21 10:27 (Edited)

Level 2 speedrun
https://www.dropbox.com/s/rceko5ia2p8ta1s/Video%2021-06-2021%2C%2012%2018%2035.mov?dl=0


G-9 2021-06-21 10:36 (Edited)

Ha, nice ;3
I did 21 seconds


SP4CEBAR 2021-06-21 14:38

Nice


Dan 2021-06-21 15:42 (Edited)

The current level 2 is hardly a challenge, but you can test how often does the purple diamond spawn and how often the heart is there ...

Need more lives ? Get it on level 2 ;)


G-9 2021-06-21 16:06

I’ve noticed that when you get a heart form boxes, you don’t get lives . Idk if it’s a bug or you planned it but …


Dan 2021-06-21 17:29 (Edited)

Heart's which give lives are red, the other heart a-like thing is a pink or purple diamond, those give only score.

It is a bit of twist, but the boxes give yellow diamond with a rare chance for it to be the purple.

The purple diamond has a rare change to become a heart.

In that way you do not get too many hearts, but still, level 2 can give you 2 or 3 lives.


Dan 2021-06-24 10:04 (Edited)

New version:

Added Power-up as a temporary shield.
Drawn the shield animation.

Added empty templates for 37 levels.

Added score and level display. They alternate between each other after few seconds.


SP4CEBAR 2021-06-24 11:37 (Edited)

Awesome!

What kind of a boss battle should we do in the end?


Dan 2021-06-24 15:58

Good question.

What options do we have ?


Dan 2021-06-25 06:36 (Edited)

Option/Idea nr.1:

Level: Almost empty
Boss type: Flying (left/right ?), dropping some things down to hit the player.

The Boss is flying to a new position like every 5 seconds, drops something, and is flying to the next.
(Let say there are 5 fixed positions to which the boss can fly)

The player needs to dodge. If successful, the dropping stays for a short time (15~20 seconds, timing has to be adjusted) and needs to be hit by the player.
When hit, it goes straight up, and needs to hit the Boss.

The boss needs maybe 5 hits to be done.

(edit, optionally: he is dropping the laser thingies down, which the player needs to activate by hitting them)


Dan 2021-06-25 06:42

Idea #2, falling rocks:
Rocks are falling down. If they hit the floor, they become a tile.

There is a door tile at the top. The player needs to reach it. - No key needed.

(Optionally: The key may be a random drop, player needs to pick it up.)


Dan 2021-06-25 06:46 (Edited)

Idea #3: Same as above - falling rocks/tiles, but the rocks are destructible tiles.
There are about 10 rocks falling down. (either randomly or in a line with a space for the player to pass through.
(maybe the tiles can be tetris-alike ?)

Player needs to endure 3,4 or 5 minutes, destroying as many blocks as he can (when they become tiles).


Dan 2021-06-26 10:48 (Edited)

New version:

Modified the laser code, lasers are firing one after another.
Increased laser count to 16. If more lasers are present, on the map, they are ignored.

When editing/creating levels: "Do not cross the beams" - see current level 5

Changed the shielding animation, the blinking is better noticeable now.


P.S. Levels are still in the testing phase and some will change later.


Timo 2021-06-26 14:12

This looks very cool, looking forward to the finished game :)


Dan 2021-06-26 20:13

New Version:

Added 5 Colored Doors (0-4) and their Keys (5-9)
Added display for the new keys.
Added Saving the sound and music options to the Persistent Storage, and reserved the hi-score place in it.
(Hi-Score handling is not implemented yet)




G-9 2021-06-27 07:01

I love the level 7, so fun !!


CubicleHead 2021-06-27 10:51

@Dan that map looks a bit like Castle Excellent :D


Dan 2021-06-27 19:00

New version:

Half of the levels are now filled.
Fixed a laser bug when going offscreen.
Now multiple keys of the same color can be picked up and used on the same colored doors.
Changed the saving of music/sound state. Saving them now, only if the variables were changed.


G-9 2021-06-27 19:15

I love your levels. You have a kinda big imagination !!


Dan 2021-06-27 19:20

;)

Some levels were inspired by the "Hunchback" and "Moonlander" on the c64.


SP4CEBAR 2021-06-27 21:11 (Edited)

These new levels look Awesome!


G-9 2021-06-29 09:13

I didn’t do any change, I just fixed the text in the source code who was all messed up
I still don’t understand why didn’t you fixed It, but anyway :


Dan 2021-06-29 20:45 (Edited)

QUOTE:

I still don’t understand why didn’t you fixed It

Answer: First things first. When the game is done and finished, then we can see which comments can stay, which can go, which should change.
These small cosmetic changes can wait.

New version:

Added monsters (up to 10 on a map)
Letters F+H: Moving left/right and Up/Down.
It is not fully tested: Array out of bounds still occurs at the outer edges (for e.g. if a tile is removed).

Todo: Different Images with 2 anim frames for the 3 other monsters.
Collisions.


Dan 2021-06-30 21:25 (Edited)

New Version:

Fixed the out of bound errors by using cells instead of the array for map checking.

Monster types:
F= Moving left right (Staying on the platform)
G=Following the Player (Staying on the Platform)
H=Flying up/down
I=Flying Left/right

Added a Bat animation.

Level 1 is showcasing the monster types, they should be removed later and used in other levels.

TODO: Collisions.

Have fun !


Timo 2021-07-01 06:04

Cool :)


SP4CEBAR 2021-07-01 20:04

Nice!


Dan 2021-07-03 13:10 (Edited)

New Version:

Added Main Menu screen and options.
Added Collisions player vs monsters
Added Collisions monster vs sword swing.
Added monster type variations: Destructible/indestructible.

Flying monsters are now indestructible, Crawling are destructible.

Token count: 12325


G-9 2021-07-03 13:25

I think there is much tokens because there is lots of comments 😂
And gg
I’ll try to add some effects if I have the time :3


G-9 2021-07-03 14:12 (Edited)

I did something kinda cool

Press pause please

I could press pause for hours watching what I’ve made :3

Title screen animation coming soon …

Fixed volume being idiot in pause menu

Fixed volume one more time because he is dumb

Removed sort of chat.

RIP can be found here

Added cells being black and not filled at first

Todo : add sprites of char #000 in each layer to make a slide effect instead of cell based


G-9 2021-07-03 14:38

There is actually 154 replies on this post lmao


Dan 2021-07-03 19:15 (Edited)

^^
That new pause menu looks great.

New Version:

Added few levels, 6 to go.
Added score for defeating Monsters.
Added bonus Score for collecting every diamond at the level end.


SP4CEBAR 2021-07-04 07:59

The pause menu looks really nice


Dan 2021-07-04 20:09

New Version:

Added support for bonus stages.
Currently only 1 bonus stage is done, it is launching after level 5. (if you played from level 1)

The map for Level 40 is done.

Todo: Maps for levels 35-39


CubicleHead 2021-07-05 13:16

This is super cool but the collisions with spikes seem a little too difficult
Often when I'm on a ledge and I run to jump over a spike one block below me I go halfway over the block and partly on the spike and it kills me
Idk how the spike work but I'm assuming that when you are between two block it makes you be on the one your closer to
Also when I touch the ceiling I stop moving which makes some jumps rather hard

Super cool huge game !


Dan 2021-07-05 19:14 (Edited)

The spike collision is cell based.

Therefore if you touch the upper part of the cell, it will trigger a collision, even if there seems to be an empty space.

The same counts for the lasers.

If you play the level 10, and if your char is standing very near to the edge on one of the upper tiles, it may get hit by the laser - even if the beam seems to be a bit far away.

It is the top of the tile, which is stopping the movement. Actually, because the player is jumping up, the sprite is colliding (or entering) with the top tile a bit and this in turn prevents the left/right movement.
(P.S. This is calculated and may not be visually seen)

You can float over the top of the screen (which is what i call ceiling), if you jump and hold the left or right key. (depending on where you go)


To solve this problem, i guess, a level editing should be done, to make it easier to 'jump up'.
Then every level which has that problem (i know of at least 3) should be modified.


To solve the problem of the spikes, they could be converted into sprites instead of cells.

But for that, we have to have enough free sprites. (Maybe limit the spikes to 15~20 per level ?)

The same could be done for the lasers, now that only one laser is firing at a time - it would need 18~19 free sprites, i think.


CubicleHead 2021-07-06 00:26

Thanks for explaining that :D I don't think the sprites for spikes and lasers would be necessary, once I got used to the collisions it was easier


Dan 2021-07-06 19:31 (Edited)

We can still think about it, later.

New version:

Changed the extra-stage-1 a bit:
Added 2nd row of diamonds - Only the top row is Spawning hearts.
Added sounds (can someone make a better sounding laser sound !?)
The laser is moving slightly faster, because of the increased difficulty.


Dan 2021-07-07 21:30 (Edited)

New version:

Added a new Extra-Stage after level 14.

Edit: Removed the BG 0 and 1 from the extra stage, as it was useless.


SP4CEBAR 2021-07-08 10:03

Nice


SP4CEBAR 2021-07-08 10:04

It looks like were getting close to running out of tokens


SP4CEBAR 2021-07-08 13:38 (Edited)

I reworked the collision system a bit:

 OLD COLLISION BOX:  
 COL1--COL2  
  |      |  
 COL3--COL4  

 NEW COLLISION BOX:  
   COL1  COL3  
 COL2+----+COL4  
     |    |  
 COL5+----+COL7  
   COL6  COL8  

The advantage of the new system is that it can easily detect the direction of the collision
I also reduced the width of the player to make it easier to pass trough openings


SP4CEBAR 2021-07-08 13:40 (Edited)

But I ran into some terrible bugs, and eventually I gave up
(It's no that the bugs are too hard, it's just that I tried to fix them for 2 hours straight)


SP4CEBAR 2021-07-08 13:43 (Edited)

I tuned the width and the collision box-offset to work well for horizontal collision
But for some reason the vertical collision, is more on the left than on the right
For example:
[] = a block
P = the player

[]    []  
 P    P  

In the first scenario it wouldn't be able to jump But in the second scenario it can
The unidentified extra collision, still occurs when I disable my function for top-collision


SP4CEBAR 2021-07-08 13:45

Here's the program
Note: this is not a solid version


Dan 2021-07-09 19:13 (Edited)

Platformer collisions are not easy to do.
You have to check the collisions in the right order/sequence.
I have converted this code: https://www.infinitelimit.net/article/simple-platformer-tic-80

Because it was simple to use.

In your last version, there, after the sword swing code, is following code still unchanged (from the previous versions):

~~~
REM CEILING COLLISION
CALL MAP(ACT_X+ACT_DX ,ACT_Y+ACT_DY+1,COL3)
CALL MAP(ACT_X+ACT_DX+ACT_SX,ACT_Y+ACT_DY+1,COL4)

IF ACT_DY<0 AND (COL3>0 OR COL4>0) THEN
ACT_DY = 0
END IF
~~~

I guess that can be the 'unidentified extra colision'

But, if you remove that code,then when using jetpack, you may get stuck in between the top tiles.


Dan 2021-07-10 19:08 (Edited)

New Version:

I have used the code from my previous version post.

Added 3rd extra level.
Added HiScore handling,display and Reset at the intro screen.
Added level skip, use the button B (when the testing is selected) at the pause menue.

Reseted the Sprite sizes to normal after the second extra level.

Shortened and combined some rem statements, to regain tokens.

Token Count - 15304/16384

Edit:

For the _1 version i've removed all empty spaces, the code is now not so readable as before, but:

Token Count - 14861


Dan 2021-07-11 21:22

New Version - Almost Done.

There are now 4 extra levels (down from planed 5).

Removed Level map 40 to get tokens.

Levels 35~39 are still empty. If some tokens are needed, then remove one or two of them.

Token count is now 16334


Dan 2021-07-12 21:14 (Edited)

New Version:

Moved the Levels into Rom ! Contains 40 levels, 35-39 aren't done yet.
Changed the way in which the extra stages are triggered.
Made some small changed to the extra stage 5.
Extra level timers or Hitpoints are now defined at the same place at the (currently) lines 97 to 100

Token count: 13013

Have fun.

P.s.
Now, that the levels are in the Rom, does anyone want to make a level editor (as a tool) ?
I'll surely start to make one when i have a bit of free time.


Timo 2021-07-12 21:30

Can't you use the Gfx Designer as level editor? It would be some effort to convert the existing levels (maybe a tool could do this), but wouldn't it be easier in the end?


G-9 2021-07-13 12:31

I will try to do a tool, but I have no idea how does you rom is coded …
I will code the ui and everything, but I will keep a SAVE sub to fill because I don’t know 😂


Dan 2021-07-13 15:00 (Edited)

The Levels in rom are coded/pasted exactly like the original levels.

I have copied the levels to an extra text file, removed the a$=a$+ and removed the "

Then i have used an hex editor and copied the bytes as they are to the game.
(i had to remove the 0d0a strings)

The level size is 20*15 which is 300 in total.

This is old and the new code:
~~~
REM TMP$=MID$(A$,X+1+(Y*20),1)
TMP$=CHR$(PEEK(ST))
ST=ST+1
~~~

As you can see, the rem'ed code was for the loading from the string.
The new code simply takes the hexadecimal number and converts it into char (with chr$)


To get the starting point of the level i have used:

~~~
ST=ROM(7)+((LEVEL-1)*300)
~~~

(level-1) because the 1st level is starting at the position 0


I think that a level editor would be better than the Gfx designer, because we can program it to place only the items/tiles which are used, instead of having the need to know which tile is used and what to avoid.

(Edit:

On the second thought, yes, we could make it compatible with the GFX designer, but that would need a lot of converting.

And i guess that GFX designer is saving the BG's with the palette and other attributes, which would make the rom size bigger.
)


Timo 2021-07-13 15:52

Yes, Gfx Designer stores each cell in two bytes, so the data would be bigger. But maybe you don't really need 40 levels (if they don't fit)?


Dan 2021-07-14 16:22 (Edited)

A dedicated level editor is better.

The code for loading the levels is already there, and to save the levels would only need to poke the level data to the right starting point.

And, i guess, it would be a nice exercise to make a tool.
(i haven't done it yet.)

There is still room for about 35 more levels.

Edit: I have just tested something, and it looks like LowresNx supports only rom numbers #1-15

That would be around 7 levels for the game ...


Dan 2021-07-14 17:12 (Edited)

New version:

Only a small bug fix this time:

If a player spawn point is at the y position 15, the game would crash.
Now, if the player is spawning at that position, it would reuse the 1st empty position in the level, or, if here isn't any, then it would be forced to use the y position 1. (at the same x coordinate)


Timo 2021-07-14 22:14

Even though there are only 15 ROM numbers, you can still put more levels in it. A map can be much bigger than the screen, so you can put several levels in the same map. Then you can just use the offset in BG COPY to get the correct part. Some games are already made like this.
Anyway, a custom editor is cool too.


Dan 2021-07-15 18:05

Ah i see, the Map size button is located at the disk menue.


Dan 2021-07-17 12:36

Is anyone doing the editor ? If not i'm going to start it today.


G-9 2021-07-17 12:50 (Edited)

Well I’m trying but I think it’s best that you try, you have so much knowledge than me :)


Dan 2021-07-17 14:02

Whatever.

Ill start it then.


Dan 2021-07-17 19:51

New Version:

Moved the Level palettes into rom.
Fixed a small bug.


SP4CEBAR 2021-07-17 21:04

Nice


Dan 2021-07-17 21:40 (Edited)

New version: Changed the Name of the Level Rom to be (kinda) unique
so that the level editor recognize it as such.

Level Editor:

Basic level editing is working.

Set the level editor as a tool.
Start the StickManDungeonAdventures game and switch to the editor.

Select the tiles at the bottom.
Empty tile is always present, click < and > to scroll through available tiles.
Selected tile is displayed with an square.

Click the "Button" at the bottom right hand side to switch between 1st and 2nd menue.
Click on - or + on the left side to change levels (edited levels will be automatically saved to memory).

Click the middle - and + (with 1 number) to change the level palette.
(Level will be saved to memory by doing this).

Click on the Save button to copy all the levels from memory to the cartridge !
(Edited level will be saved to memory first)

Click on the load button to reload the levels from the cartridge to memory.

Todo:
Add code to check how many Lasers are placed, and prevent placing new lasers if the count is too high.
Add code to check if player is already on the map, and replace the old position with the new.

Add code to check if 1 exit door is present. and maybe prevent placing new doors.
Add code to check if 1 exit key is present.

P.S. The newer Game file has the starting Level set back to 1.

StickmanDA-Editor.nx | Open in app
2021-07-17 21:41

G-9 2021-07-18 09:36

Nice 👍!


G-9 2021-07-28 12:22

Now you can just TOUCH instead of TAP everywhere :)

StickmanDA-Editor.nx | Open in app
2021-07-28 12:22

Dan 2021-07-29 12:29 (Edited)

New version.


Updated the level editor from the previous post and added delaying code to the buttons.
Added a code to erase the previous player position, when setting a new one.
Added a Test button, which sets the game into a testing mode for one level.

Updated the Game code to read out the testing flag and to start and play from that level.
The level will repeat forever.
The testing of a level needs to be turned off in the editor. (and saved)

StickmanDA-Editor.nx | Open in app
2021-07-29 12:29

G-9 2021-07-29 20:37

Cool !


Dan 2021-07-31 17:12 (Edited)

New version: About to be done.

Made the levels 35-39.
Removed the Testing from the Pause menu and
Added Quit Game and Reset level.


SP4CEBAR 2021-08-02 08:50

Awesome!


SP4CEBAR 2021-09-11 14:04

Did anyone manage to complete the game (as a player)


SP4CEBAR 2021-09-11 14:07

I just played it (with dev mode on, because I kept losing) and I love the extra levels
The big hit box really makes the game a lot harder
And I got stuck at lvl 38, is there be a hidden key or something?


SP4CEBAR 2021-09-11 14:08 (Edited)

This thread has 195 messages, wow


CubicleHead 2021-09-11 15:20

I haven't been able too complete it but I think that's a good thing
It makes the game have more interest what with wondering what might come next


Log in to reply.