Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - crane550

Pages: [1]
1
Programs / Re: Aliens Attack!
« on: January 06, 2019, 02:55:18 am »
Level 2, the aliens start shooting back!

Well...it has been a huge learning curve, but I switched to C++ and rebuilt from the ground up. There is no question the new version is better. I chose SDL, which I have never touched before but I'm glad I went that direction.

80% of my time was spent figuring out how to do simple things. For example, getting text on screen took a full day of trying to figure out SDL_TTF. Once I figured it out no problem. I admit I'm not nearly as comfortable in C++ as QBasic/QB64, but the upward mobility of C++ is nice.

Just so you know...the aliens do shoot back now. And there is a high score system. It's a lot more fun now. I think I am actually going to start building a phyical arcade cabinet for it.

2
Programs / Re: Aliens Attack!
« on: December 26, 2018, 09:48:40 pm »
Do not hate me, but I might port it over to C++ and continue development from there, although the barrier just to get pixels on the screen in C++ is quite high.

Don't want to burst your bubble, but if you ran this with QB64 then you already did port it to C++! thats what is under the hood in QB64, you may type BASIC but when you run it, it get compiled as C++. :)

Haha, yes, I am aware of that. I am studying some SDL tutorials. If I can get QB64 to compile on the Raspberry Pi it's a moot point. I would like to learn more C++, however. It's just hard to beat the accessibility of QB and how fast you can get pixels to screen.

3
Programs / Re: Aliens Attack!
« on: December 26, 2018, 01:24:07 pm »
Welcome crane550!

I tried playing the game for a short time and it worked well. I found the response to arrow key presses interesting, kind of "floaty", nice feel except when it dwells on edge of screen when trying to reverse direction. (I have not examined code to see if anything special was used to achieve that effect.)

First thing I would do is take advantage of _MOUSEHIDE command.

Thanks!

Here is my logic for the edges...tell me if I'm right or wrong. I wanted this to be a velocity game. Each key press add velocity to the ship, and it maintains that velocity. You don't actually get to change the ships position, the computer does that. I did add a decay to the velocity, so contrary to strict Newton physics it does slow down...slowly. When you hit the edge your velocity remains the same in that direction, but the position is limited. So you have to overcome your velocity in the other direction before you turn around. That means when you stop on the edge it isn't just a quick key press to return back towards the center of the screen. The idea was to encourage the player to not simply scrub the walls.

I also wanted to encourage the player to hang out 1/3 from the bottom of the screen, but not the very very bottom so there is also a "nudge" that kicks the player towards Y = 290, or something around there.

Feel free to suggest otherwise (I may or may not do it. :) ) There are pros and cons to this.

Any recommendations on the overall structure of the program?

Do not hate me, but I might port it over to C++ and continue development from there, although the barrier just to get pixels on the screen in C++ is quite high.

Alex

4
Programs / Re: Aliens Attack!
« on: December 26, 2018, 01:10:40 pm »
Hi crane550

I think that you can find your support here, I remember some members have already your experience to install and use QB64 on Raspberry pi...
but the more posting is for now lost in the WWW.[abandoned, outdated and now likely malicious qb64 dot net website - don’t go there]\FORUM ... waiting when and how we can get back that treasure (collection ) of codes and ideas in google I find this link
it may be useful while you wait expert support...
https://www.raspberrypi.org/forums/viewtopic.php?t=193600

about code just two questions:

1. must it  to be in QB4.5's style (keywords and data type) or expanded to QB64's style?

2. How memory (RAM) do you have to spend on Rasperry PI?

Good Coding and Research

Thanks for your response. I have seen the page you linked, and all of the packages installed. However the QB64 program would not build. I cannot remmeber the specific error, but I can post it later.

As to your questions, I am using the _LIMIT function in my game, which is pretty much essential. I believe that is the only one so far, but it's a big one. I could potentially play with a "busy loop" if I absolutely had to- and perhaps even put the value in an external file so I didn't have to recompile to change it.

2. I have no idea on the memory usage. I was hoping someone had an idea to tell how much memory a program uses.

Thanks!

Alex

5
Programs / Aliens Attack!
« on: December 25, 2018, 09:24:19 pm »
Hello,

I am brand spankin new here. This is my very first post.

A little background first.

I started this game when I was 8 years old, when I was playing around with Qbasic on my IBM PS/2 386. I don't have the original code I started with, but I remember printing it out on a dot matrix pinter and the code totaled something like 12 pages. It was probably quite the mess, as I didn't understand the concept of functions at that point. IIRC the whole thing was just one massive loop from start to end.

Not that my code is probably much better at this point. I am still using a lot of global variables.

I tried running it on my old 386 just for fun inside of vanilla Qbasic 4.5....and it's slow. Extremely slow. I think it's safe to say this will only be a modern computer game now. Back then I only had 2 enemy ships, now I can go up to 500 (or more, there is a point where practicality wise it doesn't make sense, though the code seems to handle it just fine.)

My goal is to port it to the Raspberry pi and make an arcade cabinet...while continuing to improve on the game of course!

My code is is 100% from scratch. I will have some questions about getting QB64 to work on the Raspberry pi. I would really like to compile it for that.

As for that feel free to comment or critique my code. I'm here to learn!

Alex


Pages: [1]