Dark Bit Factory & Gravity
PROGRAMMING => Other languages => Yabasic => Topic started by: Clanky on April 03, 2007
-
Ok, New Ideals!
I have decided to just finish Green Boxcopter... and see where I am at. I will most probably want to finish Yah Spaced Invaders, because it looks really good - and I don't want to dissapoint Shockwave with a buggy, non-finished clone!!!
If, and when I finish these - taken my time... give it to September... *hopefully*. I kind of want to revamp Computer Crisis...
So here's the stats
Green Boxcopter 1: 100%
Green Boxcopter 2: 70% (I guess)
Yah Spaced Invaders: 45%
Computer Crisis: 85%
--------------------------------
And I want to work on an RTS... sort of engine thing! I know! Way off in the horizon *can't code it*! But they say if you walk the distance, no matter how slow - you shall see the end! *hopefully*
-
Good to see you're still determined to do some yab! How's the DOS stuff going at work?
Jim
-
Haven't been to work for 2 weeks because the computer they were building for me needed a new BIOS, so it was awhile for the shipment. Then they decided to put VISTA onto it, so more delays lol!
I'm going tomorrow - I don't think I will be doing any DOS for awhile... think their going to teach me later lol!
-
Ok... fixed! But it still has the funny mini-map location!
I know why this is, but I am not sure *atm* how to fix it.
Why you ask?
A) Because I am moving the perspective as well as the location!
Perspective moves the screen;
Location moves the mini-map square.
I don't no how to change it so that the mini-map moves independent to the perspective - that it, it will only move when the cursor is on the boundry.
Any help will be gratefully accepted!!!
-
That seems to work ok, I've noticed a tendency that you have that will slow things down though..
for i = 1 to 10
rem Soldier
setrgb 1, 300, 200, 100
fill rect -1 + (soldier_x(i) / 20), 203 + (soldier_y(i) / 20), 1 + (soldier_x(i) / 20), 205 + (soldier_y(i) / 20)
clear rect -1 + (soldier_x(i) / 20), 203 + (soldier_y(i) / 20), 1 + (soldier_x(i) / 20), 205 + (soldier_y(i) / 20)
rem Tank
setrgb 1, 100, 300, 200
fill rect -1 + (tank_x(i) / 20), 203 + (tank_y(i) / 20), 1 + (tank_x(i) / 20), 205 + (tank_y(i) / 20)
clear rect -1 + (tank_x(i) / 20), 203 + (tank_y(i) / 20), 1 + (tank_x(i) / 20), 205 + (tank_y(i) / 20)
rem Jet
setrgb 1, 200, 100, 300
fill rect -1 + (jet_x(i) / 20), 203 + (jet_y(i) / 20), 1 + (jet_x(i) / 20), 205 + (jet_y(i) / 20)
clear rect -1 + (jet_x(i) / 20), 203 + (jet_y(i) / 20), 1 + (jet_x(i) / 20), 205 + (jet_y(i) / 20)
next i
You could do;
setrgb 1, 300, 200, 100
for i = 1 to 10
rem Soldier
fill rect -1 + (soldier_x(i) / 20), 203 + (soldier_y(i) / 20), 1 + (soldier_x(i) / 20), 205 + (soldier_y(i) / 20)
clear rect -1 + (soldier_x(i) / 20), 203 + (soldier_y(i) / 20), 1 + (soldier_x(i) / 20), 205 + (soldier_y(i) / 20)
next i
setrgb 1, 100, 300, 200
for i = 1 to 10
rem Tank
fill rect -1 + (tank_x(i) / 20), 203 + (tank_y(i) / 20), 1 + (tank_x(i) / 20), 205 + (tank_y(i) / 20)
clear rect -1 + (tank_x(i) / 20), 203 + (tank_y(i) / 20), 1 + (tank_x(i) / 20), 205 + (tank_y(i) / 20)
next i
setrgb 1, 200, 100, 300
for i = 1 to 10
rem Jet
fill rect -1 + (jet_x(i) / 20), 203 + (jet_y(i) / 20), 1 + (jet_x(i) / 20), 205 + (jet_y(i) / 20)
clear rect -1 + (jet_x(i) / 20), 203 + (jet_y(i) / 20), 1 + (jet_x(i) / 20), 205 + (jet_y(i) / 20)
next i
Might not amount to much, but an optimisation nevertheless and wouldl prove important in Yabasic, especially if you plan to run it on the console.
-
cool stuff.
are all those divides there for tilemapping? or could you work them out as this would speed things up.
-
multiply by 0.05 would be faster, especially on a real PS2.
Jim
-
Ok, I did what Shockie said... nice! Didn't know that having 3 for loops would be better than one (is it because the 3 loops have the setrgb outside of them???)
Well, I guess this has a bit of interest!
Umm, also - could the RTS post be the main disscussion topic for this. It just seems that it would be easier if everyone posted in the one topic. Sorry I made two!!!
-
It's all about simplifying what goes on in loops as much as you can Clanky. You should use the other suggestions there from the other guys too mate :)