Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 08:24 06 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : (MM/DM/UBW32) Invaders

     Page 3 of 4    
Author Message
VK6MRG

Guru

Joined: 08/06/2011
Location: Australia
Posts: 347
Posted: 12:14am 11 Jan 2012
Copy link to clipboard 
Print this post

Link is new working.
Thank you.
Its easier to ask forgiveness than to seek permission!

............VK6MRG.............VK3MGR............
 
Vikingboy
Regular Member

Joined: 23/09/2011
Location: Australia
Posts: 82
Posted: 08:36am 11 Jan 2012
Copy link to clipboard 
Print this post

Hi,

Yes I saw the link on the site, however this is not the latest update, as the date on the file shows this is from the 6-1, and does not include any new code.

Andrew
 
djuqa

Guru

Joined: 23/11/2011
Location: Australia
Posts: 447
Posted: 10:21am 11 Jan 2012
Copy link to clipboard 
Print this post

Link is last provided

Darthmite please send latest so I can post.
VK4MU MicroController Units

 
Gizmo

Admin Group

Joined: 05/06/2004
Location: Australia
Posts: 5024
Posted: 12:44pm 11 Jan 2012
Copy link to clipboard 
Print this post

Hey David and Darth. That link above is sending visitors to a page on Davids site, where they have to look around the page for the link to the file. The link then points them to a file back here on my server. So its sending visitors in a loop, without them knowing about it, and using my bandwidth.

If a file is on my server, link to it from this forum only please, or link to this post, not the file. The whole idea of a forum is so readers can see how a project developes. If you just link to the files, anyone visiting Davids site will not know the background of Darths project, readers comments, etc.

GlennEdited by Gizmo 2012-01-12
The best time to plant a tree was twenty years ago, the second best time is right now.
JAQ
 
Vikingboy
Regular Member

Joined: 23/09/2011
Location: Australia
Posts: 82
Posted: 02:38pm 11 Jan 2012
Copy link to clipboard 
Print this post


Yes, I had noticed that loop myself, also I dont understand why Darth would post the wrong file ?

Is the correct file sitting on the back shed server somewhere, apparently David he contacted you with a link to the file, are you sure you linked the right file.

just trying to find the latest version of this great game.

Andrew
 
darthmite

Senior Member

Joined: 20/11/2011
Location: France
Posts: 240
Posted: 04:26pm 11 Jan 2012
Copy link to clipboard 
Print this post

Haw ,

Evil DarthMite made a error

I was sure Geoff will send the last one

Here is the last one with button and without KB.

2012-01-12_022558_INVADERS.zip

Enjoy

Darth.

Theory is when we know everything but nothing work ...
Practice is when everything work but no one know why ;)
 
Nick

Guru

Joined: 09/06/2011
Location: Australia
Posts: 512
Posted: 04:01am 14 Jan 2012
Copy link to clipboard 
Print this post

I've downloaded this 'latest' version but still it doesn't work.

I'm convinced I wasn't meant to see the program running!

Here is the screen I get when I RUN it...




Now, I could fix it but it would be nice if we could upload *working* programs for the public to see. Edited by Nick 2012-01-15
 
Vikingboy
Regular Member

Joined: 23/09/2011
Location: Australia
Posts: 82
Posted: 04:37am 14 Jan 2012
Copy link to clipboard 
Print this post

Nick,

By the error it looks to me that you havn't installed the latest release 3.0A of mmbasic that added the 'print @' command.

Andrew
 
BobD

Guru

Joined: 07/12/2011
Location: Australia
Posts: 935
Posted: 04:51am 14 Jan 2012
Copy link to clipboard 
Print this post

  Vikingboy said   Nick,

By the error it looks to me that you havn't installed the latest release 3.0A of mmbasic that added the 'print @' command.

Andrew

Suggestion:
Those programs that require a certain level of MM or DM Basic should do a test for version number at the start of the program and advise the user if unable to proceed or at least have comments up front to indicate requirements. Any comments?
Bob
 
darthmite

Senior Member

Joined: 20/11/2011
Location: France
Posts: 240
Posted: 09:29am 14 Jan 2012
Copy link to clipboard 
Print this post

Hi ,

This version is for MM Basic v3.0A.
The 'syntax error' can only be the Print @(...) command who
wasn't present in older version.
I will always use the latest version and tell it in the reply
when i post a new one.

Cheers.

Darth.

Theory is when we know everything but nothing work ...
Practice is when everything work but no one know why ;)
 
Nick

Guru

Joined: 09/06/2011
Location: Australia
Posts: 512
Posted: 07:47pm 14 Jan 2012
Copy link to clipboard 
Print this post

Geez! There's a new version already?! I only updated to 3.0 last week.

Ok, I've updated firmware to 3.0A and run the program. No more error but I'm now back to being unable to start and play because this latest version of Invaders still uses the non-standard switches for it's control.

