Defensive: SHMUP Game

Life should not be all about work so this section is about xTalk coding for FUN! Games or gaming related code, fun, humorous or otherwise entertaining stacks go here!
Post Reply
xAction
Posts: 282
Joined: Thu Sep 16, 2021 1:40 pm
Contact:

Defensive: SHMUP Game

Post by xAction »

Defensivepreview10292021.PNG
Defensivepreview10292021.PNG (90.87 KiB) Viewed 9696 times
Defensive_Release_1_Minimal.zip
Minimal version, less music.
(5.65 MiB) Downloaded 289 times
Download Defensive Binaries for Mac, Windows & Linux at Itch.io
Fork and/or contribute to the GPLv3 source on Github

Simple Shoot 'em up game made in a FREE GPLv3 xTalk IDE
This is a very simple game: you fly, you dodge bullets and enemies, you shoot, you score. Good times. Code, 'art' and sounds free to use. If you want to make a game using an xTalk platform this has the basic stuff a game would need.
  • Player movement with mouse
  • Player shoots missiles
  • Random enemy spawn and move to location or 4
  • Pulsating enemy animations
  • Glow effects for faux smoke filled arcade vibe
  • Enemy shoots at player
  • Scrolling forground
  • Parallax scrolling background
  • Warping back to the middle when you reach the map boundry
  • Toggling fade in/out of object on entry/exit of an area
  • Randomly generated background/foreground mountains
  • Randomized enemy creation and re-creating every level
  • Levels that get harder ever minute
  • Sound effects
  • Music
  • Pause screen
    a. Main menu return button
    b. Resume game button
    c. Exit button with 'are you sure' pop up stack window
  • Resume action after pause
  • Options screen with options for :
    a. Screen resolutions
    b. Fullscreen
    c. Toggle anti-alias
    d. Toggle graphic effects
    e. Toggle the background's effects
    f. Toggle the background
    g. Music volume
    h. Sound effects volume
  • Fake particle explosion effects using simple UI object properties
  • Player death animation
  • Player lives counter and extra life each warp
  • Score
All graphics made entire ly with IDE UI objects without external graphic requirements. All GPL, all day, all night.
User avatar
OpenXTalkPaul
Posts: 1485
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Defensive: SHMUP Game

Post by OpenXTalkPaul »

Very cool looking, classic vector beams with glow and all, Defended-esque! Thanks for posting!

While The existing IDE is capable of making some 2D games with animated graphics with acceptable speeds, I wonder how much faster the Skia 2D rendering engine, that comes already mostly wrapped with Builder, could be for gaming? Or the Box2D library that has physics stuff that LC once talked about using?

I was just looking at some pyGame stuff again the other day, which relies heavily on SDL framework that has all sorts of capabilities, even 3D OpenGL / Metal capabilities! I just kept thinking wouldn’t it be super cool to have those capabilities be scriptable via an Xtalk instead of Python? It could be possible with Builder wrappings!
xAction
Posts: 282
Joined: Thu Sep 16, 2021 1:40 pm
Contact:

Re: Defensive: SHMUP Game

Post by xAction »

Yeah everyone and their great grandmother uses SDL, I'm really curious why that wasn't wrapped in during the OpenSource phase. Literally 14 year old programmers were building their first games with SDL before Unity took over the universe.

I guess its a whole different ball game to use basic SDL features like "Place object at X,Y" via straight C/C++ code than it is to go through the library line by line and make the whole thing talk nice to another scripting language.

Gotta Start somewhere
TwinklebearDev SDL 2.0 Tutorial
Beginning Game Programming v2.0
xAction
Posts: 282
Joined: Thu Sep 16, 2021 1:40 pm
Contact:

Re: Defensive: SHMUP Game

Post by xAction »

I wonder how much faster the Skia 2D rendering engine,
I was told we can't use the old 3D externals post version 9 because Skia is being used and it interferes with how the externals capture a stack window to draw into. According to the man in the know 'they' are droping Skia in future versions.
User avatar
OpenXTalkPaul
Posts: 1485
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Defensive: SHMUP Game

Post by OpenXTalkPaul »

xAction wrote: Sat Nov 13, 2021 1:46 pm
I wonder how much faster the Skia 2D rendering engine,
I was told we can't use the old 3D externals post version 9 because Skia is being used and it interferes with how the externals capture a stack window to draw into. According to the man in the know 'they' are droping Skia in future versions.
What old 3D externals!?!? The only one I've heard of was "Franklin 3D External" or something like that which hasn't been around for ages AFAIK. I think they've already been treating "Externals" as if it's deprecated since Builder and Extensions were released, so maybe this conflict has something to do with that. I never used the Externals SDK but I have looked at it and it seems more than a bit similar to Builder. I asked on their Forum at one point if there was still any advantages to building an External vs. building a Builder Extension but I never got an answer.

