QB64.org Forum

Active Forums => Programs => Topic started by: MrFreyer on June 16, 2019, 08:07:10 am

Title: CRASHLANDED (game, survival, building)
Post by: MrFreyer on June 16, 2019, 08:07:10 am
Hi @ all,
in the last 2 days i've programmed a little game, out of fun... :D

Okay, it's poorly written, have no frametime-calculation, no loop performance optimization, no customize possibilities (e.g. keyassignment), no sounds and just ASCII graphics... but hey, it was fun to write it.

And here is the code. Nothing more resources are needed. Works with QB64 1.3

Code: QB64: [Select]
  1. sourcecode deleted, please see EDITEDIT (sourcecode in post no 7)
  2.  

Nevermind the REM{ and REM}. It's just for my Notepad++, so that I can fold and expand codesections.

Have Fun!


EDIT:
The post turns my postet code from screenwindow.width to screenwindow.WIDTH (Line 10)... but it should be okay.

EDITEDIT:
Please download the sourcecodefile. In the embeded code, in this post, were a lot of ASCII symbols missing!
Title: Re: CRASHLANDED (game, survival, building)
Post by: FellippeHeitor on June 16, 2019, 08:10:15 am
Quote
Nevermind the REM{ and REM}. It's just for my Notepad++, so that I can fold and expand codesections.

Nice move!
Title: Re: CRASHLANDED (game, survival, building)
Post by: MrFreyer on June 16, 2019, 08:17:45 am
Nice move!

Looks like this then.

EDIT:
I also like different color (like on picture 2)
Title: Re: CRASHLANDED (game, survival, building)
Post by: RhoSigma on June 16, 2019, 08:28:27 am
Indeed, i use '~~~ as fold open marker and '~~~~~ as close marker in my setup.
Title: Re: CRASHLANDED (game, survival, building)
Post by: TempodiBasic on June 16, 2019, 12:51:20 pm
Hi Mr Freyer

I found your example very instructive seeing also how both old style BASIC both new structured style BASIC can be embedded for more power results!

I have found an error...
see line 1038 of your code posted here above

Code: QB64: [Select]
  1. 1038   _PRINTSTRING (TILEX(player.x), TILEY(player.y)), ""
well  I have added this at the end of line to see my location
Quote
CHR$(3) '

now I can appreciate better your work!
Cool!
Title: Re: CRASHLANDED (game, survival, building)
Post by: MrFreyer on June 16, 2019, 02:50:18 pm
I found your example very instructive seeing also how both old style BASIC both new structured style BASIC can be embedded for more power results!

I have found an error...
see line 1038 of your code posted here above

Nooooooooooooooooooo!!! In the embeded code of my first post, lots of ASCII symbols are missing! :o
I should attach the sourcecodefile to a post, to prevent this catastrophic convert!

EDIT:
I will upload the sourcecode in 2 Minutes...
Title: Re: CRASHLANDED (game, survival, building)
Post by: MrFreyer on June 16, 2019, 03:04:19 pm
Here is the sourcecode with the needed ASCII icons.

EDIT:
And a screenshot of how the screen was mentioned to look like

EDITEDIT:
I attached the sourcodefile to my initial post.
Title: Re: CRASHLANDED (game, survival, building)
Post by: TempodiBasic on June 16, 2019, 05:49:10 pm
Thanks now I can appreciate in the whole of structure! Finally I can eat! :-)
Fine
Title: Re: CRASHLANDED (game, survival, building)
Post by: Virtusoroca on June 01, 2020, 03:02:45 am
Im enjoying this game a lot! :) almost building the rocket so I can escape 2020! Thanks @MrFreyer for that. Very nice