I'm back to where I was when I started. Is there a problem with writing the program to use the keyboard. Everyone has one of these right?

This experience reminds me very much of the PC world where one buys the latest game in the shop, takes it home only to find that it requires a bigger video card, or more RAM or faster CPU or is missing a system DLL or requires an internet connection to apply 100GB of updates to run.



 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 08:23pm 14 Jan 2012
Copy link to clipboard 
Print this post

  Nick said  
This experience reminds me very much of the PC world where one buys the latest game in the shop, takes it home only to find that it requires a bigger video card, or more RAM or faster CPU or is missing a system DLL or requires an internet connection to apply 100GB of updates to run.



Geez Nick, this is free with no obligation to you from his author! Some time ago, i pointed (among others) to other Basic sources of Invaders for other platforms, in the hope that someone will consider them a good source of inspiration in writing his own MMBasic program. Now, is even better.Edited by vasi 2012-01-16
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
Nick

Guru

Joined: 09/06/2011
Location: Australia
Posts: 512
Posted: 09:06pm 14 Jan 2012
Copy link to clipboard 
Print this post

Totally agree. I'm one of those looking for inspiration but as yet have not been able to obtain it from a program not designed to be run by most people who have a Maximite.

Take my critisism as a way to improve the MM free software base.

All I'm asking is that paid or free, newly announced software *should* at least be designed for the majority of users and work with minimal fuss.

I'm sure that once this program is modified to run on a standard configured MM, it will be great and I will commend darthmite on his efforts. But at the moment, I wait.

I may be an obnoxious whiner but what I'm saying can only improve the way software is presented to the wider MM community.... and that has to be a good thing, right?
 
darthmite

Senior Member

Joined: 20/11/2011
Location: France
Posts: 240
Posted: 10:38pm 14 Jan 2012
Copy link to clipboard 
Print this post

Hi ,

So much discussion for a KB
I don't use the KB for game because i get some issue that the MM don't have
detect when i released a key.
I asked Geoff about this , but it seems to work with his own KB.
it's why i made me a 100% compatible Atari/Amiga 500 joystick.
info here :
Amiga joystick/mouse pinout

  Nick said  
.....
This experience reminds me very much of the PC world where one buys the latest game in the shop, takes it home only to find that it requires a bigger video card, or more RAM or faster CPU or is missing a system DLL or requires an internet connection to apply 100GB of updates to run.
....


You are true Nick , but if you look on all the sources i posted here , i never
have a version with the keyboard.
Every are free to modify the source (probably 5min of coding) but trust me , if you
get a Amiga joy or made it yourself you will never take the KB again for play

Now a crash course for every who want the KB in this game.


'General game loop
DO WHILE 1
'check if we draw a new level

just add after the DO WHILE 1
KEY$ = INKEY$

if you press a key , the character will be recorded in the KEY$ variable.

Now ... the cannon movements.

'check if we move the Canon to Left
IF (PIN(13) = 0) THEN
OldCanonX = CanonX
CanonX = CanonX - 2
IF CanonX < 0 THEN CanonX = 0
ENDIF

change : IF (PIN(13) = 0) THEN
to : IF (PIN(13) = 0) OR (ASC(KEY$) = 130) THEN

it mean , IF 'the joy is pushed to Left' OR 'the Left key from KB is pressed' THEN

We do the same for the Right movement

'check if we move the Canon to Right
IF (PIN(14) = 0) THEN
OldCanonX = CanonX
CanonX = CanonX + 2
IF CanonX > 285 THEN CanonX = 285
ENDIF

change : IF (PIN(14) = 0) THEN
to : IF (PIN(14) = 0) OR (ASC(KEY$) = 131) THEN

And finally the Fire button ...

'check if we Fire
IF (PIN(15) = 0) AND (Fire = 0) THEN
GOSUB CanonFire:
ENDIF

change : IF (PIN(15) = 0) AND (Fire = 0) THEN
to : IF ((PIN(15) = 0) OR (ASC(KEY$) = 32)) AND (Fire = 0) THEN

Here we use the Space bar to Fire

That it's



So , it was simple , isn't it ?
Now test it with your KB and tell me if you get the same issue than me.

Cheers.

Darth.
Edited by darthmite 2012-01-16
Theory is when we know everything but nothing work ...
Practice is when everything work but no one know why ;)
 
Nick

Guru

Joined: 09/06/2011
Location: Australia
Posts: 512
Posted: 11:23pm 14 Jan 2012
Copy link to clipboard 
Print this post

If it was so simple, why not make it easier on everyone by just making this a downloadable keyboard version since you have already done the mods? No harm in two versions... one for those few that have built a joystick for their MM and another for everyone else?

I'll mod the code to get it working... and finally see the game.

(No line numbers...sheeshk!)




Edited by Nick 2012-01-16
 
Gizmo

Admin Group

