basicprogramming.org


Welcome, Guest. Please login or register.
Did you miss your activation email?
Forum time; Jul 31. 2010, 03:59
Home Help Search Calendar Login Register
News: Have you got suggestions for BasicProgramming.org? Let's hear them!
Interested in creating your own programming language? Check out the QDepartment group!

+  BASIC programming forum
|-+  Basic Coding
| |-+  Basic Interpreters.
| | |-+  BlitzBasic
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: 1 [2] Go Down Reply Print
Author Topic: BlitzBasic  (Read 516 times)
OneHitWonder
Jr. Member
**
Offline Offline

Posts: 81



« Reply #15 on: Jan 12. 2010, 23:29 » Reply with quote

Hi E.K.V,

BlitzBasic does support 'else' and 'elseif' however using 'elseif' doesn't allow me to press 2 keys at once and travel diagonal.

What 'BASIC' do you use?

Regards,

Kirk.
 
Report to moderator   Logged

I need a girl whose name doesn't end in .JPG Smiley
E.K.Virtanen
Blah
Hero Member
*****
Offline Offline

Posts: 2441



WWW
« Reply #16 on: Jan 13. 2010, 15:10 » Reply with quote

BlitzBasic does support 'else' and 'elseif' however using 'elseif' doesn't allow me to press 2 keys at once and travel diagonal.

Basicly you are not doing it with your code either. It moves your character at one direction first, and then to the other one and makes a illusion of diagonal movement.

If you want to be able to move in 8 directions (left, up, right, down and between them), you need to do a 8 IF lines.

Here it's in english.

Code:
Function movement()

If KEYUP and KEYLEFT then
set x and y
elseif KEYUP and KEYLEFT then
set x and y
elseif KEYDOWN and KEYLEFT then
set x and y
elseif KEYDOWN and KEYRIGHT then
set x and y
elseif KEYUP then
set x and y
elseif KEYLEFT then
set x and y
elseif KEYDOWN then
set x and y
elseif KEYRIGHT then
set x and y
endif
;draw player
Oval x, y, 10, 10

End Function

It is important to check if more than one key is pressed, or one of directions is not followed. When code hits to first elseif which fills the conditions, it makes it happend and escapes from the whole IF...THEN structure.

Quote
What 'BASIC' do you use?

yabasic, freebasic, bacon, smallbasic, runbasic and few others are my favorites. Though not too much time to use any basic currently   :'(
Report to moderator   Logged

OneHitWonder
Jr. Member
**
Offline Offline

Posts: 81



« Reply #17 on: Jan 13. 2010, 17:05 » Reply with quote

Thanks E.K.Virtanen this very helpful, I had no idea it only creates the illusion of going diagonal.

Much appreciated!  Smiley

Report to moderator   Logged

I need a girl whose name doesn't end in .JPG Smiley
E.K.Virtanen
Blah
Hero Member
*****
Offline Offline

Posts: 2441



WWW
« Reply #18 on: Jan 14. 2010, 06:48 » Reply with quote

Well basicly it moves player first at left, then up and so on. If there is a monster at the left of the player, and player wants to move up-left, he should avoid monster but he isn't.

But that is part of learning  Wink
Report to moderator   Logged

OneHitWonder
Jr. Member
**
Offline Offline

Posts: 81



« Reply #19 on: Jan 14. 2010, 17:25 » Reply with quote

 Smiley I have now changed the movment of my "shape" to carry in that direction even after keypress. I want to make my first basic game a snake like game. Anyone here remade that classic before?

OneHitWonder
Report to moderator   Logged

I need a girl whose name doesn't end in .JPG Smiley
Arnebcab94
Newbie
*
Offline Offline

Posts: 10


« Reply #20 on: Jan 26. 2010, 12:11 » Reply with quote

Hi everyone,
I started scripting in Javascript but that really sucked Cheesy so i searched for an easy language thats fast to learn.
Around the net i found sdlbasic and started teaching it myself through the reference document. After a few hours i could write my first game : D (it was just a pic that i could move around using keys). some months later i started learning Java in my schools computer science class. Now i learing c++ again through tutorials. works really good for me.
Report to moderator   Logged
Kepu
Newbie
*
Offline Offline

Posts: 12


« Reply #21 on: Apr 05. 2010, 21:48 » Reply with quote

BlitzBasic is maybe the simplest to learn and same time most effective
3d-basic.

Use samples first, that is fastest way to learn, and then use forum waw it has huge amount of messages.

I have used it quite lot, and also tried ( not few weeks -months/basic doing large progs with following basics, which have  integrated 3d commands or using from libraries 3d commands like
Darkbasic, XSTBasic, Ibasic, FreeBasic, CreativeBasic, EmergenceBasic, Aurora, Basic4GL, GLBasic, HSP, Purebasic, and Truebasic.
Note, not in quality order.
Some of those works good  in 3D, some of those use directx commands making them a little heavier, some of those are unstable in larger progs, some are coded very old fashion way (event loops,or...) making them very heavy to use larger progs.
But No one of those are not so easy to use than BlitzBasic,  not even BlitzMax although, it may grow larger

NOTE: THIS IS MY OPINION, I know somebody might attach back

Kepu
Report to moderator   Logged
Pages: 1 [2] Go Up Reply Print 
« previous next »
Jump to:  
Atom RDF RSS 0.91 RSS 2.0


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!