Aug
02
2010
1

Ascension – View script draft

Aight I’m coming somewhere now and is about to start on the three mode/view classes that will be called View, ViewController and ViewModel and they will work after the Model-View-Controller concept and first one to be made is the ViewModel which will be the configuration script interface to the application.

It will work like this that the game is going to open the folder “data/views” and in there it’s going to look up all the files that fit *.view and load each and one of them into their own ViewModel class.

Here’s an example script:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
self.SetName("Test")
 
OnInit = self.NewMethod("OnInit")
OnInit < Standard.Kernel.PrintLine("YAY! =D")
OnInit < quit_button.RegisterSignalHandler("Signal.Button.Click", OnButtonClick)
OnInit < background.FitToWindow()
 
OnDeinit = self.NewMethod("OnDeinit")
OnDeinit < Standard.Kernel.PrintLine("Auuw! D=")
OnDeinit < quit_button.UnregisterSignalHandler("Signal.Button.Click", OnButtonClick)
 
OnButtonClick = self.NewMethod("OnButtonClick", "b")
OnButtonClick < Application.Quit()
 
self.RegisterSignalHandler("Signal.Controller.Init", OnInit)
self.RegisterSignalHandler("Signal.Controller.Deinit", OnDeinit)
 
background = self.AddImage("data/graphics/background.png")
background.x = 0
background.y = 0
background.visible = true
 
quit_button = self.AddButton("Quit", "data/graphics/button.png")
quit_button.x = 100
quit_button.y = 50

There’s a lot more to be done here and some parts that I don’t show. For example I will also allow the ViewModel to receive the signal “Signal.Controller.Update” which is a signal from the controller that the view
is being updated. And the view always get updated once each frame. Though I would prefer to avoid the use of this signal as it will slow down the engine significantly if this method needs to be called each frame. And what if we got 100 objects showing that needs their own OnUpdate method called, and so on and so on. It will end up with that we only got 5 FPS or something like that. So instead I will add a lot of stuff like the “SetBackgroundImage” and the “AddButton” methods so that we prepare before it starts instead of working every frame.

Jul
26
2010
1

Ascension – Doxygen documentation site

Well I think I finally understands how GitHub works and how great it really is. I’ve added a github page where I’ve posted my Doxygen documentation of the Ascension project. Should help me alot while working on it as I don’t need to look up on each specific function on what it do but just simply have the documentation on a separate display to reference.

The documentation site is: http://groogy.github.com/Ascension/

Jul
21
2010
2

Ascension configuration

Well I’ve started working on the configuration system integrated into the main controller of Ascension and I got a small draft that first assumes some default values and then reads a configuration file to give us a chance to change these values from an external resource.

Well Anyway the configuration is saved with normal Madness Script and is separated by modules that are named after whatever category they are concerning.

Here’s an example:

1
2
3
4
5
6
7
8
9
Graphics < Width = 1024
Graphics < Height = 728
Graphics < Fullscreen = false
Graphics < AntialiasingLevel = 1
Graphics.Compile
 
Keyboard.Bind("Move Up", Keyboard.UP)
Keyboard.Bind("Move Down", Keyboard.DOWN)
// Etc. etc.
Jul
19
2010
0

New Ascension classes – Symbol and BaseController

Well I’ve added two new classes to the project and I believe that there won’t be any more changed to them as they have all functionality I want with them.

First are the Symbol class which is an idea I got from Ruby symbols. They are supposed to be used as optimized identification strings where comparison is as fast as it can be. The second class is the BaseController which implements the base functionality of a controller. It implements the ability to ask which will let an outside non-friend class query the controller after a specific value . I thought of it like a system based on “Answering a question” which is sent to the controller.

All of this can be found in the Github repository.

(more…)

Jul
19
2010
0

Ascension on Github

Just thought that I should post here that I’ve created a repository for the Ascension project on Github. All work I do will be placed under the work branch but whenever I get a stable release of it I will create a separate branch for it probably with the name containing the version. The branch called just “stable” will be the latest time I was able to run all test and it didn’t crash but it won’t count as an own stable version.

The address for the repository is: http://www.github.com/Groogy/Ascension

Written by Groogy in: Ascension,Projects | Tags: , , , , ,
Jul
11
2010
0

Madness Script 2.0.0

I know I know! I said I was putting down the Madness Script Project but since then I started using it for the Ascension Project. So I got some pretty new and fine toys and various bugs fixed. I will need to remake the entire documentation for the project both in the code and here on this website. At the bottom of this post you can also read all the changes that was made to the mSCRiPT language.

Here’s the source and interpeter: mSCRiPT-2.0.0

(more…)

Jun
24
2010
0

Madness Script comeback!

Oh, I got to dust it off. I’m thinking about to use it instead of Ruby for Ascension. I am having a problem with getting Ruby embedded in the application for windows. Whenever I tried any output to a file or stdout, it crashed.

So I’ll play around with Madness Script instead for Ruby. I won’t change or improve Madness Script cause it crashed in a dead end. But the latest version should work well enough.

Jun
22
2010
0

C++ for Ascension

Aight so I meet some resistance in Ruby. Not the speed of ruby itself but the fact that I can’t get this damn blur effect to work in real-time rendering. So the main shift was from the start to switch from Rubygame to SFML for ruby, but I noticed that the ruby version for SFML was only 1.2 and the latest version of SFML is 1.6 and there’s a huge difference between them so I had to switch everything to C++ but I will use Madness Script as the scripting language.

Here I’ll now go trough the entire structure of the project in C++ and also show some homemade diagrams. Why I’m not using proper UML is because I’m lazy.
(more…)

May
22
2010
0

Ascension map system draft

Currently I’m working on Ascension’s map system and I’ll be posting the draft for the system here. Mostly for my own convenience.

Right. So what kind of map do I want? What got me interested in this project was RPG Maker VX. The map there is based on a grid, each grid being 32×32 pixels I think. What I want is a more smooth map, with no grid. You could say that the grid has been modified so that one square is 1×1 pixel big. First let’s talk about the terrain and data structure of the map.

(more…)

May
19
2010
0

Ascension’s Loading Manager

I did something pretty cool today ^^ Well at least I think it’s pretty cool. Also quite simple. A module in Ruby that’s pretty independent and can be used for most applications. It’s called LoadingManager and it will queue things needed by the application and load them in a separate thread for you without you even having to be aware that it is run in another thread.

Here comes an example with it using Rubygame surfaces

1
2
3
4
5
6
7
8
9
10
11
require 'rubygame'
require 'loading_manager.rb'
 
LoadingManager.load Rubygame::Surface, "image1.png"
LoadingManager.load Rubygame::Surface, "image2.png"
LoadingManager.load Rubygame::Surface, "image3.png"
 
# Will print something between 0.0 to 1.0 depending on how far the thread has gone
p LoadingManager.progress
# Wait for the loading to finish before exiting the application.
LoadingManager.join

(more…)

Powered by WordPress. Theme: TheBuckmaker