BlitzMax (free download after creating an account at blitzbasic.com)
OJsDad, you may like this
I programed all my games in this, and its a very good and easy language"BASIC"
Thanks for the heads up!
Im paid about £80 GBP for it, and it still sold for a high price a few days ago
You might also be interested in App Game Kit by the Gamecreators.
What started out as a kickstarter for a development kit for cross-platform games, now seems to be going in the direction of a substitute for their older Flagship product; DarkBASIC Pro.
The upcoming additions to the 3D toolset are impressive, while DBP hasnt been updated for a while now.
You can choose to program in AGK in BASIC or C.
Www.thegamecreators.com
Quote from: Yskonyn on September 22, 2015, 12:42:11 AM
You might also be interested in App Game Kit by the Gamecreators.
What started out as a kickstarter for a development kit for cross-platform games, now seems to be going in the direction of a substitute for their older Flagship product; DarkBASIC Pro.
The upcoming additions to the 3D toolset are impressive, while DBP hasnt been updated for a while now.
You can choose to program in AGK in BASIC or C.
Www.thegamecreators.com
thanks, that's really good news
Thanks Gameleaper. I grabbed it.
Quote from: Yskonyn on September 22, 2015, 12:42:11 AM
You might also be interested in App Game Kit by the Gamecreators.
App Game Kit was recently part of a humble bundle, got it for a song. So recommend keeping an eye out for deals.
To get back to the thread...I have long looked at Blitzbasic. Plenty of good docs out there to help with it. So this is good news.
I did find a link on the Blitz web site for utility called MapEditor. Doesn't look like it's being updated anymore, but it does look like it could be very handy in making hex grid maps.
You know what I would sign up for? gameleaper giving how to instruction on designing and coding the various parts of the games that he does. For years, I've looked at Blitzthis, and Blitzthat, and GameCreator this and that and every time I get stuck at the part where I actually do something that would be for a hex and counter wargame; be it the hexgrid or moving pieces along a grid or storing and retrieving attack-defense values, etc. There's a gazillion examples on how to made a side-scroller but nothing really that pertains to *our* hobby. gameleaper seems to of mastered how that's done and I'd love to have some of that knowledge!
Quote from: GJK on September 25, 2015, 03:13:50 PM
You know what I would sign up for? gameleaper giving how to instruction on designing and coding the various parts of the games that he does. For years, I've looked at Blitzthis, and Blitzthat, and GameCreator this and that and every time I get stuck at the part where I actually do something that would be for a hex and counter wargame; be it the hexgrid or moving pieces along a grid or storing and retrieving attack-defense values, etc. There's a gazillion examples on how to made a side-scroller but nothing really that pertains to *our* hobby. gameleaper seems to of mastered how that's done and I'd love to have some of that knowledge!
here is a blitzPlus chess game with source code
https://www.dropbox.com/s/clhvr6fi58c0y2p/GameLeaperChess.zip?dl=0
If you look at the code of a chessboard its the same as a boardgame, you have chits and a board, you pickup a chit then click new position, if you expand the example code you can make a full size boardgame, the final code is named quitit3. a hex board is made not of hexes but squares one rank slightly lower than the previous and the next rank, you see the drawn hexes but its realy squares :)
I don't code like anybody else Ive met, I just crack every problem with a sledgehammer, I just do whatever code comes to mind , even do bad code that still works if you bend the problem. I asure you wargames are a great subject to program.
PLEASE PLEASE ignore the complex looking code here, you build a program slowly brick by brick and then forget the bricks, just look at the pricipals, also the blitzplus program is much more complex than is needed, I just am a bloating coder because I don't plan I just get on and do the code even though I do far more work than is needed, I should plan it better
I will jot down a few nuggets Ive learned as I think of them.
1) Hexes are really square(programing wise)
2)you need a grid to remember the board , what chit is there and what values for strength etc.. you do this with an array eg: board[50,50,20] so you have a 50x50 board with 20 elements for info, so board[1,0,1] = chitt1, board[2,0,1] = chit1, or board[2,0,1] = chit6
in this example the element 1([...,...,1]) is the chit slot where the grid remembers what chit is where
3) have a display function, with a FOR NEXT loop
FOR x = 0 to 50
FOR y = 0 to 50
if board[x,y,1] = 1 then draw chit1
NEXT
NEXT
you would actualy write something like this "drawimage(x*40,y*40,frame=chit)"
that is for 40x40 pixel chits, and the chit variable is the number in the set of chits
board[1,0,2] could equal strength
board[1,0,3] could equal armor etc...
so now you have a grid, and a display function to draw the grid.
you now need to know where the mouse is hovering or clicking
you call a gethex function, basically you locate the mouse, by saying if mouseX is less than 40 and greater than 0 your on hexrow 1, and if mousey is greater than row 0 and less than 40 your on rank 1 etc...
your function has to locate the mouse anywhere on the board
you can only display a small part of a big board on the screen at a time, so you need an index for your display function, simple z = 0, and y = 0.
if you press down y=y+1
if you press up, y=y-1
if you press left z=z-1
if you press right z=z+1
then you just add z to x in your display function and add y to x
I being broad in my discriptions, you have to learn to make your variables global by putting global before the variable name at the beginning of the program, so the program remembers the variable throughout the game, and you have to be carefull not to go beyond the boundries of the grid or your program will crash, for example adding z to x can give an out of bounds error, you have to check this, you can also put safeguards in to avoid this like this If z+x < 50 and z+x > 0 then draw chit
Im a bit of an error here z x and ys. just use 4 differren letters as vvariables like these z,x,q,w,
you can only learn by experiencing each brick at a time, try it out for yourself is the only way. I hope Ive given you enough to begin
you put it altogether like this.
first off if you left-click you find what hex your over, then draw a yellow box there, then left-ckick a second hex and move the first to the second location like this
FOR f= 0 to 20
(leftclickedX,LeftclicedY,f) = (firstleftclickedX,firstLeftclicedY,f)
NEXT
and this will move all the info to next hex, remember to delete the first hex info afterwards
I wont write anymore, its enough for you to get started I hope :)
Professor gameleaper, please teach the first ever Grogheads class... O0
Quote from: bbmike on September 25, 2015, 06:20:58 PM
Professor gameleaper, please teach the first ever Grogheads class... O0
:) thanks bb - hey I think GJK may do a wargame, I hope I have helped a bit. also the games made with Blitz are small so easy to share.
That's what I'm talking about gl! I need to make sure that my copy of Blitzmax is up to date (I know that it's not) and then I'll start tinkering around. Great stuff, thanks!
Quote from: GJK on September 25, 2015, 09:46:39 PM
That's what I'm talking about gl! I need to make sure that my copy of Blitzmax is up to date (I know that it's not) and then I'll start tinkering around. Great stuff, thanks!
you must provide 2 files for this program to work troops.png 20 pixels high 40 across 2 chits
'a 1024x768 backdrop
Graphics 1024,768,32,60
Global chit = LoadAnimImage(".\troops.PNG",20,20,0,2,flags=ALPHABITS ) '2 twenty by twenty chits
Global backdrop = LoadImage(".\backdrop.PNG" ) 'plain backdrop
Global gameboard[10,10,20] '10 x 10 grid gameboard with 20 items of info per location
Global x1 = 0
Global y1 = 0
'try setting the gameboard as shown below
gameboard[1,1,1] = 1
gameboard[1,3,1] = 1
While Not KeyHit(KEY_ESCAPE) 'hit escape to exit
Cls 'clear screen before redrawing each loop through
DrawImage(backdrop ,0,0) 'draw backdrop
'use a for next loop to draw chits
For x= 0 To 9
For y = 0 To 9
If gameboard[x,y,1] = 1 Then DrawImage(chit,x*20,y*20,frame=1) 'frame is chit number
Next
Next
' devise x and y by 20 pixels, this is because the chits are 20 pixels
'the idea is to find where the mouse pointer is
x1 = MouseX() /20
y1 = MouseY() /20
'this sets gameboard on off by left or right clicking
If x1 < 10 And x1 > -1 And y1 < 10 And y1 > -1
If MouseDown(1) 'Left click set on
gameboard[x1,y1,1] = 1
EndIf
If MouseDown(2) 'right click set off
gameboard[x1,y1,1] = 0
EndIf
EndIf
Flip 'this flips the board onto the screen
Wend
End
the text after the ' quote are info only text and can be omitted
the program above will draw a board and chits, that you can test and change, its just to show you how to start
its 0 to 9 arrays start at 0, and end 1 less than than you say in the global statement.
the above code snippet is real and will run in BlitzMax , nearly all you need is there.
I forgot to put Flip command , done it now, sorry
' just tested the code works fine , I just typed it out without testing all fixed now
you must provide 2 files for this program to work troops.png 20 pixels high 40 across 2 chits
'a 1024x768 backdrop
Graphics 1024,768,32,60
Global chit = LoadAnimImage(".\troops.PNG",20,20,0,2,flags=ALPHABITS ) '2 twenty by twenty chits
Global backdrop = LoadImage(".\backdrop.PNG" ) 'plain backdrop
Global gameboard[10,10,20] '10 x 10 grid gameboard with 20 items of info per location
Global x1 = 0
Global y1 = 0
'try setting the gameboard as shown below
gameboard[1,1,1] = 1
gameboard[1,3,1] = 1
While Not KeyHit(KEY_ESCAPE) 'hit escape to exit
Cls 'clear screen before redrawing each loop through
DrawImage(backdrop ,0,0) 'draw backdrop
'use a for next loop to draw chits
For x= 0 To 9
For y = 0 To 9
If gameboard[x,y,1] = 1 Then DrawImage(chit,x*20,y*20,frame=1) 'frame is chit number
Next
Next
' devise x and y by 20 pixels, this is because the chits are 20 pixels
'the idea is to find where the mouse pointer is
x1 = MouseX() /20
y1 = MouseY() /20
'this sets gameboard on off by left or right clicking
If x1 < 10 And x1 > -1 And y1 < 10 And y1 > -1
If MouseDown(1) 'Left click set on
gameboard[x1,y1,1] = 1
EndIf
If MouseDown(2) 'right click set off
gameboard[x1,y1,1] = 0
EndIf
EndIf
Flip 'this flips the board onto the screen
Wend
End
the 2 graphic files need to be next to the exe file, just drop them in the blitzmax folder. Ive tested the code
this program is nearly all you need to write a game
you must provide 2 files for this program to work troops.png 20 pixels high 40 across 2 chits
'a 1024x768 backdrop
Graphics 1024,768,32,60
Global chit = LoadAnimImage(".\troops.PNG",20,20,0,2,flags=ALPHABITS ) '2 twenty by twenty chits
Global backdrop = LoadImage(".\backdrop.PNG" ) 'plain backdrop
Global gameboard[10,10,20] '10 x 10 grid gameboard with 20 items of info per location
Global x1 = 0
Global y1 = 0
'try setting the gameboard as shown below
gameboard[1,1,1] = 1
gameboard[1,3,1] = 1
While Not KeyHit(KEY_ESCAPE) 'hit escape to exit
Cls 'clear screen before redrawing each loop through
DrawImage(backdrop ,0,0) 'draw backdrop
'use a for next loop to draw chits
For x= 0 To 9
For y = 0 To 9
If gameboard[x,y,1] = 1 Then DrawImage(chit,x*20,y*20,frame=1) 'frame is chit number
Next
Next
' devise x and y by 20 pixels, this is because the chits are 20 pixels
'the idea is to find where the mouse pointer is
x1 = MouseX() /20
y1 = MouseY() /20
'this sets gameboard on off by left or right clicking
If x1 < 10 And x1 > -1 And y1 < 10 And y1 > -1
If MouseDown(1) 'Left click set on
gameboard[x1,y1,1] = 1
EndIf
If MouseDown(2) 'right click set off
gameboard[x1,y1,1] = 0
EndIf
EndIf
Flip 'this flips the board onto the screen
Wend
End
Ok you got me on a roll, finished now. the above code is tested.
the code now allows you to set the chits on the board on off.