Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Community Projects

Author
Message
Diggsey
19
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 13th Feb 2007 23:58 Edited at: 13th Feb 2007 23:58
Here are some very simple functions to work out where the alien space ships are relative to the mothership. It is timer based.



Hammaman
21
Years of Service
User Offline
Joined: 11th Feb 2004
Location:
Posted: 14th Feb 2007 13:54 Edited at: 14th Feb 2007 14:36
Quote: "We could do with someone who wants to get stuck in to the actual gameplay itself "


As a newcomer, I'd like to contribute and had the following initial thoughts on the gameplay:



I'd welcome feedback as to whether using the gamestate approach is one to go with, or does anyone have a better suggestion?

If we decide on the gamestate approach, then I'm happy to sit down and think more deeply about the game logic.

EDIT: I've put together a picture of the game logic in the attached PDF file for comments. I'll also amend the code to use functions (as per BatVink's post below).

Attachments

Login to view attachments
BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 14th Feb 2007 14:16
A State Machine suits me, it makes it easier for different people to work together. In fact, I was going to make the framework myself as the next task, so you've saved me a job.

The only thing I would suggest is that you use functions not subs. They are more easily "plugged in", and the last project worked this way too.



BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 14th Feb 2007 17:19
OK, I've taken Hammaman's code and updated it slightly:

1. Changed the Gosubs to function calls
2. Created an empty function for each call
3. Created an initial menu level in the state machine, from which most of Hammaman's code is called as game playing code. This is now in a function by itself.



...and the original load/save/question code for completeness...





fik
20
Years of Service
User Offline
Joined: 28th Sep 2004
Location:
Posted: 14th Feb 2007 23:51
Have converted the ship files into .x through fragmotion and .3ds through unwrap3d. Hope this helps.

Attachments

Login to view attachments
BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 15th Feb 2007 12:43
Attached is the latest project and media. I have created the menu system, and it can now be compiled and run. The menu only takes you to the different sections, which now need to be coded. It's all modular, with functions for each section.

All of the graphics are simple placeholders for somebody to replace.



Attachments

Login to view attachments
Hammaman
21
Years of Service
User Offline
Joined: 11th Feb 2004
Location:
Posted: 15th Feb 2007 23:25 Edited at: 15th Feb 2007 23:27
Made some progress with the code:

1. Added new constants - object numbers for the earth base, ships, etc.



2. Created code for the _load_objects function:



Not sure this is the way it should be done, and I know that the code could be simplified using loops, so happy for this to be changed to make it better

We're short of a skybox and a earth base - can someone please oblige?

3. Also thought that we need an unload function to be called at the end of the PlayGame function:



4. And finally, I've created code for the _setup_objects function:



I'm aware that I haven't used Diggsey's code yet to position / move the child ships, so will have a think about incorporating this into this function.
Blobby 101
19
Years of Service
User Offline
Joined: 17th Jun 2006
Location: England, UK
Posted: 16th Feb 2007 10:32
sorry I've been away and haven't got around to checking out this thead. but i think fik has fixed the ships.


Projects: zlugs-2%
BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 18th Feb 2007 16:07
Attached is the latest version. Added Hammaman's code. Added scaling of loaded objects. Changed the setup_objects to reposition objects, although it's still not right (!)

Added one of VaxWars sky boxes. It may not be in the spirit of this thread, but I'm trying to get something in place in the hope that others join in (where did everyone go!!!)



Attachments

Login to view attachments
BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 18th Feb 2007 18:38
To avoid duplication of effort, I'm currently working on the settings screen



Herr Doktor Remulak
18
Years of Service
User Offline
Joined: 8th Feb 2007
Location:
Posted: 19th Feb 2007 01:15
Is this a valid contribution? It's the last 3 tutorials from the newsletter, with theory on how to create space invaders, and the code...

http://www.thegamecreators.com/data/newsletter/newsletter_issue_45.html#9

http://www.thegamecreators.com/data/newsletter/newsletter_issue_46.html#8

http://www.thegamecreators.com/data/newsletter/newsletter_issue_47.html#8

It also includes some simple models and textures.

=8=-8=8=8=8=8=8=8=8=8

Can someone tell me is there ( and of course, where ) an archive with all the back issues of this newsletter? Anything else along those lines? Sounds like it would be great for starters like myself.

Stay Noble,
H.D.R.
[email protected]
RiiDii
20
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 20th Feb 2007 00:18
Quote: "where did everyone go!!!"

I'm lurking for the moment. I have been busy trying to apply for a new job - and a lot of that has been job shadowing about 12+ hours a day! Anyway, I am pooped. I will see if I can pick on what has been done so far.


Open MMORPG: It's your game!
BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 20th Feb 2007 14:42 Edited at: 20th Feb 2007 14:43
Quote: "Can someone tell me is there ( and of course, where ) an archive with all the back issues of this newsletter?"


http://www.thegamecreators.com/?gf=newsletter

Quote: "I have been busy trying to apply for a new job - and a lot of that has been job shadowing about 12+ hours a day"


Good luck! It sounds like you're making the effort in all the right places.



BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 25th Feb 2007 12:50
Is there any chance we can extend this project? There have been no contributions in 10 days, so I'm guessing that people have been busy elsewhere, and I picked a bad time to request this game

The headteacher I approached is very excited about this, and it would be a shame to let him down. As much as I could do this myself and make it tick perfectly in the background, I really need help with graphics, audio, modelling - the things that make it attractive and exciting to the user.

I've uploaded the latest version, which now has a functioning options screen, that allows the user to change all the settings and also save them (automatically). I still need to add the ability to create multiple settings files, for different classes, groups etc.
Again, it's not finished graphically. But it's written in a way that will make updating these elements simple.



Attachments

Login to view attachments
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 25th Feb 2007 18:05 Edited at: 26th Feb 2007 01:08
I will be getting involved with this - been tied up recently, but should be able to find a bit more time in the coming week or two.

It makes no difference to me whether the time here is extended, or whether it is transfered to the WIP board. I think it depends on how many other people state an intention to work on it.

Also, although I don't like to undo any work already done, I'm not sure that 3d is the best method here - for a game of this type I would have personally thought 2d graphics may have given better looking results - especially for a 'cartoony' feel. Just a thought, before we go too far down one road or the other.

RiiDii
20
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 25th Feb 2007 20:43
I think we should extend it.

I am very sorry - but yes, I have been very very busy lately.


Open MMORPG: It's your game!
BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 26th Feb 2007 11:55
2D is fine with me. My only design consideration is that it appeals to the age range. Getting questions right should be rewarded with excitement, visual and/or audio. So if we can make it look good in 2D, then go for it.

The current state has no real wasted time on the actual game. We have 2 3D models and a skybox (borrowed). 95% of the code is menus, options screens, and setting up the data for the questions. The gameplay skeleton is in place, but there's no substance in between.



Hammaman
21
Years of Service
User Offline
Joined: 11th Feb 2004
Location:
Posted: 26th Feb 2007 13:48
I'm not fussed whether it's 2D or 3D. I would like to help further, but just haven't the time due to work pressures at the moment :-( - if you want to extend it, I'll try to participate later on in the project if I have time.
BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 6th Mar 2007 23:25
I've done a little more...in the hope that somebody...somewhere...comes back and joins the project!

1. Moved constants to top of program (more comfortable when they are there!)
2. Replaced the models with another simple model. Last ones were not centred at 0, so they wouldn't position correctly on screen. I tried to fix it, but there were other problems too.
3. Set up the basic screen positioning. Added a template HUD.

Remember, the models and graphics are all place holders, I don't expect them to be in the final product!

I am going with Ric's idea of 2D, but it's pseudo 2D. The models are 3D, but placed in a 2D screen space. The function positionOnScreen(X,Y,Z) does this for you, based on an 800x600 area. The Z parameter allows layering in the 2D space.



Attachments

Login to view attachments
BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 6th Mar 2007 23:25 Edited at: 6th Mar 2007 23:26
...and a screenie





Attachments

Login to view attachments
Hobgoblin Lord
19
Years of Service
User Offline
Joined: 29th Oct 2005
Location: Fall River, MA USA
Posted: 7th Mar 2007 19:11
Sorry about this Batvink, I wanted to work on this project but time has been unavailable and looks to remain that way for a bit.

Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 10th Mar 2007 12:09
Found a couple of hours to myself this morning - just downloading the latest version now, and will work on adding some digits to the hud. I'll post my results later ......

Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 10th Mar 2007 14:02 Edited at: 10th Mar 2007 14:07
Alloted time up - gf got home from shopping! I've added digits to the score, hits and timer panels (digit graphics borrowed from GUI Studio). You can alter the number of digits for each display by changing the variables in '_initialise_variables', and their colours can be changed by setting the diffuse value in 'playinit()'

Setting the values is easy, using the function setscore(value), sethits(value) and settimer(value). The value must be an integer. I think I still need to work in some code into these functions to make sure a value of 1 on a three digit display shows up as 001 rather than 100.

As a test, I have temporarily set all the digits to be updated in the game loop 'playgame()' to some random values based on the timer.

Also applied 'set object light object,0' to the hud, and the main menu, to brighten things up a bit.

Full project zip file attached.

Attachments

Login to view attachments
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 11th Mar 2007 12:47
I don't usually triple post - but hey, new day, new post! Here is the updated source code which now turns a value of 1 into 001 on a three digit display, or 23 to 0023 on a four digit display, etc. (I watched the film 'The number 23' last night. Now I see it everywhre - spooky!)





We should be able to use the same digit functions for creating the answers to go by each ship. Where is the question going to go? On the mother ship?

BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 11th Mar 2007 23:08
Thanks Ric. I'm DBP-less on my PC at the moment, I'll have to look ASAP at your contributions.

Where to put the questions - I was pondering this, and thought that the mothership could have the question like you say, with the answers being on the others. To make them readable, the ships animations could be a "wobble" rather than the traditional "spin". This idea all hangs on the ability to apply the values to the ships. Perhaps a texture with a known position that the numeric text could be applied.

My other thought was to make use the base - A digital readout of the question, and answers applied to the turrets. Clcik the turret with the correct answer to fire it.

I have no preference, whichever gives more scope...or a completely different idea.



BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 12th Mar 2007 19:23
Updated and uploaded:

1. Added Ric's updated code above to the project
2. Worked on the Game Play loop:
Case for pre-question routine. Currently a 3 second delay
Case for question-answering. Ships descend according to time limit
Case for time exceeded. Currently a 3-second delay

Game currently iterates through the above states and exits back to menu. Proved that Deinitialising game is tidying up correctly, and game can be replayed without any hitches.

Also updated a couple of small things, such as ambience and constants.



Attachments

Login to view attachments
Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 13th Mar 2007 10:52
I forgot all about this thread. I just finished finals a week ago and only had 1 day off before new classes started this past week.

So what are you guys working on now?

Aaron Miller
19
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 23rd Mar 2007 09:23
Yes, what is going on now?

This hasnt been replied to for a little over a week now.




If no one has any ideas, id like to pitch my own idea..... *Will post if no one has any idea*


Cheers,

-db

Enter my forums here.
BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 23rd Mar 2007 10:07
Well, I think the last one died a lingering death. So it's time to move on!
Blobby 101
19
Years of Service
User Offline
Joined: 17th Jun 2006
Location: England, UK
Posted: 23rd Mar 2007 21:07
ah, just read that last post as i was about to say i re-modeled the ships and saved as both x and 3ds. oh well. at least i know for if i ever do some modeling for this thread again.


thanks to deathead for the sig!
Projects: zlugs-2%
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 23rd Mar 2007 23:38
Blobby - this project will move to the WIP board, and it's only dead if we let it die. If you have more to contribute, then you can help keep it alive!

Hobgoblin Lord
19
Years of Service
User Offline
Joined: 29th Oct 2005
Location: Fall River, MA USA
Posted: 23rd Mar 2007 23:49
Well I guess its time for a new idea, I fell out of touch with the thread then so much time had passed and the interest seemed minimal, so I guess we all fell victim to thinking it was dead.

How about a side scroller/platformer ala mario for the next project?

Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 24th Mar 2007 00:47
Or a space trading/combat game ala Elite?

Hobgoblin Lord
19
Years of Service
User Offline
Joined: 29th Oct 2005
Location: Fall River, MA USA
Posted: 24th Mar 2007 00:56
like that idea alot Ric. It gets my vote.

Aaron Miller
19
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 24th Mar 2007 08:53
I vote platformer as well.

Or simple, little, RPG.


Ive gotten a bit more interested in 2D and sprites now.



Cheers,

-db

Enter my forums here.
Blobby 101
19
Years of Service
User Offline
Joined: 17th Jun 2006
Location: England, UK
Posted: 24th Mar 2007 10:08
i vote for a space trading game


thanks to deathead for the sig!
Projects: zlugs-2%
Hobgoblin Lord
19
Years of Service
User Offline
Joined: 29th Oct 2005
Location: Fall River, MA USA
Posted: 24th Mar 2007 19:02
OK someone has to make the call so we can move on, I say we start on the spacetrade game. Unlike our previous projects this one will take a little more coordination then the willy nilly approach we usually take . A few things we will need to flesh out before we really get into programming it.

I have laid out a basic structure for the game.



We should discuss what to add/remove before we march into this, I plan to code for it, but will focus on creating the media we will need mostly. Lets get a list together of what we want and get it going.

Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 24th Mar 2007 20:08
That looks like a well thought out start HL. What I like about this kind of project is the potential to get something working which is very basic, and allow room for expansion in any direction we want to take it.

Perhaps a discussion of the main essential game aspects would help - especially for those who didn't grow up with Elite and it's clones.

I'll start a list which can be added to:

Set up game universe

-planetary systems
-space stations etc.
-gates between systems?

Whilst docked in a space station

-map
-statistics (shields, weapons, money, game time etc.)
-cargo (items bought)
-commodoty list (buy price and sell price)
-upgrades

Whilst between space stations

-launch from station
-free flight
-combat
-navigation (ie. radar)
-opponent ai
-communication between/identification of ships?
-docking

Hobgoblin Lord
19
Years of Service
User Offline
Joined: 29th Oct 2005
Location: Fall River, MA USA
Posted: 24th Mar 2007 21:27
Things I would like to add

Whilst docked in a space station


-map
-statistics (shields, weapons, money, game time etc.)
-cargo (items bought)
-commodoty list (buy price and sell price)
-upgrades
-Intergalactic Stock Market (Invest in other corporations)
-Invest in Planet Structures (mining stations, travel agent, other buildings that present a benefit in some way from that planet)
-Places to visit (Govenor/president whatever, temples, shoreleave facilities, etc.)
-Hire Crew (every ship needs a crew and you may be able to find better, or cheaper crewmen here)

Blobby 101
19
Years of Service
User Offline
Joined: 17th Jun 2006
Location: England, UK
Posted: 25th Mar 2007 13:42
you may want to add a refueling stop between some space stations, like gas/petrol stations.


thanks to deathead for the sig!
Projects: alien abductor-5%
TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 25th Mar 2007 15:32
Sorry if this sounds silly but what does dimensioning an array with -1 spaces acheive?
e.g.Dim Player(-1) as PARTICIPANT

Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 25th Mar 2007 21:36
It actually sets the array to have no spaces. If you set dim player(0), you are actually setting it to have one space, with the label zero. It's not really important what it's set at initially because it will obviously be adjusted as necessary - but the important thing is that it is set at something, to help with creating a framework to work with.

Hobgoblin Lord
19
Years of Service
User Offline
Joined: 29th Oct 2005
Location: Fall River, MA USA
Posted: 25th Mar 2007 23:37
Teh_Coder, The reason to do something like that is so you do not hog up memory for no reason. We may set up the game to have up to 5000 commodities say, we could just do a Dim x(4999), but then we have allocated a large block of memory we might not even use. (-1) sets it up as an array list and we will use

array insert xxx
and
array delete xxx

to manage the lists and make sure we never are taking more memory than we need.

--------------------------------
A thought on our galaxy creation

If we set each sector to be randomly generated, how about we store a sector the player is not in by a seed and recreate/delete each sector as a player enters or exits it.

something like



That way we could store an insane number of sectors without actually having to store all the data for each of the planets. All depends on how we decide to go about the game.

Jerok
20
Years of Service
User Offline
Joined: 7th May 2005
Location: Mars. Wait a sec I\'m on MARS. OMG
Posted: 26th Mar 2007 00:23
Is this one going to be 2d or 3d?
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 26th Mar 2007 01:05
I like the idea of random generation for the maps - just like the original Elite did - including the text which described the planets. However, I'd suggest not using the timer as the seed - but preset values. So - random, but the same each time. (Yes I know that's not really random!) This way, you'd have a huge galaxy with no data to load up, but the galaxy wouldn't keep changing each time you loaded up the game - and the game would be the same for everyone.

Jerok: I think the free-flight/combat would be best with 3d, and the trading part of the game done with 2d menu screens.

Hobgoblin Lord
19
Years of Service
User Offline
Joined: 29th Oct 2005
Location: Fall River, MA USA
Posted: 26th Mar 2007 09:45
Just a small update, added a few constants and the generator for the games seeds. Also added a simple name generator for the planets (we can spice it up some).

What I was thinking was we set a max number of planets per sector (I will use 256 for this example), and pre-define the seeds for a set number of sectors (heck 256 again). So by storing 256 dwords in memory we can predefine 65,536 planets.

I was also thinking we set a value for "sub-sectors" (I used 4), this would break each sector into a grid of 4x4, or 16 subsectors. each planet assigned to a sector will reside in one of the sub sectors and can be accessed via some sort of grid/comp interface.

Again this is all very basic, I wanted to get some more input before I go wild with stuff, figured just a few generators should be safe with most any design we come up with.



Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 26th Mar 2007 14:18
Just had a quick play with the planet name generator:



Blobby 101
19
Years of Service
User Offline
Joined: 17th Jun 2006
Location: England, UK
Posted: 26th Mar 2007 18:55
I'm no coder, but again I'd like to contribute. there will probably be a few models for a game like this, so at a later date i might be able to do one or two.


thanks to deathead for the sig!
Projects: alien abductor-5%
Diggsey
19
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 26th Mar 2007 19:02
Will this be 2D?

Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 26th Mar 2007 20:19
Quote: "I think the free-flight/combat would be best with 3d, and the trading part of the game done with 2d menu screens."


Login to post a reply

Server time is: 2025-06-18 19:57:47
Your offset time is: 2025-06-18 19:57:47