RetroBASIC
Offtopic => Offtopic => Topic started by: dragomrak on January 28, 2016, 03:21:12 PM
-
Hello,
I'd like to start a little step into gamecoding. Which language would be a good choice to make the first steps with. I use Linux. There are not much options I suppose. And BTW: should I be good in mathematics? What do I need from mathematics? It's never been one of my favourites in school.
-
Hi Dragomrak,
You did nice job of turning cvs file reading into a game!
IMO learning is best game.
-
LOL. Good joke. My routine is not working up to now and it seems that it wont for a while. There are some more problems to solve...
-
The question is what do you want to achieve? Of course you start slowly but do you want to keep that language after you learned the basics?
What languages do you already know? Keep in mind: if you'll ask 10 people, you'll probably get 10 different answers ...
-
I'd like to start a little step into gamecoding. Which language would be a good choice to make the first steps with.
The answer is rather obvious - Lua (http://www.lua.org/). There are several projects based on it and dedicated to 2D coding. EGSL (http://www.egsl.retrogamecoding.org//pages/home.php?lang=EN) is the best place to start (it's been replaced by Pulsar2D based on SDL2, but there is almost no documentation for Pulsar). There is also LOVE (https://love2d.org/) - more powerful and popular project based on Lua. Lua itself is extremely easy to start with. You can start with this tutorial - http://www.tutorialspoint.com/lua/ .
-
What do I want to achieve? At first I'd like to find out, if I like gamecoding and whether I'm good enough to do that. The languages I know a bit are Basic ( Qbasic, Freebasic, JB, LB ) and Pascal ( Delphi not much ) and at the moment I look at COBOL just because I am curious, which is no option for gamecoding *grin*. Anyway. The first step is to find out, if I like gamecoding. The optimal language would be the one, which is not only good for gamecoding but for "usual" programmes as well. At first sight JB or LB look good but I do not know, whether they are good for simple games.
-
The first is to find out, if I like gamecoding.
Definitely EGSL. You won't find anything easier, but you can create real 2D games with it. You can start with this : http://www.egsl.retrogamecoding.org//modules/download_gallery/dlc.php?file=72 . Have a look and you'll see how easy and cool it is. ;)
-
Thank you. That looks pretty easy and cool. :-)
-
Hi dragomrak,
We have started a Starfleet Academy project at SdlBasic's brand spanking new site:
http://sdlbasic.epizy.com/index.php
If you played old Star Trek games, we need your help because our cadets are from all over space with knowledge of BASIC's, languages and dialects, and countries languages and dialects. The moderator uses Linux and can help with those issues or will certainly try.
I speak for myself when I say none of us know what the h, we are doing or talking about but that is half the fun!
Even if you dont know Star Trek you are invited, just dont talk about Star Wars too much ;) a joke, talk about whatever you like but desire to learn and have fun doing it!
All members here are invited.
-
What do I want to achieve? At first I'd like to find out, if I like gamecoding and whether I'm good enough to do that. The languages I know a bit are Basic ( Qbasic, Freebasic, JB, LB ) and Pascal ( Delphi not much ) and at the moment I look at COBOL just because I am curious, which is no option for gamecoding *grin*. Anyway. The first step is to find out, if I like gamecoding. The optimal language would be the one, which is not only good for gamecoding but for "usual" programmes as well. At first sight JB or LB look good but I do not know, whether they are good for simple games.
You know FreeBASIC and Pascal, so why not use Pulsar2D? You can use it as a framework for both languages, although I would recommend starting with FreeBASIC. (That's because FreeBASIC comes with its own SDL2 header files.)
A small example looks like this:
' shows how to load an image and turn that into a sprite
#include once "pulsar2d.bi"
using p2d
TYPE player
x as integer
y as integer
image as p2d.sprite
END TYPE
dim win as p2d.window
dim image as p2d.image
dim grass as p2d.sprite
dim key as integer
dim knight as player
win = openwindow ("Simple Sprite Example",-1,-1,800,600)
setactivewindow (win)
setframetimer (100)
image = loadimage ("media/sprite.bmp")
knight.image = createsprite (image)
freeimage (image)
image = loadimage ("media/grass.bmp")
grass = createsprite (image)
freeimage (image)
knight.x=windowwidth/2
knight.y=windowheight/2
textsize (2)
do
key=p2d.getkey()
clearwindow()
if keystate (SDL_SCANCODE_RIGHT) then
knight.x=knight.x+1
end if
if keystate (SDL_SCANCODE_LEFT) then
knight.x=knight.x-1
end if
if keystate (SDL_SCANCODE_UP) then
knight.y=knight.y-1
end if
if keystate (SDL_SCANCODE_DOWN) then
knight.y=knight.y+1
end if
for i as integer = 0 to windowwidth() step spritewidth (grass)
for j as integer = 0 to windowheight() step spriteheight (grass)
drawsprite (grass,i,j,1,1,0,false,false)
next
next
drawsprite (knight.image,knight.x,knight.y,1,1,0,false,false)
color (255,255,255,255)
drawtext ("Cursor keys to move knight, ESC to quit",0,0)
sync()
loop until key = SDL_SCANCODE_ESCAPE
freesprite (knight.image)
freesprite (grass)
closewindow (win)
closeapplication()
-
Hi,
@B+
I did not play old Star Trek games, but I will look at it. I like the old serie "Enterprise" with Mr. Spock. Unfortunately I did not follow the series after that. If you need someone more, who ( the h ) is not knowing, what he's doing, I am the right one. I am so innocent concerning gamecoding as someone can be. What is the Starfleet Acaedmy?
@Cybermonkey
I like Freebasic and Pascal very much, but I did not get it up and running on my distro. Freebasic is very easy and fun to use. I'll try to install it again. I never tried graphic programming or gamecoding, but I am interested. So I will need help to start.
It is good to hear, that I am not the only person hear, who is not a native English speaker. ;-)
Appendix: I managed to get FreeBasic running! Yeah! :-))
-
@Cybermonkey
I like Freebasic and Pascal very much, but I did not get it up and running on my distro. Freebasic is very easy and fun to use. I'll try to install it again. I never tried graphic programming or gamecoding, but I am interested. So I will need help to start.
Appendix: I managed to get FreeBasic running! Yeah! :-))
Ok, if you'd like to try Pulsar2D got to http://pulsar2d.org/ and download the source code (you'll need that for FreeBASIC).
Another thing: all FreeBASIC graphics routines won't work if you include pulsar2d.bi. That's because P2D comes with its own functions (e.g. circle etc.), so don't try to use fbc functions.
FBC has a getkey() function which I couldn't disable so use the P2D function with the prefix:
variable=p2d.getkey()
The "variable" has to be declared as an integer.
Don't hesistate to ask questions about FreeBASIC and Pulsar2D in the Pulsar2D board.
-
Hi dragonmrak,
@B+
I did not play old Star Trek games, but I will look at it. I like the old serie "Enterprise" with Mr. Spock. Unfortunately I did not follow the series after that. If you need someone more, who ( the h ) is not knowing, what he's doing, I am the right one. I am so innocent concerning gamecoding as someone can be. What is the Starfleet Acaedmy?
Starfleet Academy is a little project we started on SdlBasic to help get people up to speed with SdlBasic, practice gaming programming with Star Trek themes and metaphors, Starfleet in Star Trek is where people are trained to be officers for Federation space ships. Sitting at your laptop programming a game is sort of like sitting in the captains chair at the Enterprise.
I have to say you are certainly welcome at Starfleet (sdlBasic style) but I am concerned that you might try too many things and spread yourself too thin. What Cybermonkey recommends I would listen and seriously consider if I were in your position with your experience and with Linux. Here I think you would get more professional help, should you get stuck.
-
SdlBasic is a better choice than Pulsar, simply because Pulsar doesn't come with a solid documentation and most likely never will. After my recent problems I must also change my opinion about EGSL. It looks like these two projects are not future proof on Linux. I'm using rolling release distro based on Debian, so I get the newest stuff (programs, libraries, kernel etc.). Pulsar and EGSL are already not working with it, while SdlBasic does. It's even in the repository (I'm pretty sure Elementary OS also has it - you need to install both sdlbasic and sdlbrt). I think SdlBasic may be the best way to go (at least on Linux). Sorry for confusing you.
-
Hi Tomaaz,
I agree with you on the SDL front but committing to it as your framework for the BASIC seems too restrictive for me. With Script BASIC SDL (gfx) is an extension module interface.
What value is there in the perfect hammer if it's never picked up and used?
-
John, it's dragomrak you need to convince, not me. ;) I gave him a honest advice, but if you convince him to use ScriptBasic I won't be arguing.
-
Thanks for the positive note but I stopped promoting Script BASIC to hobbyists. Its focus is an embedding scripting engine. scriba (765KB) is an example of how to use the engine. I have demonstrated numerous times how a scriba lite compiles in under 8K.
-
At first I'd like to find out, if I like gamecoding and whether I'm good enough to do that.
Hi dragonmrak,
Nobody were born to do game coding, and trust me, there are a lot of obstacles in the way learning game development. Regarding dozens of languages, libs, engines, blah blah... But the key principles are quite stable, don't be scared by names of new techniques. Maths is definitely a requirement, but don't worry, you don't have to know anything complicated to BE a game developer to get your player move on a map or kill some monsters in the first game. If you'll not scared away then you'll have to gather as much experience as you can to BE A GOOD game developer. But learning and challenging are excited, aren't they?
I recommend GameMaker (http://www.yoyogames.com/studio)(with GML), or PyGame (http://www.pygame.org/)(with Python), because they are friendly to beginners, consider they don't require you to do tons of fundamental work to get it runnable and interactable. And they are already wildly used, especially for beginner game developers.
Best