Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

ProgressEngine - 2D GDI Game Engine


  • Please log in to reply
11 replies to this topic
Uberi
  • Moderators
  • 1119 posts
  • Last active: May 02 2015 06:05 PM
  • Joined: 23 Aug 2010
Behind the jumping, scrolling, dynamic world of Achromatic/ProgressPlatformer lies ProgressEngine, a simple and elegant game engine. Designed for ease of use, this extensible library takes care of the boilerplate and the low-level stuff so you don't have to.

Features:
  • Basic physics engine built in.
  • Unlimited, movable, scalable layers.
  • Consistent coordinate system - viewports can be freely resized.
  • MIDI music support with an asynchronous API.
  • Brushes, contexts, bitmaps, and other resources are managed automatically.
  • Easy customisation of existing drawtypes and the ability to create your own drawtypes.
  • Container entities for grouping several entities together.
Download:

The engine is included as a part of the ProgressPlatformer package:

GitHub

To download the distribution use this link:

ZIP Archive

Usage:

See the ProgressEngine Tutorial for a primer on how to use ProgressEngine to build multimedia applications.

Complete documentation is available in the Documentation subfolder of the ProgressEngine distribution.

Final result:

Posted Image

Uberi
  • Moderators
  • 1119 posts
  • Last active: May 02 2015 06:05 PM
  • Joined: 23 Aug 2010
Update:
  • New image sprite drawtype! Specify an image and it will be drawn in the dimensions you set!

    ProgressEntities.Image: A drawtype for images, that can draw an image provided as a filename. Possesses the usable properties Image and TransparentColor, which specify the filename to load the image from, and the color in the image to draw as transparent, respectively.

  • Documented ProgressEngine.Container drawtype, which allows nested entities that exist within the container.


Uberi
  • Moderators
  • 1119 posts
  • Last active: May 02 2015 06:05 PM
  • Joined: 23 Aug 2010
Creating music for ProgressEngine use:

The NotePlayer API was designed with ease of use in mind, but what if you want something even simpler?

Enter the MIDI Note Converter tool for ProgressEngine:

Posted Image

Posted Image

Usage:

See the README file for details about how to use this program.

Download:

The MIDI Note Editor is included with the ProgressPlatformer distribution, and as such it can be downloaded from the first post along with ProgressEngine.

The program is located in the MIDI folder.

Learning one
  • Members
  • 1483 posts
  • Last active: Jan 02 2016 02:30 PM
  • Joined: 04 Apr 2009
Hey Uberi, I got something for ya 8)
Notes := new NotePlayer(1)
Notes.Repeat := 1

Notes.Note(40,350).Note(45,350).Note(52,350).Note(57,350).Delay(500)
Notes.Note(43,350).Note(48,350).Note(55,350).Note(60,350).Delay(500)
Notes.Note(45,750).Note(50,750).Note(57,500).Note(62,500).Delay(750)

Notes.Note(40,500).Note(45,500).Note(52,500).Note(57,500).Delay(500)
Notes.Note(43,500).Note(48,500).Note(55,500).Note(60,500).Delay(500)
Notes.Note(46,250).Note(51,250).Note(58,250).Note(63,250).Delay(250)
Notes.Note(45,1000).Note(50,1000).Note(57,1000).Note(62,1000).Delay(1000)

Notes.Note(40,500).Note(45,500).Note(52,500).Note(57,500).Delay(500)
Notes.Note(43,500).Note(48,500).Note(55,500).Note(60,500).Delay(500)
Notes.Note(45,750).Note(50,750).Note(57,500).Note(62,500).Delay(750)

Notes.Note(43,500).Note(48,500).Note(55,500).Note(60,500).Delay(500)
Notes.Note(40,1000).Note(45,1000).Note(52,1000).Note(57,1000).Delay(1000)
Notes.Delay(500)

Notes.Start()
return

Esc::ExitApp

#Include Music.ahk
(Deep Purple - Smoke on the Water)

Learning one
  • Members
  • 1483 posts
  • Last active: Jan 02 2016 02:30 PM
  • Joined: 04 Apr 2009
Another one 8) Posted Image8)
Notes := new NotePlayer(66)     ; 66 = Muted Electric Guitar 
Notes.Repeat := 1
Loop, 2
{
	Loop, 8
	{
		Notes.Note(61,100).Delay(100)
		Notes.Note(57,100).Delay(100)
		Notes.Note(64,100).Delay(100)
		Notes.Note(57,100).Delay(100)
	}
	Loop, 8
	{
		Notes.Note(62,100).Delay(100)
		Notes.Note(57,100).Delay(100)
		Notes.Note(65,100).Delay(100)
		Notes.Note(57,100).Delay(100)
	}
}
Loop, 4
{
	Notes.Note(69,100).Delay(100)
		Notes.Note(57,100).Delay(100)
	Notes.Note(67,100).Delay(100)
        Notes.Note(57,100).Delay(100)
	Notes.Note(66,100).Delay(100)
        Notes.Note(57,100).Delay(100)
	Notes.Note(67,100).Delay(100)
        Notes.Note(57,100).Delay(100)
    
	Notes.Note(66,100).Delay(100)
        Notes.Note(57,100).Delay(100)
	Notes.Note(64,100).Delay(100)
        Notes.Note(57,100).Delay(100)
	Notes.Note(66,100).Delay(100)
        Notes.Note(57,100).Delay(100)
	Notes.Note(62,100).Delay(100)
        Notes.Note(57,100).Delay(100)

	Notes.Note(64,100).Delay(100)
        Notes.Note(57,100).Delay(100)
	Notes.Note(61,100).Delay(100)
        Notes.Note(57,100).Delay(100)
	Notes.Note(62,100).Delay(100)
        Notes.Note(57,100).Delay(100)
	Notes.Note(61,100).Delay(100)
        Notes.Note(57,100).Delay(100)

	Notes.Note(62,100).Delay(100)
        Notes.Note(57,100).Delay(100)
	Notes.Note(61,100).Delay(100)
        Notes.Note(57,100).Delay(100)
	Notes.Note(62,100).Delay(100)
        Notes.Note(57,100).Delay(100)
	Notes.Note(61,100).Delay(100)
        Notes.Note(57,100).Delay(100)
}

oVoice := ComObjCreate("SAPI.SpVoice")
Notes.Start()
Sleep, 2300
oVoice.Speak("You are listening to Thunderstruck by AC-DC. Let's rock!",0x1)
return

F1::oVoice.Speak("Thunderstruck!",0x1)
F2::oVoice.Speak("Let's rock!",0x1)
Esc::ExitApp

#Include Music.ahk
(AC/DC - Thunderstruck)

Uberi
  • Moderators
  • 1119 posts
  • Last active: May 02 2015 06:05 PM
  • Joined: 23 Aug 2010
Amazing!

:D :D :D

Uberi
  • Moderators
  • 1119 posts
  • Last active: May 02 2015 06:05 PM
  • Joined: 23 Aug 2010
MIDI Note Editor has been updated to support previewing tunes and lines with delays but not notes, as well as several bugfixes.

It's also now part of the ProgressEngine distribution, and you can download it with the rest of ProgressEngine!

iAHK
  • Members
  • 29 posts
  • Last active: Feb 18 2014 10:24 AM
  • Joined: 09 Apr 2012
Hi, I am intensely interested in your game engine and would really like to prototype my game idea on your platform and I have a few questions before I investigate further on my own:

+ can I use PNGs in your engine? if so, can I rotate them and animate them in a PNG sequence?
+ can I draw circles (doesn't have to be visible) in your game engine and detect if a given point in inside of the circle?

Uberi
  • Moderators
  • 1119 posts
  • Last active: May 02 2015 06:05 PM
  • Joined: 23 Aug 2010

+ can I use PNGs in your engine? if so, can I rotate them and animate them in a PNG sequence?


Support for PNG and PNG animation formats is not built in. That said it can be added in by creating a custom entity that implements that behavior.

Work is currently focusing on abstracting the graphics into a separate backend. That will allow a much larger variety of things to be drawn, and many more formats to be supported as well, including PNG images. Expect the initial unveiling within a week or so.

+ can I draw circles (doesn't have to be visible) in your game engine and detect if a given point in inside of the circle?


No, but it's rather trivial to do like so:

CirclePosX := 5
CirclePosY := 5
CircleRadius := 3

PointPosX := 3
PointPosY := 4

If ((PointPosX - CirclePosX) ** 2) + ((PointPosY - CirclePosY) ** 2) <= Radius ** 2
    MsgBox, Inside circle!
Else
    MsgBox, Outside circle!

It's simply using a rearranged version of the Pythagorean theorum to calculate distances.

Good luck with your game idea!

iAHK
  • Members
  • 29 posts
  • Last active: Feb 18 2014 10:24 AM
  • Joined: 09 Apr 2012
Thanks for your reply! It is very much appreciated, I got another question though... would you recommend me to use your platform to create animation and collision intensive games?

Uberi
  • Moderators
  • 1119 posts
  • Last active: May 02 2015 06:05 PM
  • Joined: 23 Aug 2010

Thanks for your reply! It is very much appreciated, I got another question though... would you recommend me to use your platform to create animation and collision intensive games?


Not at the moment - the physics engine will be undergoing a rework shortly. Animation should be fine, though.

Currently the physics engine supports only axis-aligned bounding boxes (AABBs). For more advanced stuff, you may want to investigate using something like Box2D or Chipmunk, which provide tons of physics functionality. These, however, are not as easy to use.

iAHK
  • Members
  • 29 posts
  • Last active: Feb 18 2014 10:24 AM
  • Joined: 09 Apr 2012

Not at the moment - the physics engine will be undergoing a rework shortly. Animation should be fine, though.

Currently the physics engine supports only axis-aligned bounding boxes (AABBs). For more advanced stuff, you may want to investigate using something like Box2D or Chipmunk, which provide tons of physics functionality. These, however, are not as easy to use.


Alright, I've looked at Box2D and I think I should try it out with that first. Thanks for the recommendation. :)