News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Devilmarkus

Coders (BASIC) wanted for help on Elvira

Started by Devilmarkus, 20:59, 31 July 09

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Optimus


I would code for her!


Seriously, let's talk about the project. I think writting this in C would be better. I could make some nice structs and functions for all the game logic. It would be much easier than basic for me.


I am curious if I could help. If I do, it wil be a C project using SDCC. I am already familiar with SDCC and use a nice framework in Codeblocks that makes coding a bliss. It's a really good environment for writting game logic easilly and nicely. I guess I would still be able to call your RSX commands with this.


The problem is I am scared to get involved into this project right now. I am busy with a lot of other stuff, from CPC to real life stuff. But if we can go with this lightly it would be ok. Afterall it's a big project and it's gonna take some time. We could discuss about it by email too.


What do you think? Would it be ok if we migrate the project in C?

steve

I wonder if it is possible to add a small C interpreter to BASIC as an RSX, then it would be possible to write programs that are a mixture of BASIC, C and machine code.

TFM

Quote from: steve on 16:54, 04 March 11
I wonder if it is possible to add a small C interpreter to BASIC as an RSX, then it would be possible to write programs that are a mixture of BASIC, C and machine code.

In case you like to use the wonderful Small C language for the CPC, then you can use Small C under CPC and with two special libraries you can use the program for Amsdos (IOLIB) and FutureOS (FiOLIB). All this stuff is uploaded to my FutureOS yahoo group. I haven't been able to use this nice things for quite a while, but it's worth taking a look at them.

EDIT: IMHO the best language for Elvira would be assembler. Reason: Save space!
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Phi2x

#28
.

kelp7

Quote from: CPCLER on 09:48, 17 October 09
I am still not sure what you want:

Okay so if there are 150 distinct items... Each item can have 3 states:

Placed in a room.
In the players inventory.
Visible/Invisible.

This means the the object to room mapping and inventory will take up 1200 bytes.



This may have been addressed already but in my limited experience writing adventure games I would make room number zero = object taken. So if room number more than zero the object is not yet taken so not yet in inventory. Saves a few bytes i guess.


[edit] = yep, okay i see it's been mentioned already ;-)

reelyanoob

#30
8 bytes per item is total overkill. Back in the 80's the knew about packing stuff in.

defaultRoomNo - Where an item first occurs (needed for initialisation purposes)
- 1 byte needed to give up to 255 rooms, plus 0 if you want the player to start with the object.

RoomNo - Which room number the items is currently located (When not in the players inventory)
- 1 byte again, just using 0 as player inventory

taken - True/False (in the players inventory or not!)
- room # set as zero if taken, so no extra byte needed

visible - True/False(Visible to the player or not!)
- this is just 1 bit needed. If there are no more than 127 rooms, then the high bit of the room code can be used for visible/hidden flag, and we use 7 bits for the location instead of 8. I don't know if this flag is even needed though.

spriteAdr - Address of sprite date (Needed for displaying icon for item)
- assuming all sprites are the same size: this can be coded as 1 byte as well (for up to 256 items), just calculate sprite offset when needed based on memory location and size. the overhead will be minimal compared to drawing the sprites. But you know what? we can derive the index directly from the actual item's number in the item array. Hence, ordering the sprites the same as the objects removes the need for this value completely, since we can generate the sprite's image data location when needed from what we know.

So it's more like 2 bytes needed for the item table. If there are more than 255 rooms though it will take 4 bytes.

SRS

Guess that is no longer "active post" ? Could it be "unsticked" then ?

Gryzor


Powered by SMFPacks Menu Editor Mod