Joined: 05/06/2004
Location: Australia
Posts: 5024
Posted: 11:36pm 14 Jan 2012
Copy link to clipboard 
Print this post

Nick instead of complaining why not write the keyboard code yourself. Darth has put a lot of work into this and there was keyboard code submitted earlier in the posts. The whole idea of BASIC is its easy to understand and modify, so you have no excuse.

Glenn
The best time to plant a tree was twenty years ago, the second best time is right now.
JAQ
 
djuqa

Guru

Joined: 23/11/2011
Location: Australia
Posts: 447
Posted: 12:02am 15 Jan 2012
Copy link to clipboard 
Print this post

  Gizmo said   Nick instead of complaining why not write the keyboard code yourself. Darth has put a lot of work into this and there was keyboard code submitted earlier in the posts. The whole idea of BASIC is its easy to understand and modify, so you have no excuse.

Glenn
SPOT on.
Plus best way to LEARN is to try things yourself not just type or load someone else's code.

VK4MU MicroController Units

 
Nick

Guru

Joined: 09/06/2011
Location: Australia
Posts: 512
Posted: 12:17am 15 Jan 2012
Copy link to clipboard 
Print this post

You're missing the point of my complaint. I'm trying to emphasise that programmers need to consider the end user with anything they code.

Yes, he has spent a lot of time, so just 5 minutes more, he could have added the keyboard function from the beginning and everyone would have been able to see the fruits of his efforts immediately.

Those that are not savvy with BASIC (and those that detest the lack of line numbers! ) won't go to the hassle of modding the code just to play Space Invaders.

** My comments are for his benefit. **

Here's a real case example...

When I first saw that Invaders was available for download, me and a friend at the time where interested to see what someone has done on the MM. We downloaded it, ran it and it didn't work.

My friend is not a MM user and his comment was "It doesn't work. That's crap!".

I'm sure you and most MM users and especially Darth would be offended by such comments that don't take in to consideration the hard work Darth has put in.

So, 5 minutes more time develping Invaders with keyboard and the response from my friend could have been completely different.

I'm going to wait till a keyboard version is made available.


P.S.

In the mod Darth described, he reads the keyboard into KEY$ and then tests for it each time with ASC(KEY$). Don't waste CPU time by performing an ASC conversion at each test. Convert it once into a variable K=ASC(INKEY$).






 
Nick

Guru

Joined: 09/06/2011
Location: Australia
Posts: 512
Posted: 12:26am 15 Jan 2012
Copy link to clipboard 
Print this post

  Quote   SPOT on.
Plus best way to LEARN is to try things yourself not just type or load someone else's code.


Bingo!

I've always believed writing your own programs is the best way to learn, not just fumbling around fixing other people's code.

I've never typed in or debugged anyone elses code, I wrote my own from scratch. That's how I learned to write fast tight commercial games in BASIC back in the 80's and later moved to Assembly Language.


Edited by Nick 2012-01-16
 
Nick

Guru

Joined: 09/06/2011
Location: Australia
Posts: 512
Posted: 01:15am 15 Jan 2012
Copy link to clipboard 
Print this post

OK, so I stopped my complaining and did the mod.

Yes, I can see where Darth said the keyboard is not good.

The mod, as described, makes the laser base continue moving. If you press LEFT it keeps going left until you press RIGHT and it keeps going RIGHT.

I fixed this by adding KEY$="" before the INKEY$ read. Now it works as it should, only moving the base when a key is being pressed.

There is a problem though. MMBasic seems to apply the key delay and repeat rate to the speed of reading with INKEY$.

Is there a command to set this repeat rate and delay to a smaller value? This rate will effect all arcade type games that require a fast key response.

The Joystick that Garth uses is faster in response but the keyboard could be too if this delay is removed. Next firmware update Geoff?

In the TRS-80, you could do a POKE to increase the INKEY$ response time.

My review of this game...

Clearly, BASIC's inconsistent timing makes it hard to get smooth moving graphics for an arcade type game on the MM. But then, this is the case with many of the BASIC's not tuned specifically for games.

The programmable characters of MMBASIC is what makes this game possible with aliens that look like aliens rather than lo-res monochrome blocks and simplifies the animation and movement.

The lack of support for VGA makes the game take up only the top left corner of my screen but I don't have a lower res composite screen to test it on.

All in all, a very good attempt of an Arcade Game on the MM in BASIC, especially considering the limitations. Darth must be commended.

Keyboard control is a must if he plans to finish the game but this will depend on fixing the INKEY response time. Having it in will allow all MM users to see the fruits of Darth's efforts and not just the few hardware folks who have build the joystick control.

Hopefully this will encourage more people to create for the MM and I still hold firm on my suggestion that any software written must support the minimum MM configuration if possible to allow and encourage all MM users worldwide.

Nick

 
     Page 3 of 4    
Print this page
© JAQ Software 2024