If they are dropping Skia then I would assume that means they're replacing the underlying drawing library that renders Widgets Canvas drawing with a comparable 2D drawing library and NOT getting rid of Widgets or the Builder drawing syntax that comes with that.

I would think they would get rid of the much older Cairo 2D Drawing library, if they haven't already.

We (OXT) have Skia, but we could add other drawing libraries at some point too.
xAction
Posts: 282
Joined: Thu Sep 16, 2021 1:40 pm
Contact:

Re: Defensive: SHMUP Game

Post by xAction »

B3D...thanks blitz3D (BASIC).

This one, tha includes Lua, I managed to get it to work in LC 8.1 But the 3D context doesn't show in 9.x although 9.x will build a working app with it. and it's a buggy crashy mess, the sounds don't work, it crashes on a lot of things. Built for 32-bit systems, 14 years ago, so the librarys are probably choking on 64 bit. I tried to build the source code in VisualStudio but it's a cascade of errors that are way over my head.

Franklink 3D I have on my hard drive somewhere, but I understand you have to script with C++ so I never bothered to install it.
User avatar
OpenXTalkPaul
Posts: 1485
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Defensive: SHMUP Game

Post by OpenXTalkPaul »

xAction wrote: Tue Nov 16, 2021 12:18 am B3D...thanks blitz3D (BASIC).

This one, tha includes Lua, I managed to get it to work in LC 8.1 But the 3D context doesn't show in 9.x although 9.x will build a working app with it. and it's a buggy crashy mess, the sounds don't work, it crashes on a lot of things. Built for 32-bit systems, 14 years ago, so the librarys are probably choking on 64 bit. I tried to build the source code in VisualStudio but it's a cascade of errors that are way over my head.

Franklink 3D I have on my hard drive somewhere, but I understand you have to script with C++ so I never bothered to install it.
Ah, I do remember seeing iGame3D at some point.

There was also, believe it or not, a purely LiveCode Script 3D library that someone translated from 'R' language (IIRC)
User avatar
OpenXTalkPaul
Posts: 1485
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Defensive: SHMUP Game

Post by OpenXTalkPaul »

https://github.com/markcwm/openb3d.mod
Features

Works with BRL BlitzMax and BlitzMax NG in 32-bit or 64-bit on Windows, Mac or Linux (no mobile platforms)
The wrapper is object-oriented combined with a procedural interface like in Minib3d
...
xAction
Posts: 282
Joined: Thu Sep 16, 2021 1:40 pm
Contact:

Re: Defensive: SHMUP Game

Post by xAction »

The performance was pretty awful when I tested the B3D thing. Like 14 FPS for moving around a block scene.
I think because it relies directly on LC IDE for input instead of having it's own input catching interface?
The other engine shifted out of standard input to it's own built in handlers and was super smooth, too fast even.

3D library for Livecode is impressive but I don't think it can be used to make anything more complicated than what it is, there's no collision detection and it builds 3D objects from piled up GUI graphics objects, which Defensive showed hits a performance bottleneck. Oh yeah, Just pulled in a procedural city out of Sceelix, it didn't render half the thing and still ran at like 4FPS, and that's in the binary application.
User avatar
OpenXTalkPaul
Posts: 1485
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: Defensive: SHMUP Game

Post by OpenXTalkPaul »

xAction wrote: Wed Nov 17, 2021 4:25 am 3D library for Livecode is impressive but I don't think it can be used to make anything more complicated than what it is, there's no collision detection and it builds 3D objects from piled up GUI graphics objects, which Defensive showed hits a performance bottleneck. Oh yeah, Just pulled in a procedural city out of Sceelix, it didn't render half the thing and still ran at like 4FPS, and that's in the binary application.
Thanks for that link, I didn't know it got put onto GitHub. I hadn't played around with that for a many years, it runs much better on my current laptop (2.8GHz 7th gen Core i7 64bit Intel HD 520 integrated graphics)! I'm just super impressed that they were able to do that purely with LCScript at all!
But yeah I would think doing anything more than that is going to need a highly optimized library that runs in it's own threads, so an extension that wraps a library with all of that (rendering, collision detection, etc. I would prefer input done from the script engine side) running it's own threads is definitely the way to go if you want to do 3D games. The engine only runs in two threads (one for GUI, one for everything else), but libFluidSynth, for example, creates it's own threads using glib's libgthread and so it doesn't seem to effect script engine performance. So something like that but for 3D is what you want to wrap. One tricky thing is getting the two things to talk to each other with callbacks.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests