Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411490 Posts in 69371 Topics- by 58428 Members - Latest Member: shelton786

April 24, 2024, 11:31:30 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsSolarance - A 2D asteroidsesqe space shooter/trading game
Pages: [1]
Print
Author Topic: Solarance - A 2D asteroidsesqe space shooter/trading game  (Read 3359 times)
Galaxy613
Level 1
*


10,000 Lightyears of Awesome


View Profile WWW
« on: February 01, 2011, 09:30:52 AM »

I finally get to start a devblog about --



This is a project I effectively shelved when I started to get my associates. I am now taking a break from school to work and finally revisit old projects and hopefully get them to an enjoyable state!

The game is inspired heavily from EV: Nova, but it doesn't mean I'm doing a straight clone of it. (If you don't know what Escape Velocity: Nova is...) No, I love all types of space games and I'm taking some basic ideas from EV and are introducing my own and from other games to produce something unique.

So what IS this game then? It is hard to describe, but it's a 2D-top-down space shooter with EV:Nova style physics. You'll be able to either trade peacefully, hiring fighter escorts to protect you along with other freighters to help haul your load. Or you'll be able to turn pirate and attack said freighters, appealing their will to live to tell them to drop their cargo. Even better yet, you'll be able to join the military and fight in the war between the two big factions. At least that's the end goal, but the point is to create a decently big sandbox with high replay value and PEW PEW LASER BEAMS! :D

Currently I'm the only one really working on this project as programmer/designer/etc., but I'm not alone. Friends have helped out in the past that still helps and I have been talking to my awesome music/demo buddy to get some space music going and I've been contacting some of my other friends to help with ship sprites and fluff. If you have an eye for spriting mechanical things like space ships and space station at these scales, or can create high res (that is, 1024x1024, 2048x2048 and up) planets and stars, I'll love to get in contact with you, but currently all of this is for free and is slated to be freeware. So I'm not begging anyone to come join but if this project interests you then you don't need to hesitate.

That's the run-down on this project, I just started but I DO have something to show so I put the meter at 10%. And here's that 10%:



That's it for now, I hope to have some real gameplay going before spring hits. But life is exciting right now so I'll keep on chugging and see how it turns out. Smiley Thanks for taking the time to read all of this!
« Last Edit: March 05, 2011, 05:33:14 PM by Galaxy613 » Logged

[ Quest! ] A new year, with new possibilities. [ Follow me on Twitter! ]
Galaxy613
Level 1
*


10,000 Lightyears of Awesome


View Profile WWW
« Reply #1 on: February 15, 2011, 06:33:36 PM »

Oh man a lot has happened since my last log. I started doing what I never thought I'll ever do; add Lua script support. Long story short this BlitzMax module is amazing and allows me to easily expose all my classes and related functions to Lua script without much effort at all. This finally made me sit down and learn Lua script, which I found out is pretty crazy but versatile too.

So I have spent most of my time moving my prototype's initaliziation, updating, and rendering code to Lua script, and currently looks like this:

Code: (main.lua)
---	Solarance : Procyon Council | Alpha 2
--- Lua Test
--- (C) Ion Trail Productions 2008-2011
require(SCRIPT_FOLDER.."KEY")

function Game_Init()

SystemManager:Initialize()

SystemManager:AddNew("New Avalon",15,7.5)
SystemManager:AddNew("Goldstone",5,-25)

CurrentSystem = SystemManager:Find("Goldstone")
CurrentSystem:LoadResources()

playerShip = NewShip():Create(500,0,"lc/Gladius")
CurrentSystem:AddShip(playerShip)

Starfield:Fill((SCREENW*SCREENH)/3500)

SCREENX = (SCREENW/2) - playerShip.x
SCREENY = (SCREENH/2) - playerShip.y

currentScreen = 1
Planet_Count = 0

end

function Game_Update()
SMALLSCALE = 0.0125
if (currentScreen == 2) then if (KeyDown(KEY.LSHIFT) == 1) then SMALLSCALE = 0.005 end end
if (currentScreen == 2) then if (KeyDown(KEY.LCONTROL) == 1) then SMALLSCALE = 0.025 end end

if KeyHit(KEY.F1) == 1 then currentScreen = 1 end
if KeyHit(KEY.F2) == 1 then currentScreen = 2 end
if KeyHit(KEY.F3) == 1 then currentScreen = 3 end

SystemManager:Update()

if (currentScreen == 1) then

SCREENX = (SCREENW/2) - playerShip.x
SCREENY = (SCREENH/2) - playerShip.y

playerShip.thrustApplied = KeyDown(KEY.UP)
playerShip.turningDir = KeyDown(KEY.RIGHT) - KeyDown(KEY.LEFT)

elseif (currentScreen == 2) then

if KeyDown(KEY.UP) > 0 then  SCREENY = SCREENY + (5000.0*DELTATIME) end
if KeyDown(KEY.DOWN) > 0 then  SCREENY = SCREENY - (5000.0*DELTATIME) end
if KeyDown(KEY.LEFT) > 0 then SCREENX = SCREENX + (5000.0*DELTATIME) end
if KeyDown(KEY.RIGHT) > 0 then SCREENX = SCREENX - (5000.0*DELTATIME) end

end
end

function Game_Render()
Planet_Count = 0

if (currentScreen == 1) then

Starfield:Draw(3.0)

IsF6Hit = KeyHit(KEY.F6)
ForEach(CurrentSystem.PlanetList,
function (self)
if (self.parent ~= nil) then
--DrawText("Test!! "..self.parent.rx,0,128)
SetAlpha(0.15)
DrawLine(self.rx,self.ry, self.parent.rx,self.parent.ry)
tbDraw:Circle(self.parent.rx, self.parent.ry, self.oDist, 90)
if IsF6Hit == 1 then
PrintConsole(self.Name.." < "..self.parent.Name.." x="..self.parent.rx.." y="..self.parent.ry)
end
SetAlpha(1.0)
end
end )
IsF6Hit = 0

CurrentSystem:Draw()

DrawText("Player Ship: x = "..playerShip.x, 64,64)
DrawText("y = "..playerShip.y, 128+32-3,64+16)

elseif (currentScreen == 2) then

CurrentSystem:DrawSmall()

ForEach(CurrentSystem.PlanetList,
function (planet)
DrawText(planet.Name.." : "..planet.oAngle, SCREENW/2-128, 0+(16*Planet_Count))
Planet_Count=Planet_Count+1
end )

DrawText("Planet Count ".. Planet_Count, 128,128)

elseif (currentScreen == 3) then

SystemManager:Draw(1.0)

DrawText(SystemManager.x.."x"..SystemManager.y ,0,64)

end

--DrawText("CurScn: "..currentScreen, 0,64)
--DrawText("DT: "..DELTATIME, 0,96)--DELTATIME

DrawText("Current System: "..CurrentSystem.Name,0,0)
DrawText("FPS: "..tb:FPS(),0,16)
SetFont(LARGEFONT)
DrawText("Solarance: Lua Test",0,SCREENH-32)
SetFont(SMALLFONT)

end


Planet_DrawSmall = nil--function (self)
--[[
DrawText(self.Name.." : "..self.oAngle,0,24+(16*Planet_Count))
Planet_Count=Planet_Count+1

end
--]]

Planet_Draw = nil--function (self)
-- DrawText(self.Name,self.rx,self.ry)
--end

This is groundbreaking for me, as I love modding and want to make flexibilty in modding a cornerstone of this game. These are folders that mods can be placed in and will overwrite each other depending of their placement in settings.yml, mods listed first will be overwritten by the mods below it. So by placing a "Gladius.png" file under "TestMod/graphics/ships/lc/" it will overwrite the original gladius in "graphics/ships/lc/". But if you listed "Battlestar" mod after "TestMod" then you'll get it's version of Gladius if it has it, if not then nothing will be changed.

I believe this will allow for a great deal of flexibility and control over what mod influences other mods and allow for tweaks of other mods. I am sure I am going to have to tweak this setup eventually, currently only one lua file is tested against. I have begun to list all my class's variables and methods on my forums. I am also keeping up with a To-Do list for the project in this other thread In addition to Lua scripting and mod support, I have also added basic frame animation possibilities to all image layers and a functioning Lua Console you can access by hitting tilde.



I hope to have another build ready in the following weeks, after I get bullets working and adding a more flexible hook system to attach lua functions to BlitzMax class method calls.
Logged

[ Quest! ] A new year, with new possibilities. [ Follow me on Twitter! ]
Galaxy613
Level 1
*


10,000 Lightyears of Awesome


View Profile WWW
« Reply #2 on: March 05, 2011, 05:32:14 PM »

In this build it relies heavily on Lua scripts in the Data/Scripts/ folder. For those who don't want to play around with Lua, the scripts automatically spawn 3 dummy ships that you can shoot at and destroy. I highly encourage you to play around with the scripts, just don't forget where you downloaded the zip to so you can reset them if you mess something up.



Download : Mediafire - 27mb - Windows (Mac in the future)







Controls:
~ (Tilde Key) : Open Lua Console
Arrow Keys : Turn and Move forward
Space Bar : Fire all weapons
F1 : Ship View
F2 : System View (Use Ctrl/Swift to zoom out)
F3 : Galaxy View
F5 : Run "main.lua" again.
F9/F10 : Speed up time (Hold it down)
F11 : Slow down time (Hold it down)

To modify the script files, go into the "Data/Scripts/" folder and open
the ".lua" files using an good editor like Notepad++, jEdit, or your
prefered code editor that supports Lua Code Highlighting.



I started this build by just testing this Lua integration library someone posted for BlitzMax. Just for fun. But then, it was actually stable and very extensible. Through the Lua example I finally fully understood the concept of Lua and started bringing over everything from the last build, into Lua. Now Lua is a very crucial part of the game, bullet's can't function without it and Lua scripts control when everything is loaded, updated, and drawn, also the entire player's HUD is done in Lua script.

I implemented a hook system that allows you to connect Lua functions you make, with some functions of objects. This allows for great flexibility with no predefined "this screen draws this" limitations. I have also enabled individual Ships to be hooked with their own functions, for instance, AI functions. If everything goes well for Ships, I might make every item based on the ObjectAttributes class be hookable.
Logged

[ Quest! ] A new year, with new possibilities. [ Follow me on Twitter! ]
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic